PHP, Troubleshooting

Fatal error: Allowed memory size of * bytes exhausted in PHP

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 128 bytes) in /home/yoursite/public_html/index.php on line 1051

The above error is caused by not having enough memory to execute the requested page.

You can adjust the memory limit at run time by specifying the following at the very beginning of your php file (eg: index.php)

ini_set('memory_limit','12M');

Or if you have access to php.ini configuration file of your server, you can change the memory_limit variable as follow and restart the web server.

memory_limit = 12M

[tags]memory limit, apache, php, config[/tags]

One thought on “Fatal error: Allowed memory size of * bytes exhausted in PHP

Comments are closed.