getting programs to execute
| From: | Daniel Convissor | Date: | Wed, 04 Oct 2000 14:25:14 +0000 |
| Subject: | getting programs to execute | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-18594@lists.php.net to get a copy of this message | ||
Howdy Y'all:
I'm about to go live with the Signio/VeriSign Payflow Pro program and have
run into a critical problem I hope y'all can assist with, please.
I've set up my own shopping cart program. It works fine from home. The
system here is as follows:
NT 4.0 (SP 6a), Apache 1.3.6, PHP 4.0.2.
But, on line at my ISP, there's a hitch. This is their setup:
NetBSD 1.4.2, Apache 1.3.12, PHP 4.0.2 (as CGI).
Using the linux 5 (a.out) version of Payflow Pro
The hitch is the seeming inability to have my PHP scripts execute the
Payflow Pro program while being viewed as a web page, despite the same
script being able to correctly run the Payflow Pro program from a command
line.
So, I created a test script to hack away at this problem. I set it up to
run a variety of programs. All of these execute and display their outputs
just fine from a web browser [and a command line]:
# $Program = "blah.cgi";
# $Program = "zzzz ch checking.htm"; # zzzz is a copy of "zip"
# $Program = "test.sh";
The only program that doesn't work when the script is called from the web
browser is pfpro:
$Parameters = "... [actual parameters go here] ...";
$Program = "pfpro test.signio.com 443 \"$Parameters\"";
NB: The directory and program variables are then combined into a command
variable, which is then run:
$Directory = "./test";
$Command = "$Directory/$Program";
$Result = system("$Command");
I've also tried PHP's exec() and passthru() funcions as alternatives to
system(). Leaving it on system() right now so I can see the actual screen
output of the program.
By the way, the test script, test.cgi, is chmoded 705 while all programs
called by it are chmoded 700. They're owned by me and in the correct group,
as they should be.
Again, from the command line, the program runs fine, connecting with the
Payflow Pro program and getting appropriate responses without a problem.
I'm at a loss. Any and all help will be greatly appreciated.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409