Thread: Supertracker

Results 1 to 10 of 324

Threaded View

  1. #11
    Join Date
    Nov 2007
    Location
    Upstate NY
    Posts
    232
    Plugin Contributions
    0

    Default Re: Supertracker

    So I've installed Supertracker 1.1 on ZC 1.5.1. It worked fine for about a week then I got blank front end (admin is fine). I uninstalled Supertracker and it's good.

    The debug logs give this error:

    PHP Fatal error: Cannot redeclare geoip_country_code_by_name() in /home/ . . . /public_html/ . . . /includes/geoip.inc on line 351
    I installed and uninstalled a few times and same result. I have this mod running on 1.3.9h with no problems. It was also OK on this version for about a week.

    We've had some strange php errors the last month or so. Little things that I've fixed one at a time. I believe there's some creeping php/mysql upgrade in the works that is running into bad/old/depreciated code.

    This issue has happened in the past with this exact error in this file. I've found posts and solutions for this thing from every year for the last 4 years.

    This one - adding !if statements in the geoip.inc file - worked for me. the code is around line 340 in geoip.inc.

    Fair warning: after I made the code changes and re-uploaded the whole package my front and backend dragged for about 5 mins. Seemed frozen. I waited and refreshed and everything's fine. Supertracker even works

    Fatal error: Cannot redeclare geoip_country_code_by_name()

    The solution is very simple. in your geoip.inc file, look for this code

    function geoip_country_code_by_name($gi, $name) {
    ...
    }

    function geoip_country_name_by_name($gi, $name) {
    ...
    }

    and replace with

    if (!function_exists('geoip_country_code_by_name')) {
    function geoip_country_code_by_name($gi, $name) {
    ...
    }
    }

    if (!function_exists('geoip_country_name_by_name')) {
    function geoip_country_name_by_name($gi, $name) {
    ...
    }
    }

    -------------------------------------------------------
    Here are some other solutions I found in case that fix doesn't work for you. I HAVE NOT TRIED THESE

    From 2011: this fix from razvantudorica.com/03/cannot-redeclare-geoip_country_code_by_name/. This one is from the same post as the code fix I used: it's an alternative that is supposed to do the same thing.

    Cannot redeclare geoip_country_code_by_name
    Fatal error: Cannot redeclare geoip_country_code_by_name()

    The reason was that I have geoip extension enabled in my PHP configuration and also I used the geoip.inc file from maxmind.com.

    The solution is very simple. Actually, there are two solutions:

    First is to disable the geoip extension from your configuration. In /etc/php5/apache2/conf.d/geoip.ini comment the first line:

    ;extension=geoip.so

    . . . . second solution is the code fix above.
    One person on max_mind says this but I don't know what he's talking about: I don't have that in my php.ini
    the reason is that you use the php code _and_ the php extension. Remove the geoip extension from your php.ini to fix the namespace clash.
    ( both use the same function name geoip_country_code_by_name )
    From a 2010 posting on 4homepages.de/forum/index.php?topic=28684.0
    Problem solved. It`s depend on hosting changes...
    For resolve this problem, uncomment this path in you geoip.inc
    function geoip_country_code_by_name($gi, $name) {
    $country_id = geoip_country_id_by_name($gi,$name);
    if ($country_id !== false) {
    return $gi->GEOIP_COUNTRY_CODES[$country_id];
    }
    return false;
    }

    function geoip_country_name_by_name($gi, $name) {
    $country_id = geoip_country_id_by_name($gi,$name);
    if ($country_id !== false) {
    return $gi->GEOIP_COUNTRY_NAMES[$country_id];
    }
    return false;
    Last edited by Tapper; 16 May 2013 at 05:59 PM.

 

 

Similar Threads

  1. Supertracker
    By enquirer66 in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 2 Mar 2011, 08:37 PM
  2. SuperTracker
    By ma.r.a in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 11 Feb 2011, 08:19 PM
  3. Supertracker referrals?
    By mlbacher in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 24 Aug 2009, 07:53 PM
  4. supertracker mod
    By confused_aswell in forum General Questions
    Replies: 2
    Last Post: 1 Aug 2008, 12:55 PM
  5. Supertracker Add-on
    By bcmartinez in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 19 May 2006, 01:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR