Hello,
Ok First let me tell you what I am trying to do; I have 2 programs, one in
C and one in php that I want to have be able to run the php script from
within the C program with a system("/usr/bin/php script.php"). And it
works fine on my home server, but on the production server it doesn't
work. Note that servers are not exactly the same(different modules,etc.)
What I mean by doesn't work is the wierd part. Instead of giving me an
error, what it does is actually insert the cgi program where the system()
call is. I have actually reproduced this with a simple bash script
bash.cgi:
#!/bin/bash
export REDIRECT_STATUS=200; # Keep php from generating security warning.
echo "Content-type: text/html\n\n"
/usr/bin/php -v
echo ""
Instead of just printing "4.2.2", the script source gets outputted. What
it seems like is instead of just running the script, the php is actually
executing the cgi script like "php bash.cgi". I don't understand why it
is doing this, and I was wondering if anyone could give me some insight.
Note: Both programs are too big to rewrite in one language, and I cannot
upgrade to apache 2.0.
Thanks,
Brian