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:
$ /usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84
I get the following result:
R-99.847/44.183/-95.490/46.557r
But using exec(), both as:
$result = exec("/usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84");
and
exec("/usr/local/noaawatch/nw_xy2region.pl conus 182 66 209 84", $extent);
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!