WXforum.net
Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: PaulMy on March 02, 2017, 10:59:27 PM
-
I have this code in my www.komokaweather.ca index.php
<!-- Blitzortung Animated Lightning Map -->
<div align="center">
<img style="width: 620px; height: 465px;" src="../BOmaps/cache/BONorthAmerica-ani.gif" alt="Blitzortung Lightning Strikes Map"/>
<?php include_once("BOmaps/cache/BONorthAmerica-map.html"); ?>
<br />
For Blitzortung Network Station Details Click on Station Location on the following:<br />
<a target="frame1" href="../BOmaps/index.php"><b>NORTH AMERICA MAP</b></a><br />
<a target="frame1" href="../BOmaps/indexON.php"><b>Canada - ONTARIO MAP</b></a><br />
<a target="frame1" href="../BOmaps/indexSON.php"><b>GREAT LAKES REGION MAP</b></a><br />
<u>Blitzortung North America Network Showing Recent Lightning Strokes and Reporting Stations</u><br />
</div>
From the www.komokaweather.ca home page the North America maps displays but with 2015-05-22 data.
From www.komokaweather.com/BOmaps/index.php that same North America map also shows with that 2015-05-22 data.
From www.komokaweather.ca home page and clicking on the Canada - ONTARIO MAP link below the BO map the map doesn't change.
However from www.komokaweather.ca/BOmaps/indexON.php displays the current date map for Ontario.
From www.komokaweather.ca home page and clicking on the GREAT LAKES REGION MAP link below the BO map the map doesn't change.
However from www.komokaweather.ca/BOmaps/indexSON.php displays the current date map for the Great Lakes / Souther Ontario region.
Any thoughts what may be causing the 2015-05-22 data in the default map, and why clicking on the other two links the map doesn't change, but does show by direct URL?
Paul
-
Now the Canada - ONTARIO and GREAT LAKES REGION map links are working on the www.komokaweather.ca home page. Maybe a cache issue after I re-uploaded all the BOmaps files.
And after closes watch, the North America map cycles with the first 10 frames with the 2015-05-22 date and 2 frames with the correct current date/time.
Paul
-
When you start the collection after clearing the cache, the script copies the first image generated to the rest of the saved images so the GIF cycle can work .. give it 10 cycles, and it will clear out the duplicate images automatically.
-
Thanks Ken,
It looks like I must still have something wrong in my reinstall. The date and time on top of the maps are outdated and only up to last night. Should I delete cache somewhere?
Regards,
Paul
-
Check the log file produced by the BOmapgen script .. it should show the status of the last cron run of the script.
On your site BOmaps/cache/gen-BO-maps-log.txt shows the last run was Thu, 02 Mar 2017 22:21:05
Methinks your cron is not working correctly. Try logging on your site via SSH and run the cronjob script for BOmaps manually to see what errors may exist. A likely culprit is the hoster changing the PHP CLI executable directory path.. it's happened to me :)
-
Thanks again Ken,
I presume then that this from the gen-BO-maps-log.txt does not indicate a current 2017 03 03 update?
fetching new strikes file at http://user:pass-omitted@data.blitzortung.org/Data_3/Protected/Strikes/2017/03/03/03/00.json timed calls took 0.002 for 5 executions in 1.029 seconds. 5 lines read. 5 lines written to cache/strikes.txt. fetching new strikes file at http://user:pass-omitted@data.blitzortung.org/Data_3/Protected/Strikes/2017/03/03/03/10.json timed calls took 0.003 for 11 executions in 1.030 seconds. 11 lines read. 11 lines written to cache/strikes.txt. fetching new strikes file at http://user:pass-omitted@data.blitzortung.org/Data_3/Protected/Strikes/2017/03/03/03/20.json timed calls took 0.001 for 3 executions in 0.882 seconds.
I hadn't been able to find anything on whether the cron jobs were actually running and unfortunately I am not familiar with SSH :oops: I will call GoDaddy.
Paul
Paul
-
My web hoster (hosting24.com) uses cPanel, which has a GUI way of accessing the cron. cPanel has a pretty easy tool to enter cron jobs, although most of mine run on my own Linux box.
I found this about cPanel and GoDaddy: https://www.godaddy.com/help/logging-in-to-cpanel-shared-hosting-8884 (https://www.godaddy.com/help/logging-in-to-cpanel-shared-hosting-8884)
It should be under "Advanced" > "Cron Jobs"
Greg H.
-
Thanks Greg,
I think it is because I have not upgraded that I don't have the newer so called cPanel interface. I can access my Hosting Details and from there to CronJobs but there is nothing available in the settings other than create/edit the cron jobs and edit the email address for receiving errors (which I have not received any).
The good news is that the crons must be working and updating every 5 minutes as the BOmaps are displaying correctly. now.
Regards,
Paul
-
Where can I get this script from?
-
If you have a running Blitzortung RED or BLUE detector, I can send you the scripts -- they do require a Blitzortung userid:password (which is only issued to stations with detectors).
-
If you have a running Blitzortung RED or BLUE detector, I can send you the scripts -- they do require a Blitzortung userid:password (which is only issued to stations with detectors).
Bummer don't have one. np it's a cool script tho.
-
Strange problem with BOMaps as of 3:19 AM today: my GoDaddy-hosted site stopped updating the maps (https://www.gwwilkins.org/wxBO2hourmaps.php) and eventually returns an internal server error when https://www.gwwilkins.org/BOmap/gen-BO-maps.php is run in Firefox (just times out in Chrome). Meanwhile my alternate/testing site just keeps chugging along (http://selincolnwx.info/wxBO2hourmaps.php).
I've attached a log file from earlier this morning. I notice a supposed max 200 Mb limit for strikes.txt which has been far exceeded, but it doesn't seem to be the problem because the same script works on my Linux Debian server.
What did GoDaddy maybe do to trash the updates here?
-
My site hosted by Hosting24 wasn't showing the maps either this morning.
I just checked and my domain miraculon.net (http://miraculon.net) (where the maps are) just updated DNS and it looks like that was causing my problem. I had recently transferred domain name registration and it coincidentally was updated this morning.
Greg H.
-
Thanks for the reply, Greg. As of 9:00 AM my maps are updating again as well.
-
You may see some more 'irregularities' periodically... Typically, early and late in the Northern Hemisphere season is when refinement and adjustments are tested and implemented both on the main BT servers, and the Lightningmaps server... especially with new GNSS modules, and upcoming 19.5 Blue system production... some changes were implemented last week and over the weekend... most are not 'obvious'... st least at the moment...
:twisted:
-
I am not getting updated strike data this morning. I also see http://www.beamsvillewx.ca/wxnablitz.php (http://www.beamsvillewx.ca/wxnablitz.php) has the same issue, yet Saratoga-Weather (https://saratoga-weather.org/NA-lightning.php) has current strike data. Did some file locations at Blitzortung change? (and I didn't get the memo...)
Greg H.
-
Hi Greg,
Not sure what to look for but mine seems to be ok
http://www.komokaweather.com/BOmaps/indexON.php (http://www.komokaweather.com/BOmaps/indexON.phphttp://www.komokaweather.com/weather/)
http://www.komokaweather.com/weather/ (http://www.komokaweather.com/BOmaps/indexON.phphttp://www.komokaweather.com/weather/) (scroll down for the full NA map)
Paul
-
I am not getting updated strike data this morning. I also see http://www.beamsvillewx.ca/wxnablitz.php (http://www.beamsvillewx.ca/wxnablitz.php) has the same issue, yet Saratoga-Weather (https://saratoga-weather.org/NA-lightning.php) has current strike data. Did some file locations at Blitzortung change? (and I didn't get the memo...)
Greg H.
Hi Greg,
You are using data.lightningmaps.org for the data .. apparently, they stopped replicating that from data.blitzortung.org last week.
Change your BOmapgen-inc.php to use data.blitzortung.org then it should work again.
-
Thanks, Ken. I changed the data source and I can see the strikes and stations loading with recent data again.
Greg H.
-
We are getting lightning strikes in range of my Robo (http://blitzortung.boeck.ws/lmapgen.php) lmapgen map and there were no strikes showing on that map.
The perl script lmapgen.pl needs to have the line showing the $url from data.lightningmaps.org to data.blitzortung.org.
It should also be changed in the next "print "Fetching lightning data..." line.
Once I made this simple change, it started showing the strikes again. No other mods are required. It looks like his 0.7.1 version has the line changed:
for ($i = 1; $i <= 13; $i++) {
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime ($ltime);
$url = sprintf ("http://%s:%s\@data.blitzortung.org/Data_%1u/Protected/Strokes/%4u/%02u/%02u/%02u/%02u.log", $user, $pass, $region, $year + 1900, $mon + 1, $mday, $hour, $min);
print "Fetching lightning data from blitzortung.org ...\n" if $verbose;
$content = get ($url);
unless (defined $content) {
print "Couldn't get lightning data!\n" if $verbose;
This the same issue that affected Ken's script last week or so.
Greg H.
Update and P.S.: The data2.blitzortung.org fix that worked for Ken's lightning scripts did not work for the Robo script. It is working again so, the original data.blitzortung.org must be OK now.