Post Pic

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

A project I am currently working on needs the facility to export a couple of thousand users and user profiles and I was getting out of memory errors. A quick search helped me discover that rather than editing the php.ini to increase memory for all sites on the server I can do it on an individual site basis in the settings.php file for the site.

If it doesn’t already exist add the following line:

ini_set('memory_limit', '16M');

…to your sites/default/settings.php file and amend the value accordingly until you achieve the upper memory limit required.

More information and alternative methods of achieving the same outcome can be found in the Increasing PHP memory limit document on the Drupal site.

Umbraco Certified Developer
SagePay Approved Partner
Creative Market