• spajonas

    (@spajonas)


    WP Statistics keeps causing fatal errors on my website and I then have to use Recovery Mode to get in and disable the plugin. Here are the error details. How do I fix this? (*** used to obfuscate my website information) (I have the latest version of WP Statistics.)

    Error Details
    =============
    An error of type E_ERROR was caused in line 246 of the file /***/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php. Error message: Uncaught Error: Call to undefined method MaxMind\Db\Reader::getWithPrefixLen() in /***/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php:246
    Stack trace:
    #0 /***/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php(217): GeoIp2\Database\Reader->getRecord()
    #1 /***/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php(90): GeoIp2\Database\Reader->modelFor()
    #2 /***/wp-content/plugins/wp-statistics/includes/class-wp-statistics-geoip.php(183): GeoIp2\Database\Reader->country()
    #3 /***/wp-content/plugins/wp-statistics/includes/class-wp-statistics-exclusion.php(377): WP_STATISTICS\GeoIP::getCountry()
    #4 /***/wp-content/plugins/wp-statistics/includes/class-wp-statistics-exclusion.php

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi,

    Thank you for reporting the issue, please make sure this file exists on the bellow path:

    wp-content/plugins/wp-statistics/includes/vendor/maxmind-db/reader/src/MaxMind/Db/Reader.php

    If is not, try to install the plugin manually.

    Thread Starter spajonas

    (@spajonas)

    Hi,

    That Reader.php file is there on all the websites I run this plugin on. It is not working on any of the websites currently, and I’ve had to disable the plugin. So, what do I do next?

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Can you please tell me what’s your PHP version?

    Thread Starter spajonas

    (@spajonas)

    Hi! Here’s all the stats you need to know about my PHP setup.

    Web server
    Apache
    PHP version
    7.4.28 (Supports 64bit values)
    PHP SAPI
    cgi-fcgi
    PHP max input variables
    5000
    PHP time limit
    10000
    PHP memory limit
    512M
    Max input time
    1000
    Upload max filesize
    50M
    PHP post max size
    512M

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Weird indeed, I have no clue what’s wrong there since this section works properly for me and other users.

    Thread Starter spajonas

    (@spajonas)

    I noticed something else. It errors out when I’m not logged in. When I’m logged in, I see no problems. When I log out, or view my site in a private/incognito window, I get the “This site is experiencing fatal errors” warning. Does that help? I don’t know what happened. Everything was working fine until a week ago. Now I can’t run this plugin on any of my sites and I hate Google Analytics. I don’t want to have to go back to that.

    Hi, @mostafas1990 I am also having a very similar error but to a different ‘reader’ file.
    It appears to have happened when I upgraded to the latest version of the plugin. It only shows to non-logged in users of the website. I didn’t notice it until a site visitor emailed me.
    My error code is below (I have changed the file path and my ip address

    Fatal error: Uncaught Error: Call to undefined method MaxMind\Db\Reader::getWithPrefixLen() in /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php:246 Stack trace: 
    #0 /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php(217): GeoIp2\Database\Reader->getRecord('Country', 'Country', 'MY_IP_ADDRESS') 
    #1 /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php(90): GeoIp2\Database\Reader->modelFor('Country', 'Country', 'MY_IP_ADDRESS') 
    #2 /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/class-wp-statistics-geoip.php(183): GeoIp2\Database\Reader->country('MY_IP_ADDRESS') 
    #3 /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/class-wp-statistics-exclusion.php(377): WP_STATISTICS\GeoIP::getCountry() 
    #4 /MY_SITE_DIRECTORY/wp-content/plugins/wp-s in /MY_SITE_DIRECTORY/wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Database/Reader.php on line 246

    Many Thanks in advance

    Hi,

    Hope you are fine and doing well.

    As we need to do more investigation, please contact us via our Help Desk.
    We will find a solution for you ASAP.

    Best Regards

    Thread Starter spajonas

    (@spajonas)

    @reventon94 I tried using the support form on your website to contact you but it’s only for paying customers. It looks like I’m not alone with this situation happening. Can you please update us on where you are in the process of fixing this? I had to turn off this plugin on 4 sites and I would like to start using it again. Thanks!

    Hi @spajonas

    Hope you are fine and doing well.

    It is weird. Because we have never faced these fatal errors before.
    Anyway, I will test the plugin in some situations.
    If I face the same errors in my tests, I will try to find a solution for it and get back to you with an answer.

    Best Regards

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal errors on my website’ is closed to new replies.