Archive for the ‘PHP’ Category

29
Oct

Allowed memory size of X bytes exhausted

Posted by Marslert

Sample error,

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes)

Workaround

Increase PHP’s memory limit, either by adding:
memory_limit = 20M to your php.ini file (recommended, if you have access)
ini_set(’memory_limit’, ‘20M’); in your sites settings php file
php_value memory_limit 20M in your .htaccess file

The memory can adjust more than 20MB according to needs.