Home > Article > Backend Development > How to solve strict standards php error reporting problem
strict standards Solutions to PHP errors: 1. Define the inherited class after the parent class; 2. Add "error_reporting(~(E_STRICT | E_NOTICE));" to the "setup-config.php" file.
The operating environment of this article: Windows 7 system, PHP version 5.3.3, Dell G3 computer.
How to solve the strict standards php error problem?
Solution to Strict Standards error in PHP
Installing wordpress 3.0.1 in PHP5.3.3, an error occurred during installation:
Strict Standards: PHP Strict Standards: Declaration of Walker.... Solution:
Error message:
Strict Standards: PHP Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with that of Walker::start_lvl() in E:\Webroot\wordpress\wp-includes\classes.php on line 1199 PHP Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with that of Walker::end_lvl() in E:\Webroot\wordpress\wp-includes\classes.php on line 1199 PHP Strict ........
Cause of error:
This is due to PHP version 5.3. It is required that inherited classes must be defined after the parent class. Otherwise, the error message Strict Standards: PHP Strict Standards: Declaration of .... should be compatible with that of .... will appear. That is to say, the parent class must be first and the inherited class last.
Error reference page.
bugs click php click net/bug.php?id=46851 (You cannot publish URLs with links) The specific reasons for such errors are clearly explained above.
Solution:
In the wordpress3.0.1 file, find the wp-admin\setup-config.php file.
Add a sentence above require_once('../wp-includes/compat.php');:
error_reporting( ~(E_STRICT | E_NOTICE));
Problem solved.
This sentence means error reporting settings: display all errors, except strict error checking or error reporting. In other words, PHP5.3.3 does not implement strict error checking. No error message is displayed either. Skip strict error checking.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to solve strict standards php error reporting problem. For more information, please follow other related articles on the PHP Chinese website!