shell_exec() has been disabled for security reasons

shell_exec()已经出于安全原因关闭解决办法
①打开PHP.ini文件

[root@localhost ~]# vi /usr/local/php/etc/php.ini

②搜索shell_exec (/shell_exec),可以找到以下内容:

disable_functions=dl,eval,assert,exec,popen,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open
③去掉shell_exec即可
④重启php-fpm (注:我这里环境为虚拟机,这里可以用reload平滑启动试试)
[root@localhost ~]# service php-fpm restart
0 Comments
Leave a Reply