Fatal error: Allowed memory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Fatal error: Allowed memory

Post by gaogier »

I was making a template.... and all of a sudden, i get this error...

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 29249 bytes) in /home/gaogier/public_html/phpBB3/includes/functions_template.php on line 133

What do i do?


I have given the script alot more memory... the error now says

Fatal error: Allowed memory size of 205520896 bytes exhausted (tried to allocate 29249 bytes) in /home/gaogier/public_html/phpBB3/includes/functions_template.php on line 103


What do i do?

I just saved 1 template... and this happend, please help if you know how to...
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Fatal error: Allowed memory

Post by JAB Creations »

The number 33554432 seems to be rather popular with about 276,000 results on Google.

Offhand the only thing I would guess is that you somehow ran out of memory; more specifically either you don't have jack-squat for memory or something got stuck in a loop (maybe an infinite loop) and hit some sort of 32 megabyte preset limitation. It could also be a one time glitch. The more you can't reproduce it no matter what then the more likely it was a one time glitch. Either way I'm just trying to give you some ideas of what to try and do to figure out the issue.

Good luck!
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Re: Fatal error: Allowed memory

Post by gaogier »

well it only happened when i edited a file, then i put the orgianal one back and still going... it was a template file...
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: Fatal error: Allowed memory

Post by Eran »

A good idea might be to go to the lines in the code that are specified in the error messages and see whats going on there...
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Fatal error: Allowed memory

Post by pickle »

It looks like an infinite loop - that's about the only way I now that a template file can use 205520896 bytes of memory.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Re: Fatal error: Allowed memory

Post by gaogier »

but what about a brand new forum, just copyed over the config file?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Fatal error: Allowed memory

Post by pickle »

...you said you were modifying a template file. Template files can usually have loops in them.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Re: Fatal error: Allowed memory

Post by gaogier »

but what if the new forum install has the prosilver only
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Fatal error: Allowed memory

Post by pickle »

Look in that file on those lines & see what there is. phpBB has a pretty vibrant support community too - you could try asking there.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
gaogier
Forum Contributor
Posts: 391
Joined: Wed Mar 02, 2005 1:02 pm
Location: Portsmouth, UK
Contact:

Re: Fatal error: Allowed memory

Post by gaogier »

asked on phpbb website forums, nothing, they say its the host, host say its the site...
Post Reply