Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 184498 bytes) in /homepages/9/d173962613/htdocs/DrupalSite/includes/menu.inc on line 956

Am I somehow using too much memory, or what is the deal. I got this error when attempting to access the Modules listing.

I got it after I had changed the name of the htaccess file. It appears that I had renamed the file to "htaccess" before, so I changed it back to ".htaccess"

At least I sure home I'm doing this correctly...

Do I just go into the file mentioned, and find the memory line, and edit it as mentioned? I'll be looking in the mean time...

Any other thoughts/suggestions? Is the site already too "modulated" or what is the deal?

If I'm correct, then a few of my previous posts are already answered (I think)..

I'd appreciate any kind of response on this. Thanks,

Comments

kjv1611’s picture

Or am I reading it wrong???

Here is the line of code:

function _menu_tree_cid($menu_name, $data) {
  return 'links:'. $menu_name .':tree-data:'. md5(serialize($data));
}

And another thing... I can't find "memory" anywhere in the whole file, neither "16777216"

Surely it's the right file???

kjv1611’s picture

It suggested doing 28MB now instead of the 16MB, I think is what it was saying. I just went ahead and upped to 64MB. Hopefully that shouldn't cause any issues. After I did, things seemed to be moving quite a bit snappier. I updated that in the "php.ini" file.

[PHP]
register_globals = Off
memory_limit = 64M

Now, the problem seems to have totally gone away, and as I stated, the site seems snappier. I wonder how that affects everything else.

By the way, the first line was there prior to this issue - I had added it to fix another issue when I first started.

gauravktomar’s picture

Thanks. I was also facing same problem. And it is fixed now.

aryanto’s picture

The error message came from PHP, so you do not find anything in Drupal.

It seems that you have 16MB memory_limit in your php.ini and you hit that limit. If you were able to change that limit, try to set it bigger e.g. 32MB. If not, try to remove all the unecessary modules that you don't use, including the core modules.

aryanto’s picture

I was too late to post my previous comment

Anonymous’s picture

I have tested your solution (and others...) but is not good :

Created the file php.ini in my root /www../... with :

[PHP]
register_globals = Off
memory_limit = 32M  (or 32 - 64 - 80 -750M)

or /and :

register_globals = Off
memory_limit = 32M

or 

register_globals = false
memory_limit = 64M

But i dont have egual access into my modules-page : error ... menu.inc error msqli.inc ... Why?
The page modules is : 98% not accessible (and 100% is impossible able/disable my internal modules).
This problem : is born with FCK EDITOR (plus the new fck 2.5 in fck../fck...) + IMCE 6.x

I dont have this problem in my PC ( with the old XAMPP.. ).

Best regards and Very Very Thanks for your reply and ideas.

kjv1611’s picture

It has to be a PHP setting on the server side if you do not have the same issue locally. Are you 100% sure your local instance matches the web server/remote instance?

mortenson’s picture

I had that problem and solve this way.

1)Create a file in your root directory or home directory, inside the drupal folder.
2)Name it "php.ini"
3)write this code in it:
register_globals = Off
memory_limit = 40M

change the memory limit as you like

BOZMAN’s picture

bozman
i changed the php.ini file (in /etc/php5/apache2... i put the path because newbies like me never know where to find it!) to
memory_limit = 64M which worked ok.
the fatal error started when i was working through David Mercers Book on Drupal 6 & i got to page 193 'installing CCK' & i think there was also a translation module involved. could not access 'modules' at all from the menu as a result and kept get the annoying fatal error message.

kjv1611’s picture

I think you need to put a php.ini file in your main Drupal folder - not under the etc/... folder...

Try creating a new file there with the Register Globals and Memory deal, and see if that fixes..

Let us know.

ni68ana’s picture

I got the same error after installing CCK, tried creating the php.ini file under Drupal root with memory limit = 64 and register globals = off, but the error remained. Made the same changes in etc/php5/apache2/php.ini and that fixed it.

kjv1611’s picture

ultrasuoni,

Did you ever get your situation resolved?