Author Topic: Saratoga Meteoalarm Alerts  (Read 1041 times)

0 Members and 1 Guest are viewing this topic.

Offline dundalkwx

  • Member
  • *
  • Posts: 38
Saratoga Meteoalarm Alerts
« on: December 01, 2016, 02:31:30 PM »
Hi,

I've recently moved my site over to my own Apache Web Server on a Raspberry Pi, everything seems to work as it should except the MeteoAlarm alerts.
For some reason they display alerts for the data I moved the site and don't seem to update.

I'm pretty sure its a permissions issue but am unsure on how to fix it  :?

The site is http://www.dundalkweather.net

I should point out that I did have permissions issues when I moved the site first, it would display fine for a few minutes after uploading it then it would just go blank.
I fixed this by setting up a crontab with

udo chmod 755 /var/www/
sudo chown -R pi /var/www/html

every minute, this probably isn't ideal though.

Any idea on how to fix the MeteoAlarm issues ?

Thank you in advance !

Mac

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteoalarm Alerts
« Reply #1 on: December 01, 2016, 02:43:36 PM »
The script gets
Quote
Unable to write to ./cache/meteoalarm-en.txt file.
so that's why the alerts are not updating.
I'd chmod +766 that file to allow it to be written.

I think your site may need some script updates.. running check-fetch-times.php?show=versions on your site shows it's an old (V1.03) version of the check utility.  I suggest you download a current version from here, upload to your site, and run check-fetch-times.php?show=versions to see what scripts may need updating (and how to get the updates easily).

Best regards,
Ken
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 dundalkwx

  • Member
  • *
  • Posts: 38
Re: Saratoga Meteoalarm Alerts
« Reply #2 on: December 01, 2016, 03:11:32 PM »
Thank you for the quick reply!

I've added the chmod for the meteoalarm file but still no joy  :-(

I've also uploaded the check fetch times but it only runs once and stops at "fetching recent version information"
http://www.dundalkweather.net/check-fetch-times.php?show=versions

Offline dundalkwx

  • Member
  • *
  • Posts: 38
Re: Saratoga Meteoalarm Alerts
« Reply #3 on: December 01, 2016, 03:14:31 PM »
It appears the the meteo-alarm txt file is no longer in the /cache directory either??

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteoalarm Alerts
« Reply #4 on: December 01, 2016, 03:21:36 PM »
Now look at check-fetch-times.php?show=info on your site.  It shows:
Quote
Status of needed built-in PHP functions:
function simplexml_load_file is available
function iconv is available
function json_decode is available
function curl_init is NOT available
function curl_setopt is NOT available
function curl_exec is NOT available
function curl_error is NOT available
function curl_close is NOT available
class Imagick is NOT available (but is not required/used by the Saratoga templates)

Current GD status:

    GD support: NO

Directories/files status for Base-World, WD-Plugin

Status of needed subdirectories/images:

Settings.php Cache file directory in $SITE['cacheFileDir']='./cache/' exists, with permissions=drwxrwxrwx [0777]
..Wrote 104 bytes to ./cache/test.txt successfully, then deleted test file. Cache directory is fully functional.

So... your PHP installation is missing some key components:  cURL and the GD libraries -- you'll have to install them in order to make the templates work (and cURL is needed for the updated version checker too).

The good news is that the ./cache/ directory seems to have the right permissions to function, but you should try 766 permissions instead.
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 dundalkwx

  • Member
  • *
  • Posts: 38
Re: Saratoga Meteoalarm Alerts
« Reply #5 on: December 01, 2016, 03:26:30 PM »
Thank you but how come you are seeing that info and when I run the check fetch time page I only get

Quote
check-fetch-times.php Version 1.15 - 31-Oct-2016

Website PHP information

Webserver OS: Linux PiServer 4.4.32-v7+ #924 SMP Tue Nov 15 18:11:28 GMT 2016 armv7l
PHP Version: 5.6.27-0+deb8u1
Document root: /var/www/html
allow_url_fopen = ON
allow_url_include = off

Checking access to key websites for your template set

This script will check the load times and the ability to save cache files for the included support scripts with your template package.

  Included Settings.php time=0.060 secs.

Using lang=en as default for testing


--checking UV Forecast from temis.nl --
Using Settings.php $SITE['UVscript'] entry for test.
URL: http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-6.40&lat=54.0
Cache: ./cache/uv-forecast.txt

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteoalarm Alerts
« Reply #6 on: December 01, 2016, 03:31:42 PM »
You have to run the script with a query string:

check-fetch-times.php    just runs the speed and cache file access checking

check-fetch-times.php?show=info  runs the info screen (that I'd displayed).

check-fetch-times.php?show=versions  runs the version checker (compares key files on your site to current released versions).

See: http://saratoga-weather.org/wxtemplates/maint.php for more info.
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 dundalkwx

  • Member
  • *
  • Posts: 38
Re: Saratoga Meteoalarm Alerts
« Reply #7 on: December 01, 2016, 03:42:14 PM »
Ok thanks for your help, its been quite a while since I done anything to the site so trying to remember all this again.

I've now installed curl and it http://www.dundalkweather.net/check-fetch-times.php?show=info looks a lot healthier but still having the Meteoalarm issues.
I'll have a look at my settings again

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteoalarm Alerts
« Reply #8 on: December 01, 2016, 03:59:14 PM »
Installation of cURL and GD has helped.  The meteoalarm cache seems to be updating now (just ran check-fetch-times.php to test).

It does show
Quote
Unable to write to ./cache/uv-forecast.txt file
so you should change permissions on that file to 766.

Running check-fetch-times.php?show=versions now shows quite a few files need update -- the link at the bottom of the page has directions how to get the updates.
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 dundalkwx

  • Member
  • *
  • Posts: 38
Re: Saratoga Meteoalarm Alerts
« Reply #9 on: December 01, 2016, 04:39:23 PM »
I didn't really want to undertake updating the site as of yet, the meteoalarms were working on the previous host so it was kinda bugging me that it wouldn't work on the Pi.
Can't understand why it stopped.

As an interim solution how can I hide the Yellow Meteoalarm alerts ?

Thanks

Mac

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9282
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteoalarm Alerts
« Reply #10 on: December 01, 2016, 07:32:33 PM »
That warning is not produced by a Saratoga script -- it appears from this view-source
Quote
<!-- module wrnWarningv3.php = version: 3.0c 2014-08-24 -->
<!-- warnings and other info goes here  -->
<!--
Severe weatherdata (./cache/warningIE004) cache times:
        cache time   = 2016-12-02T01:24:02+01:00 from unix time 1480638242
        current time = 2016-12-02T01:25:34+01:00 from unix time 1480638334
        difference   = 92 (seconds)
        diff allowed = 900 (seconds) -->
<!-- Severe weatherdata (./cache/warningIE004) loaded from cache -->
<!-- box with 1 line for all warnings plus javascript extension -->
<!-- compressed warnings -->
that it's one of Wim's Leuven template standalone scripts, not from get-meteoalarm-warning-inc.php included with the Saratoga template.

I'd suggest you check here for info about that script.

The get-meteoalarm-warning-inc.php script likely stopped when there were permissions issues with ./cache/ and the cache file itself.

I understand your hesitancy to embark on an update to the scripts.  Keep in mind that the updates were done to fix issues encountered as source websites changed their structure/content/layout and so older (non-current) scripts may cease functioning as expected.  I do recommend that sites keep they underlying support scripts current in order to have their sites work correctly. :)
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