Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
The output is: OS Error: 127. I have a second server that I use as a downtime backup. On that one, all the scripts work normally. I don't have to give a path for the commands, any commands with permission problems return permission denied, and the apache user (nobody) actually has /sbin/nologin

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-23 Thread Jim Poserina
Wed 23 Mar 2005--23:05:30--/home/webuserwhoami root Wed 23 Mar 2005--23:05:33--/home/webusercat test.php ?php echo exec(whoami).\n; ? Wed 23 Mar 2005--23:05:36--/home/webuserphp test.php Content-type: text/html X-Powered-By: PHP/4.3.9 root Wed 23 Mar 2005--23:05:39--/home/webusersu webuser [EMAIL

Re: [PHP] Apache user can't use exec(), passthru(), etc.

2005-03-22 Thread Richard Lynch
On Mon, March 21, 2005 8:20 pm, Jim Poserina said: If I run this PHP script: ?php echo 'pre'; echo exec('whoami'); The first most biggest thing wrong is that you aren't using the additional arguments to exec() to find out what your output is, and if your command generated an error. For

[PHP] Apache user can't use exec(), passthru(), etc.

2005-03-21 Thread Jim Poserina
If I run this PHP script: ?php echo 'pre'; echo exec('whoami'); echo '/pre'; ? from the web, the output is pre/preand from the command line running as the apache user(webuser), the output is. Content-type: text/html X-Powered-By: PHP/4.3.9 pre/preBut if I run from the command line as root, the