Author: lgasslein
Description:
After installing, I went to the config page (config/index.php) by following a link to configure my
wiki as instructed. I entered in the data as requested (db user, sysop account, etc.)
After submitting the form, a check is done on the memory_limit INI variable in /etc/php.ini... I had
this variable set to -1 (which means give PHP unlimited memory.) This check, which occurs starting
at line 244 of config/index.php, determines if the memory_limit is greater than 20 MB. If not, then
these two things occur: ini_set( "memory_limit", "20M" ) AND $conf->raiseMemory = true; - the second
line writes to the LocalSettings.php file.
Now, when I went to run rebuildall.php to get my links up to date, rebuildall.php will always fail
because it reads LocalSettings.php (via inclusion of commandLine.inc) to get the value of the
memory_limit INI variable. The value during execution of rebuildall.php will be 20M, (because of
line 12 - "ini_set( 'memory_limit', '20M' );" - in LocalSettings.php, written during
configuration)... and 20M is NEVER enough to run rebuildall.php - it will die with "Fatal error:
Allowed memory size of x bytes exhausted at x (tried to allocate 43 bytes)"- where the first x is 20
MB. I have found that for the current database dump, the cur table has almost 1.5 million records
and at least 300MB is required.
It took me a while to track this down. I know it's unusual to have memory_limit set to -1
in /etc/php.ini, but the config/index.php code should account for that possibility anyway. I do not
want my memory limit to be 20 MB for rebuildall.php, I want it to be unlimited. I think the problem
could be solved by just adding a case into config/index.php that checks for the special case of
unlimited memory (-1), instead of just checking that the value of memory_limit is not empty, and
that it is greater than 20MB.
Thanks for your time!
-->Laura Gasslein
Version: 1.4.x
Severity: normal