Tel: 0151 223 0001

We believe in three things: users, users, users.

Increase the PHP memory limit

Increase the PHP memory limit - brought to you by sdesign1 - PHP specialists

This article will show you how to increase the PHP memory limit on your server. You will need to do this if you encounter errors that look similar to "Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 163569 bytes)". To solve this, you will need access to your .htaccess file that lies in the root of your web directory.

  • Open your .htaccess file in a text editor
  • Add the following code to increase your memory limit when running scripts.

php_value memory_limit 20M

This will increase your memory limit to 20mb. Depending on the error you received in the first place, you may want to increase this value to match your requirements.

  • Save the file as .htaccess (if you have opened this in Notepad, ensure that it does not append .txt onto the end of the file).
  • Upload your .htaccess file to your server.
  • Try running the script again.

The message often shows when you are enabling modules, using content management systems, or running large scripts. If you find you still got the same error message, then increase the value from "20M" to the appropriate value.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank