Page 1 of 1

running exec

Posted: Wed Jul 25, 2007 6:47 am
by gurjit
if i run this in a php script nothing is displayed.

Code: Select all

<?php
echo exec("whoami");
?>
safe_mode is off in php.ini

can i pass the root username and password and run this? I think its an issue with permissions.

Re: running exec

Posted: Wed Jul 25, 2007 6:58 am
by volka
please try

Code: Select all

<?php
error_reporting(E_ALL);
ini_set('display_errors', true);
echo 'whoami:', exec('whoami 2>&1');
?>+