This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.
Prior to PHP 5.2.1, in order to use this directive it had to be enabled at compile time by using -enable-memory-limit in the configure line. This was also required to define the functions memory_get_usage() and memory_get_peak_usage().
Memory_Limit is an option that corrals off the amount of machine memory an app is allowed to take up. On some hosts, it can be reset in php.ini or through an argument in the htaccess, but on others (like Dreamhost), it’s both difficult to change and carefully monitored by the machines themselves. This poses problems for more memory-intensive apps like SilverStripe.


Recent Comments