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

    (@gregross)

    The download code uses the WordPress download_url() function there are a few things to check:

    – Does your web server have write access to the wordpress/wp-content/uploads directory?
    – Can your web server create sub directories in wordpress/wp-content/uploads?
    – Does your web host block outbound connections?

    You could also manually download the file and unzip it to wordpress/wp-content/uploads/wp-statistics.

    Thread Starter gamesaweek

    (@gamesaweek)

    Yes for the firdt two question and no for the third. If I download that file after it would update without error?

    Plugin Contributor Greg Ross

    (@gregross)

    Check your PHP error logs, see if anything comes up.

    Try creating the directory and try it again.

    Thread Starter gamesaweek

    (@gamesaweek)

    The only error i have is the error that i wrote up

    Plugin Contributor Greg Ross

    (@gregross)

    Edit wordpress/wp-content/plugins/wp-stastitics/wp-statistics.php, change line 375 from:

    $result = "<div class='updated settings-error'><p><strong>" . sprintf(__('Error downloading GeoIP database from: %s', 'wp_statistics'), $download_url) . "</strong></p></div>";

    to

    $result = "<div class='updated settings-error'><p><strong>" . sprintf(__('Error downloading GeoIP database from: %s', 'wp_statistics'), $TempFile->get_error_message() ) . "</strong></p></div>";

    Try downloading it again and see what the error message is.

    Thread Starter gamesaweek

    (@gamesaweek)

    The line is the 749, and if I change it the backend of the site would charge anything on the screen, so it go in crash all the website.

    Plugin Contributor Greg Ross

    (@gregross)

    wp-statistics.php should only have 449 lines in it if your running the current version.

    Make sure you’ve changed the correct line:

    // Download
    $TempFile = download_url( $download_url );
    if (is_wp_error( $TempFile ) ) {
    	$result = "<div class='updated settings-error'><p><strong>" . sprintf(__('Error downloading GeoIP database from: %s', 'wp_statistics'), $TempFile->get_error_message() ) . "</strong></p></div>";
    }
    Thread Starter gamesaweek

    (@gamesaweek)

    This is the error now:
    Error downloading GeoIP database from: Forbidden

    Plugin Contributor Greg Ross

    (@gregross)

    Looks like something is blocking you from downloading the file. Perhaps your hosts ip has been blacklisted by MaxMind.

    Thread Starter gamesaweek

    (@gamesaweek)

    If you don’t have other explanation thank for the help however.

    Plugin Contributor Greg Ross

    (@gregross)

    You can manually download and install the database, but beyond that it’s something outside of the plugin that’s blocking the download.

    Good luck.

    I get a 404 on the download link:

    https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz:

    Seems an error in the link. When I remove the : I can download.

    Plugin Contributor Greg Ross

    (@gregross)

    That’s just an error in how your browser is hyperlinking the text, the colon should not be part of the link.

    I’ve changed the display code, it should be better in the next release.

    Well I was playing around with this since I have the same problem.

    If I copy the download link and try it through my browser then the maxmind server returns this message on my browser window:

    “403 Forbidden
    Rate limited exceeded, please try again in 24 hours.”

    Do you think that they have actually placed a limit of downloads per day through your plugin or for direct downloads?

    I will try again in 24 hours.

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic. This topic has been resolved.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Error downloading geoip database’ is closed to new replies.