Forums / General Questions / lost customized footer: tried to fix: PHP out of memory

lost customized footer: tried to fix: PHP out of memory

Started by engineeringsolutions on 5 Dec 2012, 1:57 PM · Views: 849

Results 1 to 5 of 5
5 Dec 2012, 1:57 PM
#1
Join Date:
Nov 2012
Posts:
7
Plugin Contributions:
0

lost customized footer: tried to fix: PHP out of memory

Hi Everyone, first of all I would like to say how impressed I am with Zen cart, the way it is set up, the way contributions are made, support, the whole lot from the ground up has been an excellent & pleasant learning experience, many thanks to all the contributors that made this possible!

This is my first zen install v1.5.1, and i'm new to the world of website development after just finishing an adaption of a template for my first website I needed a shop to go with it and decided to give zen cart a try before going for the extra monthly cost option.

I have to say I don't understand how your competitors are still in business!

Anyway, I have read many pages all over the forum, installing via secure ftp, modifying, fixing, moving on until the next problem, searching, reading, modifying & fixing. Unfortunately I have reached a point and am now stuck:

I set up zen cart and it worked straight away with my ssl cert, no problems, I was impressed! (Especially after all the horror stories I read about 1and1, it turns out if you follow the instructions everything goes smoothly after all.)

I installed the Aberdeen Natural template and configured it, excellent! (I have read the entire thread a few times now.)

I decided to remove the menu footer, downloaded the add-on/plugin pack, scanned the support thread a few times and then followed the un-installation instructions provided with the files.

The footer was gone and in its place an error log reporting a missing footer php file.

I filled the gap with the original footer php file from my backup of the fresh installation.

Still no footer and a new error log, a command in a footer php file in the Aberdeen template folder was pointing to the old footer_menu php file name in the includes folder (from memory anyway), I changed the file name in the code back to the original tpl_footer.php so it could find the file I restored from backup.

Now my almost finished zen shop pauses for a second when loading in firefox (It locks in chrome) and there is a new error log:

PHP Fatal error: Out of memory (allocated 68419584) (tried to allocate 19456 bytes)../path/..tpl_footer.php on line 65

(Line 65 is the very last blank line at the end of the php file.)

Could someone please help? either by pointing me toward the right area for an answer or help me with which files to replace from the backup to get the original small zen cart footer back working within the Aberdeen Neutral template without this memory error?

The other option (I'm happy to do this) is to loose the footer, turn it off? altogether to get rid of this error, i'm not worried about having the footer there at all, I just need to get this new business rolling........

Thanks in advance for your time and advice.

Dave

5 Dec 2012, 2:21 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Re: lost customized footer: tried to fix: PHP out of memory

The reason you're running out of memory is that your footer code is in an infinite loop, somehow including itself recursively ... until it runs out of memory.

5 Dec 2012, 3:53 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: lost customized footer: tried to fix: PHP out of memory

a command in a footer php file in the Aberdeen template folder was pointing to the old footer_menu php file name in the includes folder (from memory anyway), I changed the file name in the code back to the original tpl_footer.php
A footer file would never have called tpl_footer.php, as that is the base footer file to begin with. Simply removing the whole call to another file where the footer_menu call was should get you started. Alternatively, renaming the tpl_footer.php in the Aberdeen template folder to tpl_footer.bak should let the original stock tpl_footer.php in /includes/templates/template_default/common/ be active and build a stock footer.

5 Dec 2012, 4:45 PM
#4
Join Date:
Nov 2012
Posts:
7
Plugin Contributions:
0

Re: lost customized footer: tried to fix: PHP out of memory

Thank you both so much for the feedback, it really is appreciated. :thumbsup:

Imaginary rep is flying down the wire :D

6 Dec 2012, 12:18 PM
#5
Join Date:
Nov 2012
Posts:
7
Plugin Contributions:
0

Re: lost customized footer: tried to fix: PHP out of memory

I just wanted to post for other people who are new to zen cart with no knowledge of PHP & very limited (Google it) knowledge of HTML & CSS (Like me) The new world of zen cart can come across as a flood of information, overwhelming with no definite place to start.

I followed the instructions on installation very carefully, researched all the necessary threads, software and steps required for security that I could find.

I installed a very nice template with the help of the template support thread and thought ahh this is quite easy! I can do this. (It is, only if you read the right information first.)

Then in my new found confidence I began to start switching files about & editing them and got myself into trouble and had to post here!

What I should have done was read these two FAQ's

http://www.zen-cart.com/content.php?80-how-do-i-find-out-what-files-to-edit

http://www.zen-cart.com/content.php?78-how-do-i-set-up-the-template-overrides

Both contained with a lot more other useful info in this section:

http://www.zen-cart.com/content.php?27-template-customization-building-overrides

So there you go, now I understand what I did wrong (Pretty much working blind without understanding much at all about how zen cart actually functions.)

I understand that I still know relatively little about zen cart, and with the small amount of knowledge gained by reading those two threads I will hopefully be able to modify content without screwing up the site.

Thanks again for the help!