Friday, November 15, 2013

Drupal 7 - Fatal error: Allowed memory size of X bytes exhausted

I encountered "Fatal error: Allowed memory size of 64233433 exhausted when I tried to copy an existing Drupal 7 installation to another host. I also go this error when I installed ctools module. After doing the following the problem went away.

Try adding one of the following lines to sites/default/settings.php file

ini_set('memory_limit', '32M');
ini_set('memory_limit', '64M');
ini_set('memory_limit', '128M');
ini_set('memory_limit', '256M');
ini_set('memory_limit', '512M');

Adding the 128M memory limit setting worked for me on shared hosting.

During my research I found other solutions that include adding memory configuration to .htaccess and php.ini files. Adding the suggested memory configurations to those files did nothing. My problem was not solved until I added ini_set('memory_limit', '128M'); to sites/default/settings.php file.

No comments:

Post a Comment