lnmp -- 解決Warning: scandir() has been disabled for security reasons in…的問題

緣由:LNMP 0.9禁用了部分存在危險的PHP函數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, fsockopenshell

解決方法:
lnmp環境中編輯PHP配置文件:socket

  1. vi /usr/local/php/etc/php.ini進入編輯狀態函數

  2. 輸入/,進入搜索模式,找到disable_functionsphp-fpm

  3. 尋找disable_functions字符串,將後面的scandir刪除rest

重啓PHP生效server

/etc/init.d/php-fpm restartblog

原文來自趙公子記lnmp

相關文章
相關標籤/搜索