有几个网站是PHPCMS V9做的,但这两天发现一个问题,PHPCMS 的错误日志超过了20M ,后台报警,然后我看了下错误日志,其中两万多行都是一个错误,错误信息如下:

1 <?php exit;?>11-03
10:24:46 | 2048 | Only variables should be passed by reference |
caches/caches_model/caches_data/content_output.class.php | 79

然后查找 根源 caches/caches_model/caches_data/content_output.class.php 的第79行

1 extract(string2array($this->fields[$field]['setting']));

PHP extract() 函数从数组中把变量导入到当前的符号表中。
对于数组中的每个元素,键名用于变量名,键值用于变量值。

于是我怀疑extract()的参数不是数组 造成的。

由于报错的这个位置试过缓存文件,找到源文件的位置为

网站根目录/phpcms/modules/content/fields/box/output.inc.php

修改文件里面的

1 extract(string2array($this->fields[$field]['setting']));

为:

1 $setting = string2array($this->fields[$field]['setting']); is_array($setting) && extract($setting);

这样,先判断下extract()的参数是不是一个数组,如果是数组的话,才执行extract(),这样就避免错误,

然后在PHPCMS 更新缓存,这样后面就不会报错了

PHPCMS 错误日志 Only variables should be passed by ...的更多相关文章

  1. Ecshop提示Only variables should be passed by reference in错误

    Ecshop是个坑爹货,为什么tiandi会说它是个坑爹货呢,请看一下下面的官方的运行环境推荐: 服务器端运行环境推荐·php版本5.0以上5.3以下的版本(推荐使用5.2系列版本)·Mysql版本5 ...

  2. MySQL错误日志总结

    MySQL错误日志是记录MySQL 运行过程中较为严重的警告和错误信息,以及MySQL每次启动和关闭的详细信息.错误日志的命名通常为hostname.err.其中,hostname表示服务器主机名. ...

  3. 已解决:Strict Standards: Only variables should be passed by reference in

    今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...

  4. Strict Standards: Only variables should be passed by reference

    <?php $tag="1 2 3 4 5 6 7"; $tag_sel = array_shift(explode(' ', $tag)); print_r($tag_se ...

  5. ECShop出现Strict Standards: Only variables should be passed by reference in的解决方法

    今天安装ecshop的时候最上面出现了一个错误提示:Strict Standards: Only variables should be passed by reference in F:\www.x ...

  6. 安装Ecshop首页出现报错:Only variables should be passed by referen

    出现下面这就话: Strict Standards: Only variables should be passed by reference in E:\Tools\ECShop_V2.7.3_UT ...

  7. ECshop Strict Standards: Only variables should be passed by reference in解决办法

    本文章来给各位同学介绍关于ECshop Strict Standards: Only variables should be passed by reference in解决办法,希望此教程 对各位同 ...

  8. MySQL 错误日志(Error Log)

    同大多数关系型数据库一样,日志文件是MySQL数据库的重要组成部分.MySQL有几种不同的日志文件.通常包括错误日志文件,二进制日志,通用日志,慢查询日志,等等. 这些日志能够帮助我们定位mysqld ...

  9. mysql之 日志体系(错误日志、查询日志、二进制日志、事务日志、中继日志)

    一. mysql错误日志:错误日志记录的事件:a).服务器启动关闭过程中的信息b).服务器运行过程中的错误信息c).事件调试器运行一个事件时间生的信息d).在从服务器上启动从服务器进程时产生的信息lo ...

随机推荐

  1. MDI/MDIX接口

    转载:http://blog.chinaunix.net/uid-24148050-id-137067.html MDI/MDIX is a type of Ethernet port connect ...

  2. BootStrap2学习日记6---代码

    &lt:表示“<” &gt:表示“>” 在BootStrap中标记代码的标签使用<code>,标记代码块使用<pre>(里面的代码特殊标签必须转义) ...

  3. Android(java)学习笔记91:泛型接口的概述和使用

    package cn.itcast_06; /* * 泛型接口:把泛型定义在接口上 */ public interface Inter<T> { public abstract void ...

  4. shell(1)

    bash变量类别: 本地变量 : 又叫局部变量,仅对当前shell进程有效 环境变量 : 当前shell及其子shell,子子shell-. 特殊变量 : $?  上一个命令执行的状态,0表示执行成功 ...

  5. Mysql 死锁相关操作

    该随笔随时记录日常工作中遇到的关于mysql的死锁相关问题 1)查看mysql当前的处理线程(connection) mysql> show processlist; 2)杀掉对应的connec ...

  6. CF Error Correct System

    Error Correct System time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  7. applicationContext-mail.xml 模板

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  8. U-boot新手入门

    U-boot新手入门 一.编译U-boot 二.U-boot命令详解 1.帮助命令 # help autoscr -run script from memory base -print or set ...

  9. C#中显/隐式实现接口及其访问方法

    原贴地址: http://www.cnblogs.com/dudu837/archive/2009/12/07/1618663.html 在实现接口的时候,VS提供了两个菜单,一个是"实现接 ...

  10. 每天一道LeetCode--118. Pascal's Triangle(杨辉三角)

    Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Retur ...