This error can occur for multiple reasons. In my case, it occured when trying to edit an already existing drupal page. I would attempt to edit the page, and Drupal would respond with this:
Fix 1:
What we need to do is increase the allowed memory size for php scripts. This is easy assuming that you know the location of your php.ini file (if you don’t, read Fix 2).
Inside this file, find the following line and make the following changes:
to
Note: You might have to increase the number depending on how many modules your Drupal installation is using.
Fix 2:
If you cannot find your php.ini file, either it does not exist yet, or your host won’t allow you to access it. We will assume that the file does not exist yet, so lets create it.
Save the following code into a file named php.ini:
memory_limit = 40M;
upload_max_filesize = 20M;
post_max_size 20M;
max_execution_time = 200;
max_input_time = 200;
Put this file in your Drupal website root folder, …/public_html/.
Your memory error should no longer occur after this fix, however considering there are many reasons for this error to occur it might also not work.
Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!
Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have
0 Responses to “Fix Drupal “Fatal error: Allowed memory size of…” error.”