• Thanks for the great plugin.

    My experience when upgrading to version 2.1.1.

    First my site crashed during the upgrade process (at the end of the process it through up some PHP syntax error and failed to re-activate the plugin). From the error message I could see that I had used some PHP in my child theme’s function.php which caused the error. The offending code was:

    global $htbrGeoInfo;
    $htbrGeoInfo = geoip_detect_get_info_from_current_ip();

    Used FTP to comment out the second line of code, that let me access WP admin. I then tried activating the plugin and it prompted me to update the database which I did.

    Then I tried changing to use the new function “geoip_detect2_…” but it complained about my reference to:

    $htbrGeoInfo->country_code

    Changed it to:

    $htbrGeoInfo->country->isoCode

    That fixed it and I’ve been able to find and fix similar PHP code that I used elsewhere in my code. I’ve tested using a proxy server service and it works perfectly.

    Now that I’ve got it working on my test site (duplicate of live site), I’m sufficiently confident to update my live site.

    Thanks again.

    https://wordpress.org/plugins/geoip-detect/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hm for me the interesting part would have been “at the end of the process it through up some PHP syntax error” because obviously it shouldn’t do that. If it is possible for you could you try to find out what exactly it was?

    Yes, when the plugin is disabled the plugin function calls throw an “Function not found”-error – you would have to check with function_exists first to avoid it.

    Thread Starter dccharron

    (@dccharron)

    Ok. Will take a screenshot when I update the live website so I can capture the exact error message at the end of the update process. Just teeing up a time window with my client for the site outage.

    Thread Starter dccharron

    (@dccharron)

    I’ve just updated my live site to 2.1.1 and experienced the same sequence of events. The “PHP syntax error” was actually a missing function error. It was:
    Fatal error: Call to undefined function geoip_detect_get_info_from_current_ip() in /home/content/.../functions.php on line 17
    Thanks for the tip to use function_exists. As you can see I’m not a PHP wiz kid (yet). That test would have helped with avoiding the above error but I don’t think it would have helped to overcome the change in name and structure of the data. For example, the change from country_code to country->isoCode. I had used this in the functions.php file and in a bit of PHP code I had inserted into some of my pages. Once I changed the names and structure it was all good.

    Again, thanks for the great plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Legacy call failed but got new code working’ is closed to new replies.