Support » Fixing WordPress » Error messages after upgrading to 3.4.1

  • My hosting company upgraded their php, so my site was getting all sorts of error messages. So, I make a backup of all my content, deleted the wp-admin, wp-includes and loose files in html, then uploaded 3.4.1 of WordPress.

    I got a bunch of errors at that point, so via e-mail I went into my plugins folder and renamed them. That caused my of the messages to go away.

    Now, I’m left with just two errors.

    On the front page, I get this error, even though the page loads successfully:

    Strict Standards: Redefining already defined constructor for class WP_Widget in /nfs/c05/h04/mnt/73941/domains/ on line 93

    When I go to wp-admin however, the page does NOT load and I see only this:

    Strict Standards: Redefining already defined constructor for class WP_Widget in /nfs/c05/h04/mnt/73941/domains/ on line 93

    Warning: Cannot modify header information – headers already sent by (output started at /nfs/c05/h04/mnt/73941/domains/ in /nfs/c05/h04/mnt/73941/domains/ on line 881

    I was actually just on the phone with my hosting company, and he very kindly looked at this for about an hour. He was focusing on it being a bug in 3.4.1 – but it seems the fact that the admin doesn’t load would have been noticed. =)

    So I assume it is something in my set up. But since I deleted most files, I can’t see what it would be.

    Any help or just pointing me in the right direction would help. Thank you!


Viewing 6 replies - 1 through 6 (of 6 total)
  • Has anyone else had a similar problem? I just have trouble believing this is a default WordPress problem?

    Moderator t-p


    have you tried:

    -deactivating ALL plugins (yes, all) temporarily to narrow down the problem. If the problem goes away, re-activate them individually (one-by-one) to find the problematic plugin(s). If you can’t get into your admin dashboard, try resetting the plugins folder by FTP or phpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems (because the hooks remain unless plugins completely removed or some plugins stick around in cached files. So by renaming the folder, you break them and force them inactive). If applicible, also remember to deactivate any plugins in the mu-plugins folder. The easiest way is to rename that folder to mu-plugins-old

    -switching to the unedited default theme (Twenty Eleven) for a moment by renaming your current theme’s folder in wp-content/themes. The idea is to force WordPress to fall back to the default theme to rule out any theme-specific issue.

    I am having the same issue, I think it is probably a bug in PHP –

    Unfortunately I get a compile error when I try to rebuild PHP, so I can’t check if the latest PHP version gets rid of this error message. But I think it should do.

    If you’re getting this error on your live server, you should probably change the php.ini directive display_errors to off. The exact way to do this depends on how your webhost has PHP set up, so check their help docs if you’re not sure. Doing this does not fix the error, but does hide it.

    Finally got my PHP upgraded, and still got the same error. I read that PHP bug report a bit more carefully and realised what the problem was. This is a bug in wordpress – the PHP4 constructor is declared before the PHP5 constructor.

    To get rid of this error, you need to edit the wp-includes/widget.php file. Find the class WP_Widget (line 24). Scroll down and find // Functions you'll need to call. (line 71). Just below this is the PHP4 constructor, followed by the PHP5 constructor. Swap these two functions round, so that the PHP5 constructor comes first, i.e.

    To be honest, I’m not sure why a PHP4 constructor is even included since wordpress isn’t meant to be compatible with PHP4 any more.

    Thank you very much djeyewater, helps a lot. I only saw this error once I started using register_shutdown_function to catch any fatal errors WordPress might generate. Wasn’t appearing anywhere in the logs before.

    See #20801 for details about the WP_Widget notice and a proposed patch.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error messages after upgrading to 3.4.1’ is closed to new replies.