Post by mbi0 » Mon Jan 23, 2012 9:55 am

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

Newbie

Posts

Joined
Tue Jul 26, 2011 10:01 am

Post by mbi0 » Tue Jan 24, 2012 9:50 am

Any one , does anyone have same error ??

Newbie

Posts

Joined
Tue Jul 26, 2011 10:01 am

Post by netops » Wed Aug 29, 2012 12:22 am

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.

Newbie

Posts

Joined
Wed Aug 22, 2012 5:32 am

Post by syednayab » Mon Sep 03, 2012 5:20 am

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

Life is a Gift! and it offers us the privilege, opportunity, and responsibility to give something back by becoming more......


New member

Posts

Joined
Tue Nov 01, 2011 8:03 pm
Location - Mumbai India

Post by uksitebuilder » Thu Sep 06, 2012 6:18 pm

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

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by netops » Thu Sep 20, 2012 1:47 am

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;

Newbie

Posts

Joined
Wed Aug 22, 2012 5:32 am

Post by butte » Thu Jul 25, 2013 1:39 am

. . . 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.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am

Post by manoetalk » Sat Aug 31, 2013 6:50 am

Fez conforme a sua direção. Os erros não aparecem mais. oc1.5.5.1

Thanks, this was very good!

Newbie

Posts

Joined
Thu Aug 01, 2013 3:26 am

Post by manoetalk » Sat Aug 31, 2013 8:20 am

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.

Newbie

Posts

Joined
Thu Aug 01, 2013 3:26 am

Post by manoetalk » Fri Sep 06, 2013 1:41 am

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.......

Newbie

Posts

Joined
Thu Aug 01, 2013 3:26 am

Post by butte » Sat Sep 28, 2013 7:25 am

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.

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: No registered users and 125 guests