Skip to content

Fatal error:Allowed memory size of xxxxx bytes exhausted (tried to allocate xxxx bytes) in on line

You may have encountered an error more similar to the below one very often

Allowed memory size of 134217728 bytes exhausted (tried to allocate 102400 bytes) in on line

If you ever encounter an error like this, just try to add a line like shown below at the top of your script


This will set memory to be used by the script at 32MB instead of the default value that’s in You can also do the same by changing php.ini