In CentOS (5.3) php’s shell_exec() function is disabled by default. When you try to use it you’ll see messages like this:

PHP Warning:  shell_exec() has been disabled for security reasons in /var/www/...

in your error_log files. I thought it had something to do with the safe_mode in /etc/php.ini, but it turned out I had to change this line instead:

disable_functions = show_source,system,shell_exec,passthru,exec,phpinfo,proc_open


disable_functions = show_source,system,passthru,phpinfo,proc_open;

And after that, restart Apache:

service httpd restart

No Comment.

Add Your Comment