Last active
March 15, 2017 16:08
-
-
Save zhyunfe/6af8cd44619a20d786d4b590489d1f02 to your computer and use it in GitHub Desktop.
解决Warning: scandir() has been disabled for security reasons in…的问题
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
原因:LNMP 0.9禁用了部分存在危险的PHP函数 | |
LNMP0.9禁用的PHP函数包括:passthru, exec, system, chroot, scandir, 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 | |
解决方法: | |
编辑PHP配置文件: | |
vi /usr/local/php/etc/php.ini进入编辑状态 | |
输入/,进入搜索模式,找到disable_functions | |
寻找disable_functions字符串,将后面的scandir删除 | |
重启PHP生效 | |
/etc/init.d/php-fpm restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment