exec command not working
i tried to run exec, system command with php script but not working
not able to find out any reason /// test.php <? echo exec('whoami'); echo shell_exec('whoami'); echo system('whoami'); ?> but no results when tried from browser to run this file but when i tried to run this php from prompt it works perfectly php test.php i could'nt find reason y this is happening please put ur thoughts |
Probably PHP safe mode is enabled. Safe mode will prevent PHP, as invoked from Apache, from executing any executables except in precepicief directories (see the safe_mode_exec_dir parameter in your php.ini to see what this is set to). Believe me, safe mode is a good thing that helps prevent people from exploiting buggy PHP scripts to exploit your system (it's not perfect, or anywhere close, but it helps).
|
exec not working
Quote:
i set safe_mode_exec_dir variable to "On" in php.ini but still not working |
All times are GMT -5. The time now is 11:27 PM. |