Title: Fatal error: getWithPrefixLen()
Last modified: December 30, 2019

---

# Fatal error: getWithPrefixLen()

 *  Resolved [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/)
 * After upgrading to 3.0 on two sites I get the following error on the front-end.
 * Fatal error: Uncaught Error: Call to undefined method MaxMind\Db\Reader::getWithPrefixLen()
   in /wp-content/plugins/geoip-detect/vendor/geoip2/geoip2/src/Database/Reader.
   php:246
 * PHP 7.3
    WP 5.3.2
 * I can share the site address via direct msg.
 * Thank you!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-getwithprefixlen%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/page/2/?output_format=md)

 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12281213)
 * Follow up: I disabled all plugins except geoip-detect and found the error only
   occurs when WooCommerce is also enabled.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12281676)
 * Thanks for your research. Probably WooCommerce also includes Maxmind code, but
   a different version … or maybe a WooCommerce extension? Can you search for files
   called “Reader.php” on your server?
    -  This reply was modified 6 years, 6 months ago by [Benjamin Pick](https://wordpress.org/support/users/benjamin4/).
 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12282655)
 * Correct, WooCommerce core includes that file in the geolite2 library:
    [https://github.com/woocommerce/woocommerce/tree/master/includes/libraries/geolite2](https://github.com/woocommerce/woocommerce/tree/master/includes/libraries/geolite2)
 *  [marnyscom](https://wordpress.org/support/users/marnyscom/)
 * (@marnyscom)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12285724)
 * Hi,
    I have the same issue. Did you solve it?
 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12287839)
 * I haven’t found a solution yet. I’m hoping [@benjamin4](https://wordpress.org/support/users/benjamin4/)
   can perform some magic.
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12288920)
 * No I can’t 😉
    I will be away until tuesday, can you inform the woocommerce developers?
   The simplest solution would be that they upgrade their library as well.
 *  [Howdy_McGee](https://wordpress.org/support/users/howdy_mcgee/)
 * (@howdy_mcgee)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12290172)
 * Is there an alternative route that’s more future-proof? The current solution 
   seems unreliable and may break again in the future if the same situation reappears.
 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12298323)
 * I agree with [@howdy_mcgee](https://wordpress.org/support/users/howdy_mcgee/),
   I understand library dependencies can be a problem with plugin dev but I’m hoping
   there’s some namespace(?) changes that could be made to isolate this plugin’s
   code? Thank you!
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12299278)
 * I have filed a bug report:
 * [https://wordpress.org/support/topic/incompatible-with-plugin-geoip-detection-3-0-fatal-error/](https://wordpress.org/support/topic/incompatible-with-plugin-geoip-detection-3-0-fatal-error/)
 *  [Ced](https://wordpress.org/support/users/cedriccharles/)
 * (@cedriccharles)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12303938)
 * Did you found something ? Or even a temporary fix ? My website is down because
   of this… I can’t deactivate WooCommerce nor GeoIP Detection…
 * Thank you !
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12304543)
 * I am reverting the Maxmind vendor library for now (3.0.1) until I have worked
   out a long-term solution with WooCommerce …
 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12304567)
 * 3.0.1 is released now, can you verify if it solves the problem for you?
 *  [marnyscom](https://wordpress.org/support/users/marnyscom/)
 * (@marnyscom)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12304999)
 * I have tried it and it seems everything works fine.
 * Thank you.
 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12305709)
 * [@benjamin4](https://wordpress.org/support/users/benjamin4/) this is working 
   great, thank you! I am concerned what might happen should WooCommerce’s implementation
   of the geolite2 library change. I’ll be following the Github issue you started.
   Thanks again for your attention to this issue.
 *  Thread Starter [whax](https://wordpress.org/support/users/whax/)
 * (@whax)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/#post-12305712)
 * Resolved

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/page/2/?output_format=md)

The topic ‘Fatal error: getWithPrefixLen()’ is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 17 replies
 * 6 participants
 * Last reply from: [Diego](https://wordpress.org/support/users/daigo75/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/fatal-error-getwithprefixlen/page/2/#post-12308728)
 * Status: resolved