• Home
  • Download Free eBook
  • OC Archives
  • Tools I Use
  • Webmaster Forum
  • Write For Us
Logo

  • Discounts
  • SEO Central
    • All other Search
    • Bing
    • Google Central
    • Yahoo
  • Social Networks
    • Digg
    • facebook
    • Squidoo
    • Technorati
    • Twitter
  • Web Design & Development
    • Ajax
    • Coding
    • Database
    • Graphic Design
    • Joomla
    • jQuery
    • OScommerce
    • Photoshop
  • Webmaster Central
    • Author's Corner
    • Case Studies
    • Content Writing
    • Featured Interviews
    • Guest Posts
    • Make Money Online
    • OC Promos
    • Premium Reviews
    • Video Tutorials
    • Web Hosting
    • Web News
    • Web Security
  • Wordpress

How to solve Fatal error: Allowed memory size exhausted in PHP

Posted by Joshu on Dec 5, 2009 in Tutorials, Web Security, Wordpress | 0 comments

How to solve Fatal error: Allowed memory size exhausted in PHP

All of a sudden one day i found that one of my Blogs crashed while installing a plugin  saying “Allowed memory size exhausted”

I quickly searched on Google and found that this error is caused by insufficient memory allocation in php.ini file. A standard server (linux box) setup comes with 8M memory and we need to increase this to avoid these types of errors.

Error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 8192 bytes) in/home/orangecopper.com/wp-content

So i contacted my hosting company and they informed me that since i am on a shared hosting i had a limit on the amount of memory i can use. Initially i was a lil sad, but the limit was not bad !! the one i was using and crashing was 8 MB while the limit i could use was a comfortable 40 MB , for some host its 24 and some its commonly 32MB.

For those of you who use shared hosting the quick solution would be to add a line in .htaccess file located at your root folder OR creating a php.ini file in your root
Method1

Add a line in .htaccess file located at your root folder  php_value memory_limit 24M here 24M is an example and most of the times this is enough to get your site back, contact your host support if this doesn’t work.

First step for this is to locate your php.ini file in the server and to see what is the memory limit (this is shown in the error message). Create a file with the below code and name it something like “test.php”
view sourceprint?
1.<?php phpinfo(); ?>

Upload this file to your site root and point your browser to this file, now it will show the phpinfo of the server, in this you will find “Configuration File (php.ini) Path: /usr/local/lib/php.ini”, this is your php.ini location. You can find the memory limit also in this page “memory_limit: 8M”

Method2

create a php.ini file in the root folder and add a line in it : memory_limit=40

Now your site should be up, let me know if this helped, i dont spending more time helping you guys, so feel free to add questions


Related Articles You Are Probably Interested In:

  1. 500 Internal Server Error after upgrading WordPress
  2. Fatal Error on WordPress 3.3 Version Upgrade
  3. ’500 Internal Server Error’ in WordPress & the Solutions
  4. .htaccess – All you wanted to know and much more!
  5. Could not connect to the database error in WordPress
  6. How to avoid 404 Page not found errors on your website
  7. Tutorial: How to Disable or Limit or Delete Autosave Post-Revisions in WordPress
  8. How to Transfer a WordPress Blog to a new Server

No Responses to “How to solve Fatal error: Allowed memory size exhausted in PHP”

Trackbacks/Pingbacks

  1. uberVU - social comments - Social comments and analytics for this post... This post was mentioned on Twitter by orangecopper: How to solve Fatal error: Allowed ...

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

*

*

CAPTCHA Image
Refresh Image

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 Subscribe to OC Blog! 

Subscribe to OC Blog

Stay tuned to the Latest updates and tips in the Webmaster World




Most Popular Posts

  • List of High PR do follow blogs (Verified) (305)
  • Next Google Page rank - PR update 2011 (278)
  • Market Samurai Discount – Save 80 USD! (234)
  • 300 High paying adsense keywords 2011 (104)
  • List of High PR Dofollow Directories 2011 (88)
  • 22 OpenSource Forum Scripts - Details and Download: update list (82)
  • Best Classifieds Ads Scripts (75)
  • How to modify the Wordpress comment Form (65)
  • Review of the List of the Best Social Networking websites 2011 (61)
  • List of 200 Highest paying Adsense Keywords : Updated list 2010 (44)
  • 10 Best Premium Wordpress Plugins (43)
  • Featured Interviews: Harsh Agarwal from ShoutMeLoud.com (43)
  • Elegant Themes Discount 2011 (Save 10 USD) (42)
  • List of all Top Social Networking websites as on 2010 (38)
  • One of the Biggest SEO Secret for Linkbuilding (37)
  • 14 Best Ajax Scripts to use for any website (37)
  • Download KeywordLuv WordPress Plugin (37)
  • How i earn Big Bucks from my blog Doing Nothing! (37)
  • Fatal Error on WordPress 3.3 Version Upgrade (37)
  • 30 Best wordpress Plugins required for Any WP Blog (36)
About OrangeCopper Network 

Who am I? Am Joshu. I enjoy blogging about webmaster related stuff and technology. Xtras - I Design, Develop, Blog and Support the Open Source. Passions: I Love Music, Photography, Design, Development, Cycling, Travelling and sleeping (Favorite)

What i could do for you: Ive been working on various shades of the web for over 11 years now and learned the hard way, Now i could help you learn it the Easy way. OrangeCopper is a Webmaster community that i started in the year 2002 and is now a platform for webmasters around the world. Thankyou for spending your time to visit Blog. I would love to get connected every webmaster reading this, follow me on Twitter and i would auto follow you. Thanks again, Happy Surfing!

Interested to Learn Professional Blogging? Check out my NapIncome Blog where I share all the secrets to build a professional blog and earn money from ProBlogging.

Please Subscribe to the Blog Newsletter to get regular weekly update
Twitter: http://www.twitter.com/orangecopper | Subscribe to feeds : http://feeds.feedburner.com/orangecopper/ilRl

Other OrangeCopper Network Websites

ConnectRing Web Directory | UsedMobiles.in | UsedGadgets.in | NapIncome Strategy Blog | HippieMonk Technology Blog | All Good WordPress Themes | PixelTribes Photography Blog | Yscream Web Hosting

Favorite Articles

  • List Of Best Classifieds Ads Scripts Ever (Free & premium)
  • How to triple your Blog Subscription rates / opt-ins – It Worked for me!
  • You can certainly spend Half a Dollar For creating a GREAT Blog
  • How i earn Big Bucks from my blog Doing Nothing!
  • 35 best free wordpress themes for download: updated list 2010
  • 22 Web 2.0 Colors and their codes in HTML
  • 48+ web Design Related Twitter Accounts To Follow
  • Make a web 2 icon with Photoshop in easy 8 steps
  • List of 62 Free Press Release websites

    Most Rated Articles

  • Compare WordPress – Joomla – Drupal and their features
  • 7 Excellent jQuery menus and jQuery examples and downloads
  • 5 Most Important To Do s for a New Blog Launch
  • How to colorize with adobe Photoshop
  • Free Magento Themes / Templates Download: updated list
  • How to install wordpress step by step tutorial
  • List of 200 Highest paying Adsense Keywords : Updated list 2010
  • How to display Exit Splash or Exit message for website
  • How to promote your old Blog posts