What is the PHP memory limit?
Hostverge Support
Last Update hace 10 meses
The PHP memory_limit is the maximum amount of server memory that each PHP script can use.
The official PHP documentation explains this in greater detail.
“This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts from eating up all available memory on a server.”
The web server running PHP scripts and the PHP interpreter are typically in charge of managing PHP memory usage. PHP has a default memory limit setting, which restricts the amount of memory a script can use.
The default value for PHP memory is 128M. This can be raised if an application or website needs more memory.
It's important to note that allocating too much memory to PHP can also have negative consequences, such as slowing down the application or causing other performance issues. This may be due to a specific PHP process using far more memory than is available.
When a script exceeds the memory limit that's been set for the server, an error similar to the following will be logged.