Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem of strict standards php error reporting

Shulou Source: shulou.com Published: 2022-06-02 07:20:38 09月17日 Update

This article is to share with you about how to solve the problem of strict standards php error. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The solution of strict standards php error report: 1, define the inheritance class after the parent class; 2, add "error_reporting (~ (E_STRICT | E_NOTICE));" to the "setup-config.php" file.

This article operating environment: Windows7 system, PHP5.3.3 version, Dell G3 computer.

How to solve the problem of strict standards php error reporting?

The solution of Strict Standards error in PHP

When installing wordpress 3.0.1 in PHP5.3.3, an error occurred during installation:

Strict Standards: PHP Strict Standards: Declaration of Walker. The solution is:

An error message appears:

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 the release of php 5.3. Requires that the inherited class must be defined after the parent class. Otherwise, Strict Standards: PHP Strict Standards: Declaration of will appear. Should be compatible with that of.... The error prompt of. In other words, the parent class must come first and the inherited class must come after.

Error reference page.

The specific reason for this kind of error is clearly explained on the bugs point php point net/bug.php?id=46851 (the URL with links cannot be published).

Solution:

In the wordpress3.0.1 file, locate the wp-admin\ setup-config.php file.

Add a sentence to require_once (& # 39 position...).); add a sentence above:

Error_reporting (~ (E_STRICT | E_NOTICE))

Problem solved.

Error reporting settings: all errors are displayed, except for strict error checking or error reporting. This means that PHP5.3.3 does not perform strict error checking. No error message is displayed. Skip strict error checking.

Thank you for reading! This is the end of the article on "how to solve the problem of strict standards php error reporting". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Errors problems methods documents tips checks that is content reasons reports more articles references good practical clear meaning articles methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info Shulou Information Microsoft NVidia