php: increase memory limit

Categories: php, unix, apache2

Tags: memory, php

errors like ‘allowed memory size of x bytes exhausted’ or ‘zero size reply’ usually means there’s not enough memory allocated for php. you need to increase the value.

if you have admin access, you can edit /etc/php.ini, locate and update ‘memory_limit’ to values like 16M, 32M, 64M. this change is global to the system. restart apache after update.

if not, add this in php script:

PHP:

ini_set("memory_limit""32M");

Affliates

Spreadfirefox Affiliate Button