解决:shell_exec()无法使用,shell_exec()被禁用

文章来源:https://www.onepound.cn/yc/?p=9257

最近刚买了一个新空间,网站上线后发现总是出现以下警告:

Warning: shell_exec() has been disabled for security reasons

in /home/shoesnba/public_html/redsoleshoeses.com/includes/functions/general.php on

line 1486。

意思是shell_exec()这个功能被禁用了,这一看就是配置问题,找到php.ini里面的

disable_functions = exec , popen, system …然后 把这个里面的exec去掉,最后在重启下apache就好了

php.ini exec()函数无法使用

php.ini exec()函数无法使用

原因:在php.ini的 disable_functions配置中,默认exec执行函数都是被 禁止的,需要在php.ini中

disable_functions = exec , popen, system …. ,将你需要用的函数从列表中删掉,然后在重启apache就可以了

posted @ 2017-12-27 11:00  enjie  阅读(8214)  评论(0编辑  收藏  举报