wordpress编辑主题时报错Warning: scandir() has been disabled for security reasons in
在ubuntu下面安装了一个wordpress程序,在后台什么都没干,编辑主题时,发现页面中报下面的错误。
notice: /home/wwwroot/test.localhost/wordpress/wp-content/themes is not readable in /home/wwwroot/test.localhost/wordpress/wp-includes/theme.php on line Warning: scandir() has been disabled for security reasons in /home/wwwroot/test.localhost/wordpress/wp-includes/l10n.php on line
这个是什么情况呢,赶快到网上搜了一下。
原来是scandir被禁用了。通过lnmp探针也可以看到。

很简单,编辑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即可。
php.ini 的位置:/usr/local/php/etc/php.ini
最后执行/etc/init.d/php-fpm restart重启下
等重启完后,再刷新页面,就会发现以前报的警告没有了。
wordpress编辑主题时报错Warning: scandir() has been disabled for security reasons in的更多相关文章
- lnmp -- 解决Warning: scandir() has been disabled for security reasons in…的问题
原因:LNMP 0.9禁用了部分存在危险的PHP函数 LNMP0.9禁用的PHP函数包括:passthru, exec, system, chroot, scandir, chgrp, chown, ...
- 解决报错:scandir() has been disabled for security reasons
服务器环境: LNMP 在服务器部署代码时候.遇到了这个问题. 蛋疼啊! 2 解决办法: 打开phpinfo.php , 搜索: scandir 找到disabled_function,确认此函数未 ...
- Warning: popen() has been disabled for security reasons in OS/Guess.php on line 241
今天使用pecl install swoole命令编译安装swoole的时候提示:Warning: popen() has been disabled for security reasons in ...
- PHP Warning exec() has been disabled for security reasons怎么办
如果是PHPNOW,还是找到php-apache2handler.ini这个文件,把禁用的函数去掉即可. 注意是这个文件夹
- Docker报错 WARNING: IPv4 forwarding is disabled. Networking will not work.
问题:创建容器的时候报错WARNING: IPv4 forwarding is disabled. Networking will not work. # docker run -it -p 3000 ...
- 解决报错WARNING: IPv4 forwarding is disabled. Networking will not work.
报错: [root@localhost /]# docker run -it ubuntu /bin/bash WARNING: IPv4 forwarding is disabled. Networ ...
- docker run 报错——WARNING: IPv4 forwarding is disabled. Networking will not work.
执行 docker run 时遇到如下WARNING: [root@etcd1 volumes]# docker run -d -p 8080:80 -v /tmp/test_mount http ...
- Docker运行程序报错 WARNING: IPv4 forwarding is disabled. Networking will not work
WARNING: IPv4 forwarding is disabled. Networking will not work. 第一步:vi /usr/lib/sysctl.d/00-system ...
- vi 新建编辑文件时报错 E212 can’t open file for writing
在vi修改防火墙配置时,不能够保存,报E212 can’t open file for writing错误. 网上大概给出了两种答案. 一是权限不够,可以用root权限事实,或者sudo 操作. 二是 ...
随机推荐
- linux内核分析 第八周
第八周 理解进程调度时机跟踪分析进程调度与进程切换的过程 一.进程调度与切换 1.进程的调度时机与进程切换 操作系统原理中介绍了大量进程调度算法,这些算法从实现的角度看仅仅是从运行队列中选择一个新进程 ...
- IE firefox 兼容性整理
1.尽量用jquery操作. 2.jquery取值时要用准确的方法,attr(), val(), text(), html(). 例如: <span value="a"> ...
- 怎样写 OpenStack Neutron 的 Extension (四)
上文说到需要在 /neutronclient/v2_0/myextension/extension.py 中分别定义五个 class:List/Show/Create/Delete/UpdateExt ...
- Linq之隐式类型、自动属性、初始化器、匿名类
目录 写在前面 系列文章 隐式类型 自动属性 初始化器 匿名类 总结 写在前面 上篇文章是本系列的小插曲,也是在项目中遇到,觉得有必要总结一下,就顺手写在了博客中,也希望能帮到一些朋友.本文将继续介绍 ...
- Linq之Lambda表达式初步认识
目录 写在前面 匿名方法 一个例子 Lambda 定义 一个例子 总结 参考文章 写在前面 元旦三天在家闲着无事,就看了看Linq的相关内容,也准备系统的学习一下,作为学习Linq的前奏,还是先得说说 ...
- Flex ObjectHandles 构建绘图程序!
模型 主画布组件:com/components/graph/GraphContainer.mxml <?xml version="1.0" encoding="ut ...
- Javascript基础系列之(六)循环语句(break和continue语句)
break和continue语句对循环中的代码执行提供了更为严格的流程控制.break语句可以立刻退出循环,阻止再次执行循环体中的任何代码.continue语句只是退出当前这一循环,根据控制表达式还允 ...
- angular的canvas画图例子
angular的例子: <!DOCTYPE html> <html ng-app="APP"> <head> <meta charset= ...
- 每天一个linux命令(43):lsof命令
lsof(list open files) 是一个列出当前系统打开文件的工具.在linux环境下,任何事物都以文件的形式存在,通过文件不仅仅可以访问常规数据,还可以访问网络连接和硬件.所以 如传输控制 ...
- Kettle_设置全局变量
使用全局变量的目的是为了避免反复修改[作业]和[转换]中变量到实际值 步骤: 1.打开全局配置文件 目录:C:\Users\Administrator\.kettle\kettle.propertie ...