Last modified: 2014-06-11 15:04:47 UTC
<^demon|busy> sumanah: I don't have time for it today, but this is something we should look at later: how to deal with the installer if memory_limit is too low to load installer i18n.
Today a sysadmin tried to install MediaWiki and got the error: "Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 1966080 bytes) in /home/a8130601/public_html/wiki/includes/installer/Installer.i18n.php on line 7114" Solution Chad suggested: "At the very top of mw-config/index.php, add the following: ini_set( 'memory_limit', '100M' ); (Right after the <?php, that is) And you're also going to want to add a similar line to your LocalSettings.php, after you've finished installing." I presume this is one of the situations Chad wants us to eventually address. :)
That's the exact scenario. Basically, if your memory_limit is too low, you could fail to get past the initial installer page (where you select your language) to where we complain about memory_limit being too low during environment checks. We should probably silently raise it for the installer (if we can, more below). We should still warn at the environment stage that we're raising the limit, so people are aware their php.ini memory_limit is too low and it's being overridden. If you're on a super-locked-down host (ini_set() is disabled, etc), there's nothing we can do if your memory limit is too low. Best case would be to detect this scenario and bail immediately with an error.
As this came up on IRC today: This is also covered in https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms#Fatal_error:_Allowed_memory_size_of_nnnnnnn_bytes_exhausted_.28tried_to_allocate_nnnnnnnn_bytes.29
>And you're also going to want to add a similar line to your LocalSettings.php, >after you've finished installing." Note, we already raise the memory somewhat in Setup.php which is run right after LocalSettings.php. See $wgMemoryLimit wfMemoryLimit() in GlobalFunctions.php.
Doesn't the move to json files in MW 1.24 fix this issue?