WordPress errors with PhP Upgrade

I offered to host my cousin’s actor profile website on my web hosting account. He had someone create a wordpress site and store it on my account. It was working fine on PhP 5.2, however my host provider has phased it out. Now that i’m forced to use either PhP 5.3 or PhP 5.4, I get a number of errors.

If anyone knows if/how this can be fixed can you please let me know? He depends on this site to get work and i’m frustrated that I can’t find the answer and fix it myself.

Using PhP 5.4 I get the following errors above the content of the page:

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 576

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 593

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 687

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/naumovski/tonynaumovskirotino.com/wp-includes/classes.php on line 710

Strict Standards: Redefining already defined constructor for class wpdb in /home/naumovski/tonynaumovskirotino.com/wp-includes/wp-db.php on line 58

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 99

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 404

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/theme.php on line 576

on PhP 5.3 I get the following errors:

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/cache.php on line 99

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/naumovski/tonynaumovskirotino.com/wp-includes/theme.php on line 576

Solutions Collecting From Web of "WordPress errors with PhP Upgrade"

Your WordPress install is out of date. Upgrading to the latest version ( 4.0.1 at time of writing ) should fix those issues, while fixing hundreds of other bugs and security issues.

As a side note, you should always keep both your PHP and WordPress installs at the latest versions. Select PHP 5.4, and move to 5.5 and 5.6 as they become available. They fix security issues in PHP and bring major speed improvements.

What version of WordPress? It’s late and I’m tired but basically, the code is out of date. The site must be ancient. 5.2 was released in 2006 and 5.3 in 2009. As the only variable that’s changed is the PHP version, I’m confident it’s that. Time for a rewrite perhaps.

Short Term Solution

As per the answer at: https://stackoverflow.com/a/9984309/1983389 you can suppress the warning messages via changes to your php.ini or .htaccess file.

In your php.ini change

error_reporting = E_ALL

to

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

If you don’t have access to the php.ini, you can potentially put this
in your .htaccess file:

php_value error_reporting 30711

This is the E_ALL value (32767) and the removing the E_STRICT (2048)
and E_NOTICE (8) values.

It sounds like you have already checked but some web hosting control panels allow you to choose an older version of PHP which would also solve the issue.

Long Term Solution

From a security point of view it is obviously best to keep up to date with newer versions of WordPress and PHP and hopefully the above short term solution will buy you some time to plan and execute the required updates.