PHP Terms php.ini Directives memory_limit


- Info:

- memory_limit sets maximum allowable amount of megabytes that a script can allocate:

memory_limit = integerM

- Integer value must be followed by M.

- This directive prevents runaway scripts from monopolizing server memory and even crashing the server.

- This directive takes effect only if the --enable-memory-limit flag is set at compile time.


- Example:

- memory_limit = 8M