Author Topic: Regional Mesonet map Saratoga Template.  (Read 663 times)

0 Members and 1 Guest are viewing this topic.

Offline zmarfak

  • Contributor
  • ***
  • Posts: 122
    • Matar
Regional Mesonet map Saratoga Template.
« on: February 18, 2022, 07:27:43 AM »
Hi,
I updated the mesonet files a while ago when Ken corrected them for PHP 8.1.
Now I see that my regional mesonet map is not working.
There is no problem with my global map.

Has anyone has a clue what to search for ?

regional map : https://www.matar.be/weather/wxmesonetmap.php
global map : https://www.matar.be/weather/wxglobal.php

PHP version used  : 8.0.15

Thanks

PS
when I run  wxmesonetmap.php on my local computer I have following messages ( I don't know if it is related ) (running : IIS  Manager)
Code: [Select]
PHP Fatal error:  Uncaught Error: Call to undefined function locale_get_default() in D:\data\matar\weather\mesonet-map-common.php:921
Stack trace:
#0 D:\data\matar\weather\mesonet-map-genhtml-inc.php(200): new_strftime()
#1 D:\data\matar\weather\mesonet-map-inc.php(168): include_once('...')
#2 D:\data\matar\weather\wxmesonetmap.php(75): include_once('...')
#3 {main}
  thrown in D:\data\matar\weather\mesonet-map-common.php on line 921
« Last Edit: February 18, 2022, 07:49:07 AM by zmarfak »
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline zmarfak

  • Contributor
  • ***
  • Posts: 122
    • Matar
Re: Regional Mesonet map Saratoga Template.
« Reply #1 on: February 19, 2022, 03:36:22 AM »
Guys,
forget this post.
Maybe there  was  a  hiccup with connections  ? Who knows  ? Anyway everything seems ok now

Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline zmarfak

  • Contributor
  • ***
  • Posts: 122
    • Matar
Re: Regional Mesonet map Saratoga Template.
« Reply #2 on: September 01, 2022, 02:32:42 AM »
Hi,
I have again problems with my regional map, global map works fine.
I get following error in the "proxy error log"
Code: [Select]
2022/09/01 08:24:11 [error] 1616#0: *112911375 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: date(): Argument #2 ($timestamp) must be of type ?int, string given in /var/www/vhosts/matar.be/httpdocs/weather/mesonet-map-common.php:525
Stack trace:
#0 /var/www/vhosts/matar.be/httpdocs/weather/mesonet-map-common.php(525): date()
#1 /var/www/vhosts/matar.be/httpdocs/weather/mesonet-map-json.php(175): RMNET_convertUnits()
#2 /var/www/vhosts/matar.be/httpdocs/weather/mesonet-map-json.php(124): RMNET_make_JSON()
#3 {main}
  thrown in /var/www/vhosts/matar.be/httpdocs/weather/mesonet-map-common.php on line 525" while reading upstream, client: 91.177.27.214, server: matar.be, request: "GET /weather/mesonet-map-json.php HTTP/2.0", upstream: "fastcgi://unix:///var/www/vhosts/system/matar.be/php-fpm.sock:", host: "www.matar.be", referrer: "https://www.matar.be/weather/wxmesonetmap.php"

regional display (not ok):
https://www.matar.be/weather/wxmesonetmap.php

global display (ok) :
https://www.matar.be/weather/wxglobal.php

Anyone has an idea how to solve this ?
Thanks
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline Jasiu

  • Forecaster
  • *****
  • Posts: 906
    • LexMAWeather
Re: Regional Mesonet map Saratoga Template.
« Reply #3 on: September 01, 2022, 08:31:08 AM »
Ken posted changes yesterday. Maybe that's related?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8766
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional Mesonet map Saratoga Template.
« Reply #4 on: September 01, 2022, 11:37:24 AM »
No, that's a different problem caused by malformed JSON from mesonet-map-json.php for the BNLWN network.  It's missing some stuff at the end of the JSON file, so it results in a JavaScript error on the display and the date() error shown above. 

It was caused by a bad entry at the end of the BNLWN-conditions.txt file
Quote
Netherlands   Schoonebeek   118|,,,,,,,,,,,,,,1662046339,0.141
which was missing all the needed data.

I've updated the mesonet-map-json.php to V4.09 to reject that.. try the attached.

edit: added the script to the distribution of mesonet-map.zip so the mesonet-map-check-versions.php utility will also note the update.
« Last Edit: September 01, 2022, 11:51:47 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline zmarfak

  • Contributor
  • ***
  • Posts: 122
    • Matar
Re: Regional Mesonet map Saratoga Template.
« Reply #5 on: September 01, 2022, 02:23:08 PM »
Ken,
Thank you (again) for the solution.
Just installed it and it's ok. [tup]
Patrick
Davis Vantage Pro2 with a Meteobridge NANO SD and WL (6.04) on a Intel NUC 
https://www.matar.be

Offline rrrick8

  • Senior Contributor
  • ****
  • Posts: 207
    • Vermilion weather
Re: Regional Mesonet map Saratoga Template.
« Reply #6 on: September 02, 2022, 09:08:34 AM »
As a side, whenever I come to this thread I get a Malwarebytes Blocked pop-up notice about your website zmarfak.
Don't know history or if you are aware of it. As one who had to fight Google incorrectly labeling my website as malicious a couple years ago, it can be a pain to correct.
Just wanted to let you know.

Rick
 [ You are not allowed to view attachments ]
Severe Weather Manager-Vermilion County EMA
CWOP-CW9931 KILDANVI5

 

anything