操作系统: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
|