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
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
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
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
4 matches
Mail list logo