WordPress.org

Ready to get started?Download WordPress

Forums

Wp-Insert
[resolved] GEOIP Error (13 posts)

  1. Tux_Rules
    Member
    Posted 11 months ago #

    Still have no answer as to how to fix this:

    Fatal error: Cannot redeclare geoip_country_code_by_name() in /home/domain_blocked/public_html/shopping/wp-content/plugins/wp-insert/includes/common/geoip/geoip.inc on line 438

    http://wordpress.org/support/topic/geoip-error?replies=2

    http://wordpress.org/extend/plugins/wp-insert/

  2. Tux_Rules
    Member
    Posted 10 months ago #

    Where did my 2 follow up posts go? The author of the plugin maybe deleted them? How about an answer as to how to fix the geoip error.

  3. namith.jawahar
    Member
    Plugin Author

    Posted 10 months ago #

    I saw the master thread of this discussion here : http://forum.arvixe.com/smf/wordpress/wp-insert-plugin-issue/ and it looks like the issue is resolved..

    As per your message the plugin was working until monday and it suddenly stopped working...Its a pretty logical conclusion that if you havent done wny changes to the plugin on Monday and it broke its not the plugin thats in question...some setting might have changed with the host or any other plugin might be interfering with geoip functionality...Geo Ip library is a third part library which we have no control over..

  4. Tux_Rules
    Member
    Posted 10 months ago #

    The way I fixed it was to take this chunk of code:

    function geoip_country_code_by_name_v6($gi, $name) {
      $country_id = geoip_country_id_by_name_v6($gi,$name);
      if ($country_id !== false) {
            return $gi->GEOIP_COUNTRY_CODES[$country_id];
      }
      return false;
    }
    
    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_v6($gi, $name) {
      $country_id = geoip_country_id_by_name_v6($gi,$name);
      if ($country_id !== false) {
            return $gi->GEOIP_COUNTRY_NAMES[$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;
    }

    and reduce it to this:

    function geoip_country_name_by_name_v6($gi, $name) {
      $country_id = geoip_country_id_by_name_v6($gi,$name);
      if ($country_id !== false) {
            return $gi->GEOIP_COUNTRY_NAMES[$country_id];
      }
      return false;
    }

    And Arvixe had enabled geoip, so it was not on their end...so, any thoughts on why I had to eliminate that bit of code?

  5. namith.jawahar
    Member
    Plugin Author

    Posted 10 months ago #

    Do you happen to use any other plugin which has Geo Ip functionality...If you do try deactivating that plugin and running WP-Insert...If its running that plugin developer has to check if GeoIp is already loaded and load GeoIp only if it isn't already loaded (Wp-Insert does this but unfortunately some plugin developers change the name of GeoIp class causing everything to collide)...

  6. Tux_Rules
    Member
    Posted 10 months ago #

    I do not believe I am running any other Geo IP enabled plugins...it's really quite strange that all worked well and then POOF, it breaks...both sites....

  7. DMS1010
    Member
    Posted 10 months ago #

    I encounter virtually the same problem and I believe it's a conflict in my case between WP-Insert and WordFence. See error below:

    Fatal error: Cannot redeclare geoip_load_shared_mem() (previously declared in /home/my_domain/public_html/wp-content/plugins/wordfence/lib/wfGeoIP.php:241) in /home/my_domain/public_html/wp-content/plugins/wp-insert/includes/common/geoip/geoip.inc on line 256

    I received a reply back from WordFence saying they added code in the previous release that prevented the exact same error being triggered from the WordFence plugin, and the plugin could generate an error if someone else already declared that function. Can WP-Insert to do the same, so that your geo-ip functions don't get declared if someone else has declared them. I am a novice here, so learning as I go along...just trying resolve the issue I'm having between these two popular plugins.

    Thanks so much

  8. Tux_Rules
    Member
    Posted 10 months ago #

    I am not sure on that...I do know that there had been zero updates on my sites for for at least 2 weeks prior to them crashing...it just came out of the blue....but by removing the code above, it worked again.

  9. namith.jawahar
    Member
    Plugin Author

    Posted 10 months ago #

    Wp-Insert does check if GeoIp class is already defined but still conflicts are occurring mostly from the second plugin which does not check for collisions....

  10. namith.jawahar
    Member
    Plugin Author

    Posted 10 months ago #

    As per the user he is posted this question just to make a point even though the issue was easily fixed even before this forum post was opened. Strange!

    A request to every user out there : We the plugin authors develop plugin voluntarily and has no/close to nill monetary benefits, Spreading rumors on forums is not going to help your cause or entitle you to receive personalized free support. I would rather pull the plugin from the repository than fall for such tricks.

  11. Tux_Rules
    Member
    Posted 9 months ago #

    As per the user he is posted this question just to make a point even though the issue was easily fixed even before this forum post was opened. Strange!

    Um, no, the problem was NOT fixed before posting the question...I waited several days of hearing NOTHING from you before posting the question on my hosting providers forum. The fix was to delete a chunk of code. I wanted to know why the plugin work and, with no other changes/additions/etc. to to blog, it just quit. Worked great for 2 months, then just quit. I am now told it was because of a conflict from another plugin??? Then why did they all play well together for 2 months?

    Spreading rumors on forums is not going to help your cause or entitle you to receive personalized free support. I would rather pull the plugin from the repository than fall for such tricks.

    What rumors?? I have stated the truth, nothing more, nothing less.
    Free support? Really? How about just plain old support for a plugin that seems to have broke things. I'm not the only one to have posted this issue, and I have seen zero help from the author (you) as to how to fix it other than:

    Wp-Insert does check if GeoIp class is already defined but still conflicts are occurring mostly from the second plugin which does not check for collisions

    which in my case does not apply AS IT ALL WORKED TOGETHER FOR 2 MONTHS!
    Then, out of nowhere, poof! It stopped working.
    You can continue to try and make it look like I am in the wrong, I don't care...I just want to know why it broke...something other than:

    Wp-Insert does check if GeoIp class is already defined but still conflicts are occurring mostly from the second plugin which does not check for collisions

  12. namith.jawahar
    Member
    Plugin Author

    Posted 9 months ago #

    I am a plugin author not a magician. How do I know what happened on your hosting account one fine day. If it was something wrong with the plugin it would have occurred during an update or when you installed the plugin. You would have understood how ridiculous your allegations are if you were a programmer.
    Conflicts are occurring with GEOIP in certain combinations and when it occurs the plugin will show an error message and even if the fail safe fails the error will appear the moment you upgrade or install the plugin.

    Please continue with your smear campaign. I have nothing more to say. I prefer to spend time on better things!

  13. Tux_Rules
    Member
    Posted 9 months ago #

    Please continue with your smear campaign. I have nothing more to say. I prefer to spend time on better things!

    Show me the "smear" campaign. All I asked was why it took more than a week to get a response from you on the problem...and it still is not a decent answer.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags