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

2005-03-23 Thread Jim Poserina
Wed 23 Mar 2005--23:05:30--/home/webuser>whoami root Wed 23 Mar 2005--23:05:33--/home/webuser>cat test.php Wed 23 Mar 2005--23:05:36--/home/webuser>php test.php Content-type: text/html X-Powered-By: PHP/4.3.9 root Wed 23 Mar 2005--23:05:39--/home/webuser>su webuser [EMAIL PROTECTED] ~]$ php test.

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/nologi

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: > echo ''; > 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 starters, I

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

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