Wednesday, September 08, 2010

PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in /var/www/html/mediawiki/includes/Exif.php

Have you ever gotten an error like this:

PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes) in /var/www/html/mediawiki/includes/Exif.php on line 1018, referer: http://my.favorite.wiki.info/mediawiki

Well, do not worry, here is how you can fix it ... Just edit the LocalSettings.php for your wiki, and change the line that says "ini_set( 'memory_limit', '20M' );" to something like "ini_set( 'memory_limit', '32M' );".

Don't you just love magic numbers in your code?

No comments: