美文网首页
wordpress PHP Warning: scandir(

wordpress PHP Warning: scandir(

作者: Cxetry_ | 来源:发表于2017-10-27 17:56 被阅读0次

    [Fri Oct 27 09:24:28.443954 2017] [:error] [pid 14521] [client 42.236.10.81:50407] PHP Warning:  scandir() has been disabled for security reasons in /var/webdata/......

    [Fri Oct 27 09:24:28.444009 2017] [:error] [pid 14521] [client 42.236.10.81:50407] PHP Warning:  Invalid argument supplied for foreach() in /var/webdata//......

    原因:php里面的 scandir() 函数被禁用

    解决方法:编辑php.ini,找到这行:

    disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen去掉scandir保存并重起php-fpm即可。

    同样,如果是Warning: exec() has been disabled for security reasons in /home/wwwroot/…或者为其它函数,解决办法也是一样的。

    相关文章

      网友评论

          本文标题:wordpress PHP Warning: scandir(

          本文链接:https://www.haomeiwen.com/subject/chqtuxtx.html