This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13136|Reply: 3

[Website Building Knowledge] After running X3.2, PHP log prompts: PHP Strict Standards

[Copy link]
Posted on 12/4/2015 12:25:31 PM | | | |

Operating system: win2008 R2
PHP version: v5.4.32
MySQL version: 5.5.39 Enable wincache and memcache

The following logs are repeated every day at an irregular time:
----------------------------------------------------------------------

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

This is due to the PHP version 5.3. Requires that the inheritance class must be defined after the parent class. Otherwise there will be Strict Standards: PHP Strict Standards: Declaration of .... should be compatible with that of .... error prompt. That is, the parent class must come first, and the inherited class must come later. The first sentence of bbs\source\class\class_core.php can be modified: error_reporting(E_ALL & ~(E_STRICT |). E_NOTICE)); Try


When running PHP software, if you encounter a similar error, "Strict Standards", it is not a bug, but PHP 5.3 is not very compatible with previous versions. Versions after 5.3 require a declaration before use.
Modification php.ini can solve the problem, but in fact, this exception is not displayed:

Original php.ini
error_reporting = E_ALL | E_STRICT

modified to
error_reporting = E_ALL & ~E_NOTICE






Previous:【iOS Development Series Tutorial Released in the Summer】Qin Dynasty History Audiovisual Novel IOS Development Video Tutorial
Next:Code Agriculture Network December 04, 2015 7 pm server maintenance notice!
Posted on 12/4/2015 1:02:45 PM |
learned
 Landlord| Posted on 12/4/2015 1:05:54 PM |



Try this method at night is not possible
Posted on 12/4/2015 1:10:48 PM |
Xiao Zhazha Posted on 2015-12-4 13:05
Try this method at night is not possible

It turned out that it had not been verified
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com