Author Topic: Saratoga Meteo Alarm Script  (Read 1586 times)

0 Members and 1 Guest are viewing this topic.

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Saratoga Meteo Alarm Script
« on: July 31, 2014, 04:52:06 PM »
I recently updated my website but have found this script not to work and I can't work out why.
It still works on the old page as long as the cache has been flushed. Same get-meteoalarm-warning-inc.php script running on both pages. New page is www.mad-weather.com/meteo_warnings.php old page is www.mad-weather.com/warnings.php
www.mad-weather.com/get-meteoalarm-warning-inc.php will load properly as long as the cache has been flushed, when it is an include it won't in the  new page if it makes sense.
What am I missing? Same server, same directory structure.
Rosalind

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteo Alarm Script
« Reply #1 on: July 31, 2014, 06:28:10 PM »
Hi Rosalind,

I ran your new page with ?debug=y and looked at the view-source of the page and found
Quote
<!-- get-meteoalarm-warning-inc.php V2.08 - 18-Jul-2012 -->
<!-- Warning data courtesy of and Copyright &copy; EUMETNET-METEOalarm (http://www.meteoalarm.eu/).Used with permission.
Time delays between this website and the www.meteoalarm.eu website are possible, for the most up to date information about alert levels as published by the participating National Meteorological Services please use www.meteoalarm.eu -->
<!-- Meteoalarm data load from from cache cache/sul-meteoalarm-en.txt -->
<!-- using charsetInput='UTF-8' charsetOutput='ISO-8859-1' -->
<!-- betweenspan
Array
(
   
  • => Array

        (
        )

    [1] => Array
        (
        )

    [2] => Array
        (
        )

    [3] => Array
        (
        )

)
 -->
<!-- cData
Array
(
)
 -->
<!-- moreInfo temp
Array
(
   
  • =>

)
 -->
<!-- moreInfo tstr ='' -->
<!-- moreInfo matches
Array
(
)
 -->
<!-- warnboxes
Array
(
   
  • => Array

        (
        )

    [1] => Array
        (
        )

)
 -->

Checking the cache file at cache/sul-meteoalarm-en.txt shows
Quote
HTTP/1.1 404 Not Found
Date: Thu, 31 Jul 2014 22:20:27 GMT
Server: Apache/2.2.3 (CentOS)
Content-Length: 288
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /area.asp was not found on this server.</p>
<hr>
<address>Apache/2.2.3 (CentOS) Server at www.meteoalarm.eu Port 80</address>
</body></html>

So.. it appears the response indicates a URL configuration for the MeteoAlarm that could not be processed on their server..
Check the specification for the MeteoAlarm URL and that should fix up the issue.

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 youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Saratoga Meteo Alarm Script
« Reply #2 on: August 01, 2014, 09:22:20 AM »
Hi Ken,
The Url is correct as the get-meteoalarm-warning-inc.php works on its own. As soon as it is included in one of my pages it doesn't work, only if the cache is populated first but then it stops.
The Warning data link on the get-meteoalarm-warning-inc.php links to the correct page but within its own page the link is not correct. Something else on the page is interfering with it?
Rosalind

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Saratoga Meteo Alarm Script
« Reply #3 on: August 03, 2014, 02:52:54 PM »
The culprit is the Ajax gizmo. What would be in that that would stop the meteo alarm working properly?
Rosalind

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteo Alarm Script
« Reply #4 on: August 03, 2014, 06:01:42 PM »
Hi Rosalind,

It is very hard to say why it is failing.  Would you mind .zip of the new page, along with any PHP file it includes so I could take a look? 

It's likely that a double-include of something is resulting in a duplicate function definition attempt (which causes a PHP fatal error), but where that is exactly is hard to tell without seeing the source.

Best regards, Ken
« Last Edit: August 03, 2014, 06:03:13 PM 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 youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Saratoga Meteo Alarm Script
« Reply #5 on: August 04, 2014, 04:47:58 AM »
Hi Ken,
zip file attached. Hope it is OK as in all the years I have been unzipping files I've never zipped one  :eek:
Many thanks for looking.
Rosalind

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Saratoga Meteo Alarm Script
« Reply #6 on: August 04, 2014, 01:01:18 PM »
I took a look through the files and don't see anything that would cause the issue.

Check your PHP error_log for Apache on your website .. it may contain info about what is causing the get-meteoalarm-warning-inc.php script to not produce output with the new page.  I still suspect that one of the included files defines a function that is also used by the meteoalarm script...

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 youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Saratoga Meteo Alarm Script
« Reply #7 on: August 04, 2014, 04:15:01 PM »
Hi Ken,
Nothing in the error log that relates to the get-meteoalarm-warning-inc.php script. I may just have to leave out the gizmo on that page until a time when I find out what the problem is. I suspect it is something to do with the language side of it.
Usually I find when something is called twice you get a fatal error and the line of the script which is causing it. In this case that doesn't happen.
Thanks
Rosalind

 

anything