Author Topic: Who's Online Update  (Read 1098 times)

0 Members and 1 Guest are viewing this topic.

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Who's Online Update
« on: July 28, 2018, 08:19:02 PM »
Has anyone else noticed that the Who's Online script stopped updating it's Maxmind GeoLiteCity database in March?

It seems MaxMind made a change that broke the script. https://dev.maxmind.com/geoip/legacy/geolite/

Anyone know the best way to fix this?

Offline DW7240

  • Senior Contributor
  • ****
  • Posts: 225
    • The Vicarage Weather Feed
Re: Who's Online Update
« Reply #1 on: August 01, 2018, 11:49:06 PM »
Hi,

Since the change at Maxmind you need to change the URL address in the "wo-update.php" script as follows....

// maxmind url to download from
$C['url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz';
//$C['url'] = 'http://www.642weather.com/weather/GeoLiteCity.dat.gz'; // do not use my URL!

just edit the middle line as above, the database will then update when you run "wo-update.php" from your website.

THis is only a short term fix, the scripts will have to be changed before January 2019 - Hopefully someone is upto the task... :grin:


Nick. dw7240.com.
« Last Edit: August 01, 2018, 11:53:23 PM by DW7240 »


Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Re: Who's Online Update
« Reply #2 on: August 02, 2018, 07:50:11 AM »
Thanks for looking at this.

I get the following when I change the URL as above.

Code: [Select]
Checking for updates for the Maxmind GeoLiteCity database...
Connecting to this URL: http://www.642weather.com/weather/GeoLiteCity.dat.gz
curl_last_mod error: fetching timestamp failed for URL, 404 not found?

Offline DW7240

  • Senior Contributor
  • ****
  • Posts: 225
    • The Vicarage Weather Feed
Re: Who's Online Update
« Reply #3 on: August 02, 2018, 11:33:32 AM »
Hi,

My mistake, I forgot one file update, you need to goto        https://dev.maxmind.com/geoip/legacy/geolite/


Then find "GeoLite City" dat file, third in the list, Binary / Gzip file, download this, unzip if needed, then copy to your website directory where the main scripts live, the file once on your site should be called GeoLiteCityv6.dat.

Now the script should update as normal, but only until January 2019, then the main scripts have to be updated.  Also you mafind that you have to periodically update the GeoLiteCity.dat file, I think this file is updated monthly.

Also check your URL entry, it looks like you script is trying to load 642weather.com which is the address of the main script writer, it should be downloading from http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz';

Nick. dw7240.com.
« Last Edit: August 02, 2018, 12:09:08 PM by DW7240 »


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Who's Online Update
« Reply #4 on: August 02, 2018, 01:32:47 PM »
As a start on additional changes I found this change needed at line 706 in '/whos-online/include-whos-online-page.php':
Code: [Select]
        $remote_file_time = curl_last_mod('http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz');to
Code: [Select]
        $remote_file_time = curl_last_mod('http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz');
in order to check for the correct file time.  There's code in there that demands a 6 hr. wait before checking the file time again, so I'm not sure yet if this works like it should becauseI didn't want to diddle further with the script.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Who's Online Update
« Reply #5 on: August 02, 2018, 01:44:06 PM »
Also '/whos-online/wo-update.php' on line 33:
Code: [Select]
$this->setting['url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz';to
Code: [Select]
$this->setting['url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz';
but then the script becomes much less transparent to me.  I don't think this simple change will be effective because more changes appear to be needed.

I suspect that the 'last updated' time will be wrong until these further changes are made.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Forecaster
  • *****
  • Posts: 923
    • North Bend Weather
Re: Who's Online Update
« Reply #6 on: August 04, 2018, 02:49:04 PM »
I got mine too update after making those changes.
"Nature can do without man, but man cannot do without nature."


Software: WeatherDisplay
Hardware: Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam + Soil temp + Soil Moisture

Offline Forever

  • Senior Contributor
  • ****
  • Posts: 211
Re: Who's Online Update
« Reply #7 on: August 05, 2018, 12:08:55 AM »
I went back to the old file because I was getting odd output with the beta file.