What is the PHP memory_limit?

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 default value for PHP memory is 128M. This can be raised if an application or website needs more memory. 

When a script exceeds the memory limit that's been set for the server an error similiar to the following will be logged. 

Fatal error: Allowed memory size of x bytes exhausted (tried to allocate x bytes) in /example/php/script PHP Fatal error: Out of memory (allocated x) (tried to allocate x bytes) in /example/php/script

You can update the PHP memory limit for your site through RabHost Control Panel by navigating to PHP Configuration option.

  • 74 Utilizadores acharam útil
Esta resposta foi útil?

Artigos Relacionados

Can you update the version of cURL on your webservers?

Occasionally, applications in your webspace may run checks to help ensure your website is secure....

Can I enable GZIP Web Server Compression?

Gzip is a great of compressing files for faster network transfers - helping them load faster, so...

Is Node.JS supported on the RabHost shared hosting platform?

Node.JS isn't currently supported on the shared hosting platform. If you need to use Node.JS,...

Why is my website not able to send email?

A common reason for this relates to the address not matching your site domain. To help improve...

What do I do if I believe a site is in breach of RabHost policies?

RabHost impose a strict Acceptable Use Policy and Terms of Service which customers must...