Support » Plugin: WP Statistics » error after the update 8.7 of WP Statistics

  • Resolved stakito

    (@stakito)


    Hi there, i have just updated the plugin for my site silistra.cc and i
    have several error messages such as:
    1. Warning:
    fopen(/home/silistra/public_html/wp-content/uploads/wp-statistics/GeoLite2-Country.mmdb):
    failed to open stream: Permission denied in
    /home/silistra/public_html/wp-content/plugins/wp-statistics/wps-updates.php
    on line 41
    2. Error could not open destination GeoIP database for writing
    /home/silistra/public_html/wp-content/uploads/wp-statistics/GeoLite2-Country.mmdb

    Could you please help me – the errors appear not only in the wp admin
    menu, but also on the web site main page and category bar.
    The web site is http://www.silistra.cc

    Also i could not upload any new photos to my new or existing articles. When i deactivated the plugin all errors gone.
    I still would like to use this plugin but if there is no reasonable explanation and fix to these errors i will go to other plugins

    https://wordpress.org/plugins/wp-statistics/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Greg Ross

    (@gregross)

    What version did you upgrade from? Until we can figure out what is wrong you may want to disable the GeoIP code via Statistics->Settings->GeoIP, which should suppress the errors but still collection statistics.

    Check to make sure the ‘/home/silistra/public_html/wp-content/uploads/wp-statistics’ directory exists and it has write access. Similarly check the GeoLite2-Country.mmdb file in the directory to make sure it can be written to.

    What is the file size of the .mmdb file?

    Can you upload photos when WP Statistics is disabled?

    Hello
    I’ve also the image upload error.
    All erros have been gone when deactivating the WP Statistics (Version 8.7)

    Public error message:
    Undefined property: GeoIPHits::$exclusion_match in [....]/wp-content/plugins/wp-statistics/includes/classes/hits.geoip.class.php on line 45

    Looking at the informations there you’ll find the following PHP:

    // Check to see if we are excluded by the GeoIP rules.
    			if( !$this->exclusion_match ) {
    				// Grab the excluded/included countries lists, force the country codes to be in upper case to match what the GeoIP code uses.
    				$excluded_countries = explode( "\n", strtoupper($this->get_option('excluded_countries') ) );
    				$included_countries_string = trim( strtoupper($this->get_option('included_countries') ) ); 
    
    				// We need to be really sure this isn't an empty string or explode will return an array with one entry instead of none.
    				if( $included_countries_string == '' ) { $included_countries = array(); } else { $included_countries = explode( "\n", $included_countries_string ); }
    
    				// Check to see if the current location is in the excluded countries list.
    				if( in_array( $this->location, $excluded_countries ) ) {
    					$this->exclusion_match = TRUE;
    					$this->exclusion_reason = "geoip";
    				} // Check to see if the current location is not the included countries list.
    				else if( !in_array( $this->location, $included_countries ) && count( $included_countries ) > 0 ) {
    					$this->exclusion_match = TRUE;
    					$this->exclusion_reason = "geoip";
    				}
    			}

    Plugin Contributor Greg Ross

    (@gregross)

    The upload issue is a bug in the variable scope. Edit wp-statistics/includes/classes/hits.class.php, line 16/17 are currently:

    private $exclusion_match = FALSE;
    private $exclusion_reason = '';

    change them to:

    protected $exclusion_match = FALSE;
    protected $exclusion_reason = '';

    I’ll do a 8.7.1 release in a few minutes to resolve.

    Hi there again, further to the problems
    1. What version did you upgrade from? i am with the plugin since 09.2014, so i upgraded all the time till now.
    2. Until we can figure out what is wrong you may want to disable the GeoIP code via Statistics->Settings->GeoIP, which should suppress the errors but still collection statistics. I disabled it and it is ok.
    3. Check to make sure the ‘/home/silistra/public_html/wp-content/uploads/wp-statistics’ directory exists and it has write access. exists 755
    4 Similarly check the GeoLite2-Country.mmdb file in the directory to make sure it can be written to. exists 644
    5. What is the file size of the .mmdb file? 2.24mb

    All this is after the update to 8.7.1
    I can see now my uploaded files and i can upload files.
    After i disabled the GeoIP no error on the bar, it is running OK. But can it be fixed again to work. Also if i share a link to facebook i cannot upload an image, instead i have a blank image,what could be wrong?

    Plugin Contributor Greg Ross

    (@gregross)

    Is the owner of the .mmdb the same as the user the web server is running as? If not, that will be a problem as we won’t have write access to it.

    Just upgraded to Version: 8.7.1 on several of the sites I support.
    Performed the update last night. Today all the sites that I did the update on are down.

    This is the error I get when going to the sites

    Service Temporarily Unavailable
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    Apache Server at http://www.customer.com Port 80

    My hosting service thinks it is the plugin. Other sites where I did not
    update are OK this morning.

    They told me that there were may open processes and memory usage issues.
    Unfortunately they would not or could not provide me with more specific information to diagnose the problem.

    Has anyone else reported this issue Running on Apache in a Virtual host environment.

    Thanks for any help,

    Frank

    Plugin Contributor Greg Ross

    (@gregross)

    No reports of so far and I run several of my sites in virtual environments. If you need to manually disable the plugin, the FAQ has how to do this:

    = Something has gone horribly wrong and my site no longer loads, how can I disable the plugin without access to the admin area? =

    You can manually disable plugins in WordPress by simply renaming the folder they are installed in. Using FTP or your hosting providers file manager, go to your WordPress directory, from ther go to wp-content/plugins and rename or delete the wp-statistics folder.

    Plugin Contributor Greg Ross

    (@gregross)

    Closing due to inactivity.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘error after the update 8.7 of WP Statistics’ is closed to new replies.