Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Installation FAQ.
Memory limit limitations
Each method of increasing memory limit has limitations.
- directive php_value memory_limit may be disabled by the host
- no root access
There is a third way which may or may not work:
- php function ini_set
- Example: ini_set("memory_limit","24M");
- It will not work if phpinfo() does not show Configure Command '--enable-memory-limit'
- see http://us.php.net/manual/en/ini.core.php#ini.memory-limit
On my host, none of the three methods will work. I am limited to 8M memory per PHP session. I am able run the basic installation. I haven't seen the dreaded error "Allowed memory size of Xxx bytes exhausted" but I expect it at some point.
--John Walling 14:56, 11 May 2007 (CDT)
I think that because the docs tend to be a response to specific issues more often than not, they are sometimes written in global language, when the recommendation, solution, advice, etc should be more local.
By way of example, while suggesting that the web server need be restarted after editing php.ini may in some cases be true as a matter of practice, it is not true in many cases and it creates confusion because it does not address the underlying issue, that the programs must be made aware of configuration parameters, and how various programs do that (especially in shared environments).
Another example is some of the discussion about where php looks for php.ini files. In trying to answer a question for a user on this point I came across quite a bit of inconsistency, but in fact no cite to the php docs setting out how php.ini is sourced. I know RLE has worked hard at helping folks understand that php.ini is used differently under PHP4 than under php5, and that it is important to sort out which version you are using before thrashing about changing files ;=}
In any event, I did a quick strike through and amendment on the FAQ, but as has been discussed elsewhere, I am concerned that one or more of the referenced docs may all potentially create confusion over such questions....14:10, February 12, 2009 Marc Grober
- Good points as usual. Context can really impact the suggested solution for administrators or teachers. I just did a major edit of this page. I did create a new PHP error logs page from existing material in this FAQ page. But did not feel comfortable in placing the most commonly asked questions at the top. I know just enough to understand that it is an important file :) --chris collman 09:47, 13 February 2009 (CST)