|
capeweather
|
 |
« on: July 31, 2006, 08:39:30 PM » |
|
Ken, I am still using your script and I think it is great.  Lately I have been having an issue going on and thought since you were the author that maybe you could tell me what this means when this error pops up. It's probably just to many connections from other users hitting the site. /index.php XML error: syntax error at line 1: Too many connections I've seen this happen a few times already and once it comes up it completely shuts down all other includes on my page including my NHC Noaa advisory, Weather data, and Radars. I was wondering if it was possible to run the script on my local server by implementing a cron job (downloading the advisory page every 5 minutes by using the get command) or is there a way you could set it up to cache the data? My NHC RSS advisory is running local and works perfect by using a cron job. Do you think that could be a solution? Right now the include for the RSS advisory had to be //. Thanks Ken. Chris
|
|
|
|
|
Logged
|
|
|
|
|
|
|
saratogaWX
|
 |
« Reply #2 on: August 01, 2006, 01:09:41 AM » |
|
I could include the caching code which would free up that problem (I think) -- I didn't cache the feeds (either the NOAA RSS or the NHC RSS) because I thought it might delay 'current' info to your viewers.
What cache lifetime do you suggest would be ok? 10 minutes? 5 minutes? more?
Let me know and I'll craft a version with caching.
Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
capeweather
|
 |
« Reply #3 on: August 01, 2006, 01:13:53 AM » |
|
I guess the night owls are up tonight Ken!  Umm, I would think 5 minutes would be ok...I guess there must have been a lot of people hitting NOAA's site today because it had the "too many connections" post on there.  Anyhow, its whatever you think would be right.  Thanks again.
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #4 on: August 01, 2006, 02:44:09 AM » |
|
I'll post some code tomorrow.. the wife has a bridge party here, and I'm doing butler duty -- but inbetween butler times, I can happily code  Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Gordon
|
 |
« Reply #5 on: August 02, 2006, 08:22:22 PM » |
|
Ken, Is it possible to modify your advisory script to display just the advisory and not the accompaning "click the link above to see details..." message? I attempted to comment out the following code // end of main program if ($doSummary) { print $Summary; if ($WLink) { print "Click on the link"; if ($WLink > 1) {echo "s";} print " above to see details on the $WLink NOAA advisor"; if ($WLink > 1) {echo "ies"; } else { echo "y"; }; echo " for zone $Zone.\n"; } without success. If need be, feel free to stop by http://oldlineweather.com to see what I'm talking about. Thanks,
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #6 on: August 04, 2006, 12:27:42 AM » |
|
Gordon: You can lose just the 'click on the...' line by doing this: if ($doSummary) { print $Summary; if (false) { // don't execute this print "Click on the link"; if ($WLink > 1) {echo "s";} print " above to see details on the $WLink NOAA advisor"; if ($WLink > 1) {echo "ies"; } else { echo "y"; }; echo " for zone $Zone.\n"; } } adding the 'false' in the test to see if there were any summaries just makes the following code in the IF never be executed  Alternatively, you could just comment out the lines like this: You can lose just the 'click on the...' line by doing this:
if ($doSummary) { print $Summary; // if ($WLink) { // if ($WLink > 1) {echo "s";} // print " above to see details on the $WLink NOAA advisor"; // if ($WLink > 1) {echo "ies"; } else { echo "y"; }; // echo " for zone $Zone.\n"; // } }
Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
Gordon
|
 |
« Reply #7 on: August 04, 2006, 11:29:42 AM » |
|
You can lose just the 'click on the...' line by doing this:
Ken, Thanks for that!
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #8 on: August 17, 2006, 12:24:20 AM » |
|
All done, and thanks for testing it Chris! The new rss-advisory script does cache the XML for 10 minutes (adjustable) and so lessens the load on www.weather.gov. http://saratoga-weather.org/scripts-rss.phpBest regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
capeweather
|
 |
« Reply #9 on: August 17, 2006, 12:51:34 AM » |
|
Thank you Ken! It works perfect! 
|
|
|
|
|
Logged
|
|
|
|
|
capeweather
|
 |
« Reply #10 on: August 21, 2006, 04:07:37 PM » |
|
Ken, have any idea why this would be happening? Just started a little bit ago and had to disable. I'm wondering if the NOAA servers are down or something. Chris /rss-advisory-cache.php XML error: syntax error at line 1: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL /alerts/wwarssget.php was not found on this server.<P> <P>Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. <HR> <ADDRESS>Apache/1.3.36 Server at p320011.totalcontrol.host Port 80</ADDRESS> </BODY></HTML>
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #11 on: August 21, 2006, 05:09:12 PM » |
|
Wow, that is strange From the messages, it looked like the server wasn't coughing up the /alerts/wwarssget.php page (source of the RSS feed) for a bit. Is it still happening? What Zone are you using? My zone is getting data: CAZ513 http://www.weather.gov/alerts/wwarssget.php?zone=CAZ513http://saratoga-weather.org/rss-advisory-test.php?zone=CAZ513Best regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|
capeweather
|
 |
« Reply #12 on: August 21, 2006, 05:14:53 PM » |
|
Hi Ken, I'm using zone ID FLZ065. It hasnt happened in about an hour so maybe the servers are back to normal.
Chris
|
|
|
|
|
Logged
|
|
|
|
|
capeweather
|
 |
« Reply #13 on: August 21, 2006, 06:31:48 PM » |
|
Ken, Just happened again so I had to take it down for a bit. I'm suspecting NOAA's servers at this point.
Chris
|
|
|
|
|
Logged
|
|
|
|
|
capeweather
|
 |
« Reply #14 on: August 22, 2006, 11:48:55 PM » |
|
Ken, today everything went fine. Just wanted to give you a quick update. 
|
|
|
|
|
Logged
|
|
|
|
|
saratogaWX
|
 |
« Reply #15 on: December 17, 2007, 02:58:33 PM » |
|
This script has been updated with new security features (thanks to MCHALLIS) and a new access method (file instead of URL include) to support PHP5 installations that have allow_url_include = off. Docs and download at http://saratoga-weather.org/scripts-rss.php#NOAARSSBest regards, Ken
|
|
|
|
|
Logged
|
Ken True/Saratoga, CA, USA main site: saratoga-weather.orgDavis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
|
|
|
|