Current System:
Linux Mandrake 7.1 or .2
PHP 4.0.6
Apache 1.3.20
Lynx 2.8.5dev.2
Issue:
I am trying to have php call a shell script, which sends a message to a pager through the lynx command line. The shell script works fine when run from the bash shell. The PHP function 'system' works fine when I tell it to run a shell script. But when I run the 'sendapage.php' from the browser, I get a Segmentation Fault in the APACHE error_log & the message was not sent to the pager. My question is why does the script work from the bash shell and not when I call it from a PHP page?
Also, I have Mandrake 8.1 installed on a different server with the same website; the exact same script works just fine. With this in mind I upgraded PHP,Apache, and lynx to the current versions above; only to find out the exact same error occurs... PLEASE HELP
Code:
(sendapage.php)
<? system('/http/scripts/new.sh'); ?>
(new.sh)
echo 'PIN=1234567890&firstSubmit=Send&MSSG=test5
---' | /usr/bin/lynx -post_data http://www.arch.com/cgi-bin/wwwpage.exe
Error (from apache's error_log):
/http/scripts/new.sh: line 4: 14489 Done echo 'PIN=1234567890&firstSubmit=Send&MSSG=test5
'
14490 Segmentation fault | /usr/bin/lynx -post_data http://www.arch.com/cgi-bin/wwwpage.exe