Search code examples
phpapachedrupaldrupal-6

DRUPAL: Fatal error: Allowed memory size error when editing specific existing pages


Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1481725 bytes) in __/public_html/includes/database.inc on line 224

I'm having this error occur in Drupal 6 every time I try to edit the following pages:

We're on shared hosting so I don't have access to the php.ini file to allocate more memory, however I'm pretty sure that's not what's causing the problem.


Solution

  • I am on a shared host as well. Here is the PHP.INI that I created in one of the Drupal domain root folders:

    [PHP]
    memory_limit = 40M;
    upload_max_filesize = 20M;
    post_max_size 20M;
    max_execution_time = 200;
    max_input_time = 200;
    

    I have no more problems with any global limits. I am not sure if the hoster can disable or override the local PHP.ini - mine does not, and it should be worth a try.