PHP 5 exec() not returning results [RESOLVED]
Posted: Fri Jun 22, 2007 11:42 am
I have a script that runs well in PHP 4.x, but when uploading to a server running PHP 5.1.6, Apache 2.2.3, and Red Hat Enterprise Linux Server release 5, my exec() command returns nothing. I have also tried passthru() and shell_exec(), and both do the same thing.
When I run the following command manually:
I get the following result:
But using exec(), both as:
and
I get nothing. $result is an empty string, and $extent returns an empty array. The same happens with the other shell commands. When I use the same code and run it via the command line, it returns the proper data. Safe mode is off, so I'm trying to determine what else it could be.
ANY help would be appreciated. TIA!
When I run the following command manually:
Code: Select all
$ /usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84Code: Select all
R-99.847/44.183/-95.490/46.557rCode: Select all
$result = exec("/usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84");Code: Select all
exec("/usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84", $extent);ANY help would be appreciated. TIA!