LNMP0.9下WordPress 3.4无法编辑主题的解决方法

最近新买了一个VPS,安装好lnmp环境,把自己的博客搬过来,发现没法编辑主题文件。在编辑主题页面显示:
Warning: scandir() has been disabled for security reasons in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 978

Warning: Invalid argument supplied for foreach() in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 981

Warning: scandir() has been disabled for security reasons in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 978

Warning: Invalid argument supplied for foreach() in /home/wwwroot/yourdomain.com/wp-includes/class-wp-theme.php on line 981

解决方法:
编辑PHP配置文件:

vi /usr/local/php/etc/php.ini
寻找disable_functions字符串,将后面的scandir删除(提示:vi下可输入/,进入搜索模式,轻松找到disable_functions)

重启PHP生效

/etc/init.d/php-fpm restart

发表评论

电子邮件地址不会被公开。 必填项已用*标注