WordPress.org

Ready to get started?Download WordPress

Forums

WP Statistics
[resolved] Error downloading geoip database (16 posts)

  1. gamesaweek
    Member
    Posted 3 months ago #

    There is the note of error:
    Error downloading GeoIP database from: http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
    Can you help me?

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

  2. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

    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.

  3. gamesaweek
    Member
    Posted 3 months ago #

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

  4. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

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

    Try creating the directory and try it again.

  5. gamesaweek
    Member
    Posted 3 months ago #

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

  6. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

    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.

  7. gamesaweek
    Member
    Posted 3 months ago #

    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.

  8. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

    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>";
    }
  9. gamesaweek
    Member
    Posted 3 months ago #

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

  10. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

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

  11. gamesaweek
    Member
    Posted 3 months ago #

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

  12. Greg Ross
    Member
    Plugin Author

    Posted 3 months ago #

    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.

  13. LegeDoos
    Member
    Posted 2 months ago #

    I get a 404 on the download link:

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

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

  14. Greg Ross
    Member
    Plugin Author

    Posted 2 months ago #

    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.

  15. Jargonsp
    Member
    Posted 1 month ago #

    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.

  16. esmi
    Forum Moderator
    Posted 1 month ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic