WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Attack of the PHP Fatal Errors (5 posts)

  1. Anne
    Member
    Posted 11 months ago #

    We upgraded our site to 3.6 about a week ago...it ran great for the first couple days and now everything is falling apart.

    When I try to access the main site or control panel I get a 500 server error:

    The website encountered an error while retrieving http://www.site.com/. It may be down for maintenance or configured incorrectly.

    So I checked the error logs and found these 5 unique error messages:

    PHP Fatal error: Cannot redeclare has_shortcode() in /.../wp-content/themes/cadenzaNew/functions.php on line 426
    PHP Fatal error: Cannot redeclare has_shortcode() (previously declared in /.../wp-includes/shortcodes.php:153) in /.../wp-content/themes/cadenzaNew/functions.php on line 445
    PHP Fatal error: Call to undefined function add_filter() in /.../wp-includes/class-wp-embed.php on line 20
    PHP Fatal error: Cannot redeclare class WP_Embed in /.../wp-includes/class-wp-embed.php on line 9
    PHP Fatal error: Call to undefined function add_shortcode() in /.../wp-includes/class-wp-embed.php on line 23

    Obviously the biggest problem here seems to be caused by the add_shortcode function, but I'm not sure how to resolve it.

    So far I've tried...
    - renaming .htaccess to .htaccess-old
    - uploading a clean .htaccess file
    - turning off plugins
    - turning off cadenzaNew theme
    - uploading clean versions of wp-admin and wp-includes (after deleting old version)
    - going back to WordPress 3.5
    - re-uploading everything from a site backup from the day before everything started messing up
    - trying to fix add_shortcode in wp-settings.php, class-wp-embed.php, and functions.php

    But the answer seems to be going right over my head. I'm really at a loss as to what else to do.

    Any help is appreciated, thanks!

  2. Tara
    Member
    Posted 11 months ago #

    Have you tried switching to the deafult TWENTY TWELVE theme with the plugins folder reset?

  3. greendemiurge
    Member
    Posted 11 months ago #

    Who is hosting it and what version of PHP are you running? Is it a Windows or Linux Server?

    If you aren't sure you can create an info.php file in the root with the following code:

    <?php phpinfo(); ?>

    That will tell you which version you are running. I personally have had erratic behavior with PHP 5.2.x and WordPress, so getting it on PHP 5.3 or higher may help.

  4. Anne
    Member
    Posted 11 months ago #

    Tara: I did deactivate the plugins folder and try switching themes, but had no luck with that.

    greendemiurge: It's hosted on GoDaddy, running 5.3 on Linux.

    We were able to fix the problem by rebuilding the theme and replacing the add_shortcode function, then doing a complete reinstall of WordPress.

    As soon as we fixed it, an update to WordPress 3.6.1 was available...

  5. Tara
    Member
    Posted 11 months ago #

    Glad you fixed the problem :-)

Reply

You must log in to post.

About this Topic