架构师_程序员_码农网

 找回密码
 注册[Register]

QQ登录

只需一步,快速开始

查看: 7689|回复: 3

[建站知识] X3.2运行后php日志提示:PHP Strict Standards

[复制链接]
发表于 2015-12-4 12:25:31 | 显示全部楼层 |阅读模式

操作系统:win2008 R2
PHP版本:v5.4.32
MySQL版本:5.5.39 开启wincache和memcache

以下几条日志每天重复出现,时间不固定:
----------------------------------------------------------------------

PHP Strict Standards:  Declaration of table_forum_post::update() should be compatible with discuz_table::update($val, $data, $unbuffered = false, $low_priority = false) in bbs\source\class\class_core.php on line 113

PHP Strict Standards:  Declaration of table_forum_post::delete() should be compatible with discuz_table::delete($val, $unbuffered = false) in bbs\source\class\class_core.php on line 113

PHP Strict Standards:  Declaration of table_forum_post::insert() should be compatible with discuz_table::insert($data, $return_insert_id = false, $replace = false, $silent = false) in bbs\source\class\class_core.php on line 113

PHP Strict Standards:  Declaration of table_forum_post::fetch() should be compatible with discuz_table::fetch($id, $force_from_db = false) in bbs\source\class\class_core.php on line 113

PHP Strict Standards:  Declaration of table_forum_post::fetch_all() should be compatible with discuz_table::fetch_all($ids, $force_from_db = false) in bbs\source\class\class_core.php on line 113

PHP Strict Standards:  Declaration of table_forum_post::update_cache() should be compatible with discuz_table::update_cache($id, $data, $cache_ttl = NULL, $pre_cache_key = NULL) in bbs\source\class\class_core.php on line 113

这是由于 php 5.3版本后。要求继承类必须在父类之后定义。否则就会出现Strict Standards: PHP Strict Standards: Declaration of .... should be compatible with that of .... 的错误提示。也就是说必须父类在前,继承类在后。可以修改bbs\source\class\class_core.php的第一句为:error_reporting(E_ALL & ~(E_STRICT | E_NOTICE));试试


在运行PHP软件时,如果遇到类似的错误,“Strict Standards”,不是错误,而是PHP5.3和之前的版本不太兼容。5.3之后的版本规定声明需要在使用之前。
  修改php.ini就可以解决,其实就是不显示出这个异常:
  
  原php.ini
  error_reporting = E_ALL | E_STRICT
  
  修改为
  error_reporting = E_ALL & ~E_NOTICE






上一篇:【ios开发系列教程夏天发布】秦朝史话视听小说IOS开发视频教程
下一篇:码农网2015年12月04日晚7点服务器维护通知!
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
发表于 2015-12-4 13:02:45 | 显示全部楼层
学习了
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
 楼主| 发表于 2015-12-4 13:05:54 | 显示全部楼层

QQ截图20151204130713.jpg

晚上试试这个方法可以不
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
发表于 2015-12-4 13:10:48 | 显示全部楼层
小渣渣 发表于 2015-12-4 13:05
晚上试试这个方法可以不

原来还没验证
码农网,只发表在实践过程中,遇到的技术难题,不误导他人。
您需要登录后才可以回帖 登录 | 注册[Register]

本版积分规则

免责声明:
码农网所发布的一切软件、编程资料或者文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:help@itsvse.com

QQ|手机版|小黑屋|架构师 ( 鲁ICP备14021824号-2 )|网站地图

GMT+8, 2024-5-2 15:01

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表