Fatal Error Repair – WordPress 2.8 Upgrade

by Todd on June 13, 2009

  • Share
  • CevherShare
  • Share

wordpresslogo The new upgrade for WordPress 2.8 is everywhere on the internet.  I received an email today on my handheld from Chris Pearson, the author of the Thesis Theme, talking about his upgrade 1.5.1 to run with the WordPress 2.8.  He explained all the powerful benefits included with this upgrade and as soon as I got home I checked my twitter account and it was all over twitter so I thought, I need to upgrade tonight.

My greatest fear of an upgrade came true when I received the fatal error message.  It was an easy fix though and here is how I did it.

Here is the message I received.

Fatal Error Message  :  Allowed memory size of 38720439 bytes exhausted  public.html/wp-includes/http.php

I found this error message can occur in PHP script that was previously functioning correctly. This is usually caused by some excessive memory requirements being demanded from the system.   When performing an upgrade the new version sometimes needs a bit more memory than the old version and therefore the error occurs many times during an upgrade.

The fix is pretty easy with the right tools.  It’s always about the tools.

Here is what you need.

File Zilla –  This is a free FTP (File Transfer Protocol) software.  If you don’t have it and don’t have an FTP that you use.  Get it now

Notepad ++ – This is a free source code editor.  This will allow you to make changes to your code files and give you the ability to customize your wordpress themes.  If you don’t have a source code editor, get this one now.

Once you have these two programs on your computer or programs that can perform the same tasks as these two, we are ready to proceed.

The first thing we need to do is link into your file folder on your website with File Zilla.

Now, I just needed to follow the error message I received to the file where the problem was occurring. The error message was – public.html/wp-include/http.php.

So on server side of the File Zilla I open the

public.html -   then go to wp-include and finally find the http.php file.

Once I have located the http.php file I open a temporary folder (this is a folder I have created to just hold the file while I work on it – you can call it anything you want) on the PC side of File Zilla and slide the http.php file over so it copies it to my PC. You want to make sure you know where the folder is on your system so you can find it easily for the next step.

*** This is an amendment to the post ***

You can also add this code to wp-includes/cache.php.

This is a cleaner way to correct the problem.

Now that I have the file on PC side – I open the Notepad ++ tool – I locate the folder I have the file stored in and navigate to the file and open it in the Notepad ++ program.

Once its open and I am looking at the code there is a tag at the very beginning

<?php

This indicates the beginning of the script.  All I need to do is insert this line

ini_set("memory_limit","40M");

after the opening tag  —   <?php

Then save the file – go back to File Zilla and refresh to make sure the change is current in File Zilla and then slide it back over to the server side.

The reason I chose 40M is because that allowed me to adequately exceed the amount of memory needed to run the script.  I determined this from the error message.  You might not need that much or perhaps you will need more.  Regardless, you will put a number suited to your particular needs.

Danger Will Robinson: Sometimes the server will have a problem with too large of a memory increase.  My problem occurred due to an upgrade.  If you are receiving this message on an ongoing basis there might be other issues involved and merely changing the memory size allowed is a band-aid instead of stitches repair.

Now you just go back and run the script or whatever you were trying to accomplish when you received the error.  In my case I proceeded with the upgrade of WordPress 2.8 and everything else went smoothly.

If you found this post helpful or wish to add any helpful hints, please leave a comment below.

See you next time and

Happy Blogging

{ 5 comments… read them below or add one }

PitchSlap June 30, 2009 at 7:56 am

I had the exact same error comng up and tried to get advice from the ‘experts’ at wordpress forums and their expert advice was to manually install. That kind of defeats the object of automatic upgrades doesn’t it?

Its much easier to use this solution, it took me 2 minutes and I was happily upgraded to 2.8. Thanks for the tip and clear explanation, couldn’t of made it easier!

Thanks again

Reply

Todd June 30, 2009 at 6:56 pm

PitchSlap, Glad I could help you out, thanks so much for the comment.

Reply

Jeff January 16, 2010 at 11:57 pm

Hi Todd.
Thanks for all your hard work and research. I got the fatal error message too. I simply followed your instructions and now it’s fixed. Thanks again
Jeff

Reply

improve pc speed April 20, 2010 at 9:03 pm

I am getting an error:

Fatal error: Call to undefined function get_current_site() in /home/modernap/public_html/loyafamily.com/wp-content/plugins/bp-registration-options/bp-registration-options.php on line 23

Any ideas?

Reply

Todd June 16, 2010 at 5:53 pm

The plug in Buddy Press is not compatible with your upgrade.

Reply

Leave a Comment

Previous post:

Next post: