Knowledgebase

How to Fix PHP Error: Allowed Memory Size of # Bytes Exhausted

 

To resolve the PHP error "Allowed memory size of... in file /directory/folder/yourscript.php," you can use an htaccess file.

If the error persists despite implementing the htaccess code, please reach out to us. We are committed to assisting you to the best of our ability.

Add the following code to your .htaccess file in your primary domain. If the error persists, place the code in the directory where the error occurs, for instance, example.com/directory/folder/.htaccess.

RLimitMem max

By adding this code, you can mitigate the issue and prevent the occurrence of the PHP memory error.

  • PHP error, PHP, Memory, error
  • 0 Users Found This Useful
Was this answer helpful?

Powered by WHMCompleteSolution