PHP Fatal Error message Out of memory.

Avatar
  • Answered
Hello Team,
Could you please kindly shine me some light on the PHP out of memory error?
I have a local PHP.ini setup with memory_limit set to 512. I have redirect the error log to ~/public_html/logs/my_php_error.log

What puzzle me is the error message we get is something similar to the one below
"[19-Jun-2013 07:14:30 America/Los_Angeles] PHP Fatal error: Out of memory (allocated 45875200) (tried to allocate 72 bytes) in ..."

We have validate our memory setting using phpinfo() and confirm the memory_limit is set to 512. We also use a memory script to test the memory actually can went up to 512M. However, the error indicate a fatal error of out of memory, allocated 45875200 (about 43.7 MB)

Can you please help address the issue? thanks
Avatar
Scott
Hello CanopyValley, When you change the settings in the php.ini file, they will only function for the files in that particular folder. The subfolders do not abide by the changes in the php.ini unless you have it set to be recursive. You will need to set the php.ini to be recursive via the .htaccess file. This will pass the 512MB limit to all folders under the public_html folder. Give that a try and see if it helps with the memory error. Best Regards, Scott M