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 操作. 二是 ...
随机推荐
- Spring 集成 Hibernate 和 Struts 2
在Spring中集成Hibernate,实际上就是将Hibernate中用到的数据源DataSource. SessionFactory实例(通常使用Hibernate访问数据库时,应用程序会先创建S ...
- swift第二季高级语法
一.类和结构体 二.属性 三.方法 四.下标 五.继承和扩展 六.初始化和反初始化
- hugo-最好用的静态网站生成器
hugo最好用的静态网站生成器 Hugo是由Go语言实现的静态网站生成器.简单.易用.高效.易扩展.快速部署. 快速开始 安装Hugo 1. 二进制安装(推荐:简单.快速) 到 Hugo Releas ...
- shell中的正则表达式
1.正则与通配符 linux中的通配符是用来匹配文件名的,其匹配是完全匹配.只支持通配符则命令有ls find cp等命令 正则是用来匹配字符串的,是包含匹配.只要搜索的内容在某个字符串中,那么改字符 ...
- 那天有个小孩跟我说LINQ(八)学会Func
文章已经迁移到:http://www.ayjs.net/2013/08/68/ 文章已经迁移到:http://www.ayjs.net/2013/08/68/ 文章已经迁移到:http://www.a ...
- 5、面向对象以及winform的简单运用(方法重载、隐藏、重写与虚方法)
方法的重载: 规定一个方法可以具有不同的实现,但方法的名称是相同的.如: //同样是Man这个方法 public int Man(int age,int name) { …… } //重载 publi ...
- Javascript基础系列之(一)JavaScript语法
javascript的语法 1.区分大小写 javascript中,变量.函数.运算符都区分大小写. 2.弱类型变量 定义变量只用 "var"关键字 var age = 25; v ...
- angular的工具方法笔记(equals, HashKey)
分别是angular脏值检测的工具方法equals和 类HashKey的使用方法 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transi ...
- 用SQL打印乘法口诀表
--用SQL打印出乘法口诀表 declare @i int ,@j int --@i是乘法口诀的行数 --一共九行 begin --每次都是从1*开始,j每循环一次递增 )--print每次输出都会换 ...
- 【CodeForces 489A】SwapSort
题 Description In this problem your goal is to sort an array consisting of n integers in at most n sw ...