Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Read "GeoLiteCity-Blocks.csv" into database - file does not exist or is corrupt

Hi,

I'm trying to install GeoIp on my Vanilla forums v. 2.0.18.9

The file download and unzip steps went ok (I checked and the files are in the upload folder), but the third step fails giving me this message :

file does not exist or is corrupt

Any idea what I might be doing wrong?

Thanks,

Olivier
www.permacultureorchard.com

Tagged:
«1

Comments

  • hgtonighthgtonight MVP
    edited December 2013

    Welcome to the community!

    How big is the GeoLiteCity-Location.csv file in your uploads folder?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks! :-)

    The file is 23.5 Mb

  • That sounds about right. I would delete the files and try again.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • I've done it 3 times already, I've also used the delete tables function, then disabled, and re-enabled the plugin.

  • Just tried again, same thing. Could it be something to do with access rights?

  • Mind sharing the details of your upload folder?

    I am looking for filenames, permissions, and filesizes.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • empty
    755 permaculture/pe... Nov 26 16:54 0B

    GeoLiteCity-Blocks.csv
    644 permaculture/pe... Dec 05 17:40 60.7M

    GeoLiteCity-latest.zip
    664 permaculture/pe... Dec 15 21:11 24.1M

    GeoLiteCity-Location.csv
    644 permaculture/pe... Dec 05 17:40 23.5M

  • peregrineperegrine MVP
    edited December 2013

    you can manually look at the csv file by loading into excel or looking in a text editor.

    also try to manually unzip the file if it unzips and is not corrupted you are fine.

    otherwise manually download the file

    http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip

    and unzip it. if it unzips and is not corrupted you are fine.

    perhaps they shrunk the file since r_j wrote the plugin

    in any event.

    try changing in class.geoipdata-plugin.php

    if (file_exists($zipfile) && filesize($zipfile) > 25000000) {

    try changing this line to this to remove the size requirement in

    if (file_exists($zipfile) {
    

    and that should load your file.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • no difference. I'm still getting the same message. I did try to open the CSV it looks fine.

  • actually the problem isnt the unzipping of the file, that works fine, its the loading of the data into the DB that doesn't work.

  • change line 137 to

    $Sender->InformMessage(T('File GeoLiteCity-latest.zip does not exist or is corrupt!'));

    change line 167 to

            $Sender->InformMessage(T('File GeoLiteCity-Blocks.csv does not exist or is corrupt!'));
    

    then what is your error mesage.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • also change this line 154

    if (file_exists($infile) && filesize($infile) > 65000000) {

    to

    if (file_exists($infile)) {

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I assume you meant 176 for the second line.

    Message is :
    File GeoLiteCity-Blocks.csv does not exist or is corrupt!

  • peregrineperegrine MVP
    edited December 2013

    yes

    I assume you meant 176 for the second line.

    Message is : File GeoLiteCity-Blocks.csv does not exist or is corrupt!

    yes

    also change this line 154

    if (file_exists($infile) && filesize($infile) > 65000000) {
    
    to
    
    if (file_exists($infile)) {
    

    what is your error message now?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I didnt get the message this time. Waited a few secs while the file was being read I guess, then :

    Bonk
    Something funky happened. Please bear with us while we iron out the kinks.

  • well, now you are making progress now read the wiki for what to do when you get bonk messages

    or read the documentation for bonk messages and report the real error.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • ok, ill try that, thanks for your help!

  • so there are a few things that r_j should change in the plugin.

    the inform message should tell you which file you are having a problem with.

    and the sizes should be reduced.

    $Sender->InformMessage

    I would think it would be easier to just write manual instructions to tell person to download the zip and which directory to place it in and unzip. - would save a bunch of hassle in the long run.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Thanks for supporting while I'm sleeping ;)
    I'll have a look at it as soon as possible!

Sign In or Register to comment.