Hey, Would you like to work at Home ?? Just click here No need to pay, just register free and activate your account and get data Entry Work at your Home.

Wednesday, September 2, 2009

PHP Fatal error : Out of memory Problem

PHP Fatal error: Out of memoryProblem. Let see how to solve this problem using various techniques.


The first thing I could think of was to restart the Apache httpd service. This immediately solved the issue. but I knew this is not a permanent fix for the issue. When I researched further, I got to know that the
error comes when certain PHP scripts require more memory than PHP was allowed by default.


So the solution is to increase the memory allocated for

PHP. How to do that? There are 4 possible ways -


1. Try looking for the php.ini file. You might find some redundant php.ini files, so make sure you have got the one which is actually being read by PHP. o be sure, create a new php file in your root folder, say “check.php” and have phpInfo(); within the php open and close tags. Execute this file to get the information on where the php.ini is residing. Normally it will be in /usr/local/lib/php.ini


Open the php.ini file in a text editor like TextPad (not in Notepad) and change the values for memory_limit. By default you should see memory_limit = 8M. Try changing it to 12M. If it doesn’t work, increase it to 16M or even 24M and so on.


2. In case you can’t find the php.ini file or do not have access to it, then open up the file which was throwing the error (test.php in my case) and add a line below just after ini_set(’memory_limit’, lsquo;12M’);


3. You can even consider adding a line in .htaccess file which will resolve the issue.
php_value memory_limit 32M


4. Or else, Try adding this line to your wp-config.php file:

Increasing memory allocated to PHP
define('WP_MEMORY_LIMIT', '32M');


If none of the above things solve your issue, then talk to you host.


Note: I am now worrying on which PHP script required an increase in memory allocation. The analysis won’t be so easy though.

38 comments:

phpprobid customisation said...

Its highly informative. I would be visiting your blog hereafter regularly to gather valuable information.

web development company said...

Great post and very well written, that will really help you to learn Web Design, web development and SEO Strategies to help businesses web design company . You can find out many useful information about web design, seo and his work by visiting his blog and I Just wanna say thanks you for the information you have shared. Web Design Company India

Priya said...

Nice post dude, keep it up.
Price India

cheapcallstophone said...

Thanks for sharing very nice post
Web Design Company India

SEO Services said...

Really nice blog, very informative. Thanks dude for wonderful posting. Keep it up in the future as well. SEO Services UK

Web Design Company said...

Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck! Web Design Company

Web Design Company said...

Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck! Web Design Company

Web Developers Chennai said...

We are also one of the Leading Web Design Company in Chennai,our services are web design,web hosting,seo chennai,email marketing,website design,logo design,maintenance etc.please add my website to your blogger.it is very useful for us.

Price Trades said...

Man I like your post and it is so good and I am definetly going to save it. One thing to say the Indepth analysis this article has is trully remarkable.No one goes that extra mile these days? Bravo!! Just one more tip you canget a Translator for your Worldwide Audience !!!

Price Trades

Designer Jeans said...

Thanks for taking this opportunity to discuss this, I feel fervently about this and I like learning about this subject.

Alvin said...

Thank you for such a wonderful post. I enjoyed every bit of it.how to make soap at home

Home Decor said...

Very happy to see your article, I very much to like and agree with your point of view. Thank you for sharing.

Web Design Company said...

Thanks for taking this opportunity to discuss this, I feel fervently about this and I like learning about this subject.kids desks

Kevin said...

KidsDesk.net brings innovative products and educational resources to parents, caretakers and educators. With products ranging preschool to grade school age children.childrens furniture

Uk Ties said...

Man I like your post and it is so good and I am definetly going to save it. One thing to say the Indepth analysis this article has is trully remarkable.No one goes that extra mile these days? Bravo!! Just one more tip you canget a Translator for your Worldwide Audience !!!

Santosh said...

Interesting...
---------------
facebook history

strumpfhosen said...

This Blog is going places, the people, the layout, amazing to see such dedication and focus.

Harry said...

Felix Labs is a best web Design Company india, providing top flash web design services, website development services and 3d animation services. Get high quality website development and web design services from the experts.Web design company

Maninder Kaur said...

This is a good common sense article. Very helpful to one who is just finding the resources about this part. It will certainly help educate me. Web Designing Company

Dropship Wholesale said...

Thanks for taking this opportunity to discuss this, I feel fervently about this and I like learning about this subject.Dropship

SEO Los Angeles said...

This is a good common sense article. Very helpful to one who is just finding the resources about this part. It will certainly help educate me.

Oximeter for sale said...

Wow, this is the best site I’ve ever read. Thank you for sharing this.

Oximeter said...

It is so lucky to read your blog,it is full of useful message.I wish we both can do better in the future.
It great honour if you can visit our website,and give us some suggession.

Thermage chicago said...

Thank you, thats very interesting information. I need to share with my friends.

Cheap penny auctions sites said...

Another informative blog… Thank you for sharing it… Best of luck for further endeavor too.

Pantyhose said...

Interesting and important information. It is really beneficial for us. Thanks

SEO Services said...

Simply want to say your article is as surprising. The clearness in your post is simply great and i can assume you are an expert on this subject. Fine with your permission let me to grab your RSS feed to keep up to date with forthcoming post. Thanks a million and please continue the rewarding work.

Wholesale perfume said...

Thanks for ones marvelous posting! I seriously enjoyed reading it, you're a great author.I will be sure to bookmark your blog and definitely will come back in the foreseeable future. I want to encourage you continue your great job, have a nice day!

Argan Oil said...

Thank you to tell us so much useful information. So nice sharing. I’m glad to read it.

Zolpidem No Prescription said...

This is such a perfect resource that you are supplying and you also give it away for totally free. I appreciate seeing internet sites that realize the value of offering a prime resource for zero cost. I truly loved reading your post. Thanks!

battery world said...

Hey Very informative post. Thanks a lot for sharing such a nice post. Keep Sharing:)

where to buy essential oils said...

Fantastic article just about college! Without any doubts all of us meet any problems with thesis . It is specially problematic when you have another privilege in life. I have had the aforementioned troubles until I have observe a company providing experienced writing services

custom software said...

You made some good points .I did a little research on the topic and found that most people will agree with your blog.

Fridges Leicester said...

This is a good common sense Blog. Very helpful to one who is just finding the resources about this part. It will certainly help educate me.

SEO said...

Buy Sigma Lenses, Sigma Prime, Sigma Telephoto, Sigma Zoom, Sigma Fisheye Lens for Canon, Nikon, Pentax, Sony and Four Thirds Olympus, Panasonic from Microglobe in very cheap price.

Sign Installation said...

Interesting and important information. It is really beneficial for us. Thanks

web design company said...

Nice post thanks for sharing with us web design company

Web Design Company India said...

Thanks for sharing very nice post

Your Ad Here