Author Topic: Regional Mesonet Map NWWN - not showing stations  (Read 196 times)

0 Members and 2 Guests are viewing this topic.

Offline n7dq

  • Member
  • *
  • Posts: 18
    • Island Drive Weather
Regional Mesonet Map NWWN - not showing stations
« on: March 17, 2024, 08:44:06 PM »
I've been working to get NWWN Mesonet Map working, I've got the current release.

It looks like the script  mesonet-map-inc.php is ending early when I do debug=true.

I pretty sure I did something wrong in the configuration but need some guidance to work to a solution.

https://www.n7dq.com/weather/wxmesonetmap.php

Thanks in advance.

Mike

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #1 on: March 17, 2024, 09:06:04 PM »
For some unknown reason, the needed script mesonet-map-json.php is has a 500-Server Error return instead of the expected JSON file.

Change mesonet-map-json.php from
Quote
<?php
at the top to be
Quote
<?php
error_reporting(E_ALL);
ini_set('display_errors','1');
so we can see what the issue may be.

No stations will be shown without having that script fully working.
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 n7dq

  • Member
  • *
  • Posts: 18
    • Island Drive Weather
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #2 on: March 17, 2024, 09:13:49 PM »
Here is the message I got back after the change:

Fatal error: Uncaught Error: Call to undefined function locale_get_default() in /var/www/html/weather/mesonet-map-common.php:921 Stack trace: #0 /var/www/html/weather/mesonet-map-json.php(117): new_strftime() #1 {main} thrown in /var/www/html/weather/mesonet-map-common.php on line 921

Where would this function be defined?

Mike

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #3 on: March 17, 2024, 09:20:08 PM »
Ahh... that's a PHP issue.  The locale_get_default() function is built-in to PHP when PHP is compiled with --enable-intl

Ask your hoster to include the INTL functions in your PHP.
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 n7dq

  • Member
  • *
  • Posts: 18
    • Island Drive Weather
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #4 on: March 17, 2024, 09:44:35 PM »
That would be me. Should be easy to figure out.

Just need get added on the Lightsail instance.

Thank you for all the help.

Mike

Offline n7dq

  • Member
  • *
  • Posts: 18
    • Island Drive Weather
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #5 on: Yesterday at 10:06:22 AM »
I installed php-intl on ubuntu 22.04 LTS and this solved the problem without any other changes.

Mike

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9244
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Regional Mesonet Map NWWN - not showing stations
« Reply #6 on: Yesterday at 10:08:25 AM »
Great!  Glad you got it sorted out.
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