Forum: 

How to increase the availible memory for PHP web applications?

gaorenst's picture

I'm getting the following error when runninga query site i set up.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 19922944 bytes) in /usr/share/Usuniver/components/com_sef/cache/shCacheContent.php on line 22461

How and where do I go to increase the memory.  I tried setting it in the unver Virtual server options and then processor and limits.  I'm not sure if that is the correct place or if I did it correcty.

Thanks in advance for the help.

Liraz Siri's picture

You need to raise PHP resource limits. You can do that through the Webmin administration interface.
 
System >> PHP configuration >> Manage >> Resource limits.
gaorenst's picture

does it read in bytes or megabytes. I also get the following error when trying to chante it. Failed to save resource limits : Could not find any values in section PHP
Liraz Siri's picture

32M == 32 megabytes

I just booted into TurnKey Joomla and raised the resource limits from 32M to 64M through Webmin. It didn't give me that error.

If that is giving you trouble you can edit /etc/php5/apache2/php.ini manually and set:

memory_limit = 64M
gaorenst's picture

thanks that worked.
Ayush Shrestha's picture

It really works  thank you very much Liraz Siri

Post new comment