Page 1 of 1

Foot.php Error

Posted: Mon Jan 23, 2012 9:55 am
by mbi0
Help plz I have seen this in my error log, and surfing the net i have seen that alot of stores that use opencart had this problem so could anyone help me to correct this or explain me how is it generated ??

2012-01-22 20:08:11 - PHP Notice: Undefined variable: c_ads in /usr/local/lib/php/foot.php on line 5
2012-01-22 20:08:11 - PHP Notice: Undefined variable: c_ads_code in /usr/local/lib/php/foot.php on line 6

Re: Foot.php Error

Posted: Tue Jan 24, 2012 9:50 am
by mbi0
Any one , does anyone have same error ??

Re: Foot.php Error

Posted: Wed Aug 29, 2012 12:22 am
by netops
Seems to infect many opencart installs:
Google: "PHP Notice: Undefined variable: c_ads in /usr/local/lib/php/foot.php on line 5"

and you get page after page of opencart installs.

Re: Foot.php Error

Posted: Mon Sep 03, 2012 5:20 am
by syednayab
PHP Notice: Undefined variable: c_ads in /usr/local/lib/php/foot.php on line 4

same error i am finding in my error log, anybody please englighten us on this one.

Thank you....
Syed

Re: Foot.php Error

Posted: Thu Sep 06, 2012 6:18 pm
by uksitebuilder
foot.php is not part of opencart, nor is it created by opencart installation.

you should contact your host to find out where the file is coming from as it seems to be before the web root

Re: Foot.php Error

Posted: Thu Sep 20, 2012 1:47 am
by netops
Your Hosting provider has a mechanism for inserting code/advertisements.

In config.php of your opencart install simply add:

$c_ads=false;
$c_ads_code=false;

Re: Foot.php Error

Posted: Thu Jul 25, 2013 1:39 am
by butte
. . . but it's probably best just to ask support to get rid of the problem where it exists, on the server, at once in account roots and below those near the server's own root (where only system administrators can go). Add those two lines at risk that suddenly admin log-ins will be repetitively necessary -- at every step of trying to do anything, even after deleting them in response to that. May work, may not work.

This is (still) the sole thread for OC, but in looking at posts (through today) from virtually everywhere around the world, virtually all concerning lines 5 and 6, etc., it appears that some or many hosts glom onto Linux distributions which arrive with what were either supposed to be goodies for servers (self-advertize) or supposed to be Easter Eggs for administrators to discover and play with, but which if unfound eventually rot in situ, as the abundance of posts shows.

Upshot: try inserting before the end (followed by ?> ):

//REMINDER: COUNTERACT SERVER "ADS" ERROR DOUBLETS, DELETE IF NO CHANGE OR PROBLEMATICAL
$c_ads=false;
$c_ads_code=false;

They may launch unprecedented automatic log-outs of admin, and those may even continue after deleting the two lines. Tried it this morning on one server, and it did stop the error logging; but it launced the admin log-outs; so reverted; and got both; wonderfulness. Flushing caches before, during, and after each change (do, undo) did not help.

Re: Foot.php Error

Posted: Sat Aug 31, 2013 6:50 am
by manoetalk
Fez conforme a sua direção. Os erros não aparecem mais. oc1.5.5.1

Thanks, this was very good!

Re: Foot.php Error

Posted: Sat Aug 31, 2013 8:20 am
by manoetalk
It did not take more than 20 minutes to get an error message, this time referring to the change made.
I had to delete the code. The host agreed not.

Re: Foot.php Error

Posted: Fri Sep 06, 2013 1:41 am
by manoetalk
This was the response I got from my hosting site:
Hello,
Your script is trying to access the folder / usr / local / lib / php /
You should look for the configuration files and specify the path to your account.
Regards,
Car... P.
Operators Support
http://www.hostin.......

Re: Foot.php Error

Posted: Sat Sep 28, 2013 7:25 am
by butte
Let's recap this . . .

You see errors like this (with your own timestamps, server path may differ slightly):

2012-01-22 20:08:11 - PHP Notice: Undefined variable: c_ads in /usr/local/lib/php/foot.php on line 5
2012-01-22 20:08:11 - PHP Notice: Undefined variable: c_ads_code in /usr/local/lib/php/foot.php on line 6

You insert in both config.php files at the end, right before the ?>:

//REMINDER: COUNTERACT SERVER "ADS" ERROR DOUBLETS, DELETE IF NO CHANGE OR PROBLEMATICAL
$c_ads=false;
$c_ads_code=false;

It works for a little while, then it doesn't work, and you might even be told that YOUR script is looking for the foot.php file WHICH BELONGS IN THE FIRST PLACE TO THE HOST IN THAT POSITION BELOW AND OUTSIDE YOUR OWN ACCOUNT BECAUSE IT INSERTS ADS INTO YOUR FREE HOSTING ACCOUNT. There is no "foot.php" file in OC itself; never was.

You fix the problem by putting up with it or by buying a paid hosting account or by switching to another host which does not even play that game in the first place -- a real server, with no free hosting, no interjected ads of its own. Free hosting is not "free" -- one way or another it fails to work and the only way out is a paid account somewhere that works.