Fatal error: Allowed memory size of 262144 bytes exhausted

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
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

Fatal error: Allowed memory size of 262144 bytes exhausted

Post by grabber_grabbs »

i have restored a previous version of my codes and since then, i have this error message Fatal error: Allowed memory size of 262144 bytes exhausted.
all was fine before, and the backup i used was working fine also when i backed it up... any clue why i get this message ?
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Fatal error: Allowed memory size of 262144 bytes exhaust

Post by Celauran »

Your script is clearly eating up too much memory. The question is why. What is it doing? The fact that it worked before could well be because it was previously working on a smaller data set.
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

Re: Fatal error: Allowed memory size of 262144 bytes exhaust

Post by grabber_grabbs »

the code was working fine last night until i notice a little bug i had with a variable that was reset to 0 for a reason i didnt understand... so after playing and searching in the code to find the problem with my variable... i just decided to restore a backup version i had from couple of days ago (backup of a full working cart) just to see how this variable was working / resetting. Just to see if i had that problem at that time but just didnt noticed. So i did installed filezilla in my computer in order to transfer all the backed up files from my computer to the server. All the file transfered proprely.
After all the files were transfered, tried to load my webpage, it loaded ok (main menu) as soon i try to load a php file (cart.php) i have this error message.... Now i cannot have my cart to work at all.... the cart.php i had yesterday was 41KB in size and all was working.... now with my backup version the cart.php is 24KB and still have a memory error message....

As a test, i even tried to put back last night version of my website (that was working) and still have a memory usage error ?
grabber_grabbs
Forum Commoner
Posts: 60
Joined: Mon Oct 10, 2011 6:13 pm

Re: Fatal error: Allowed memory size of 262144 bytes exhaust

Post by grabber_grabbs »

finally fixed the problem.... dont know what was the reason, called the tech support from ipage.com and they fixed it. Sent them an email to know what was the real cause, and if i get a response, i will let you know. thanks again for your help on this.
maxx99
Forum Contributor
Posts: 142
Joined: Mon Nov 21, 2011 3:40 am

Re: Fatal error: Allowed memory size of 262144 bytes exhaust

Post by maxx99 »

262144 bytes - its quite small amount for these days. Maybe someone mixed up something in your config and set 256K instead of 256M?
Post Reply