Shell_exec On LightTPDSep 30, 2007
I've got a very simple script with shell_exec that's giving me a headache! My server is a NetBSD machine running LightTPD (1.4.8nb1) and php (5.1.1nb2).
I've got the file dummy.php with the following content:
$res = shell_exec("pwd 2>&1");
When I access this file through a browser i can't see any output:
http://my.url/dummy.php results in a blank page that loads in no time! No error messages, neither output by the browser or in the log files (php.log and LightTPD's error.log).†
When I use the terminal on the servern it all works fine:
php /path/to/wwwroot/dummy.php gives me the working directory. Doesn't matter from which working directory I execute the command, or which user (I've tried the LightTPD user aswell). It works every time!†
safe_mode is off and there are no disabled_functions!
I've asked around in LightTPD forums, but they say it's a PHP problem. So, I've asked around in (other) PHP forums but noone seems to have any ideas how to solve this!†
Perhaps there are expert users here that can help me, or at least redirect me to some other expert forum.