Home Hosting Domains IT Services Support Contact Us
MyAccount PortalClient AreaAnnouncementsKnowledgebaseSupport TicketsDownloads

Knowledgebase
You are here: MyAccount Portal > Knowledgebase > Web Development & Coding > I receive a "Fatal error: Allocated memory size of" when running my PHP script. How do I increase the PHP memory limit?

I receive a "Fatal error: Allocated memory size of" when running my PHP script. How do I increase the PHP memory limit?

If you have seen an error like “Fatal Error: PHP Allowed Memory Size Exhausted” in apache logs or in your browser, this means that PHP has exhausted the maximum memory limit

This is the simplest and most obvious method. You just create a php.ini file within the root directory of your site and add a line for memory_limit to whatever you need.

For example:

memory_limit = 16M

This should resolve your issues, but if it still does not, increase the limit to 32M and so on, but take into account that if you set your limit too high, you may exceed the allowed resource usage as per our Terms of Service if a PHP script uses too much memory.


Therefore, we recommend setting to no larger than 64M



Was this answer helpful?

Add to Favourites
Print this Article

Also Read


Network Status Client Area Knowledgebase Datacentre  
 
Terms of ServicePrivacy PolicyCustomer Security