Fatal Error: Allowed Memory Size Exhausted.





Ooooh yeah! I am back. Definitely I’m back. Back to the blogosphere. 5 days ago or better yet Wednesday my body clock started to spin off control. To begin with, I went home late Tuesday night, never got a decent sleep, woke up 2am Wednesday for a meeting with my Manager and only to find out after the meeting that I have to go home because all Supervisors and Managers will have a Training with the Clients Wednesday night. Oh well, goodluck body clock. Anyway, Wednesday morning moved so fast I didn’t know its already 12noon. Chitchat in the office pantry made the morning so quick that I had to rush home to prepare for Training. I forced myself to sleep but to no avail and to add - I almost had an argument with my super inconsiderate and noisy housemates. Can you just imagine I was rolling and rolling on my bed trying to go off to Lala-land and they were too busy laughing in front of the freakin’ TV watching Wowowee. Grrrr. I had to shout a couple of times and slam the door before they all shut up. Grrrr.  Oh well, as they say “Familiarity breeds contempt” and the better we know people, the more likely we are to find fault on them. *sigh*

Anyway, moving on to Thursday. I was about to make a blog entry when an error on my wordpress dashboard appeared. A Fatal Error keeps on displaying on the browser each time I log-in. So sad that I can’t even check my dashboard and reply to the comments. *sigh* and to add to my sadness – I don’t have the luxury of tweaking and finding a solution to the Fatal Error. We still have training on a Thursday night and I had to gracefully exit the DigitalFilipino Club earlier than supposed to be. *sigh*

Friday came so fast that I barely slept because the training started earlier than usual. I guess all other Supervisors from my account felt the same way too. Saturday came very uneventful as it was supposed to be my restday – my one and only restday but we were scheduled for another 2-hour training session. *sigh*



And Sunday. I was up early for work and suddenly a light bulb was on me telling me to check the error again and try to decipher the error of which in just less than 30 minutes of studying PHP codes I was able to login successfully to my wordpress dashboard. Whoaa…How Brilliant of me. Lol. Thanks to the WordPress Forums and other online resources. Lol.

So, the brilliant that I am will now share how I tweaked my blog and solve the Fatal Error.

 

Fatal error: Allowed memory size of — bytes exhausted (tried to allocate — bytes) in file/of/file/here/file_in_error.php

 

Here are the 3 effective solutions.

  • On your .htaccess add the code below. The code will automatically increase the memory allocation on all PHP files on your site.

php_value memory_limit 35000000 

  • On the PHP file in error, you can paste the code below. This code will increase the memory allocation of the PHP file in error.

ini_set(”memory_limit”,”20M”); 

  • You can also add the code below to the PHP.INI file on your site. But you need to look for the code ” memory_limit: ” and change/increase the value.

memory_limit: 20M 

Reminder:
-For Solutions 1 and 2 please paste the code on the top of the PHP File.
-You can change the value of the memory limit until you no longer see the error. Its your choice. lol.

Cheers!

 





Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Related posts:

  1. Callcenter Booboo #4
  2. blog at work 2
  3. blog at work 1
  4. DigitalFilipino Club Fellowship Night in Cebu City
  5. 15 Things.