exec command
| From: | cragland | Date: | Thu, 07 Apr 2005 00:24:51 +0000 |
| Subject: | exec command | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212472@lists.php.net to get a copy of this message | ||
when running a simple php script, below, with exec, I recieve:
sh: /whoami: No such file or directory
<?php
// outputs the username that owns the running php/httpd process
// (on a system with the "whoami" executable in the path)
echo exec('whoami');
?>
Thanks very much,
cole
mailto:cragland@firstam.com
"MMS <firstam.com>" made the following
annotations on 04/06/2005 05:37:11 PM
------------------------------------------------------------------------------
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE
INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION. IF YOU
ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH
PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED
HEREWITH. IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND
DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================