Author Topic: problems displaying thermometer using US Saratoga Weather templates  (Read 4148 times)

0 Members and 1 Guest are viewing this topic.

Offline kb5bfa

  • Member
  • *
  • Posts: 7
Well today I decided to give these templates a try and have a problem.
I downloaded the templates, made no changes and uploaded them to my web server. I figured I would go back and customize them later. They work, but I am having problems with the temperature.php. I have a Davis VP weather station using weather display that works ok.

When I try the templates at http://www.kb5bfa.com/wxindex.php the symbol where the thermometer is supposed to be displayed is not readable.

I have verified the temperature-blank.pnp file will display correctly, but when i try to display the temperature.php file i get the message " error loading thermometer-b with some strange characters displayed. Here is the link

http://www.kb5bfa.com/thermometer.php

PHP is new to me and i am not sure where to start. I read here and on some other sites but could not find the answer to this problem.

Any suggestions?

Thanks
« Last Edit: January 28, 2009, 06:35:21 PM by kb5bfa »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #1 on: January 28, 2009, 07:12:53 PM »
Hi,
Thanks for giving the templates a try :)

I see you're running the template on an IIS-6 Webserver, and there have been issues running the template set on IIS with other folks (usually in not having cache files writable)

The thermometer.php is getting an error trying to load thermometer-blank.png from the same directory as the thermometer.php script .. I see that http://www.kb5bfa.com/thermometer-blank.png does show the image, so the file is in the correct place.  I suspect it's some setup with the PHP/IIS6 server.  So.. I have a question:  is this your own IIS6/PHP installation on a home server, or do you have a web hoster?   If the former, would you consider installing XAMPP (free) to replace the IIS6/PHP4 installation .. it works great with the template set/PHP without the little gotchas with IIS.
If the latter, can you ask your hoster to move you to a Linux/Apache host .. most hosters will do that for free.

If you stick with the current IIS6/PHP4 configuration, you'll also have to deal with network errors trying to fetch data from the NWS and www.temis.nl (UV info), as a show source on your wxindex.php page has these error messages
Quote
<!-- rss-top-warning.php - V1.04 06-Apr-2008 -->
<!-- getting cache from http://www.weather.gov/alerts/wwarssget.php?zone=CAZ513 -->
<!-- HTML fetch length = 0 ; Cache not saved. -->
<!-- headers  -->
  ... means the fetch from www.weather.gov failed

<!-- get-UV-forecast-inc.php V1.02 - 03-Mar-2008 -->

<!-- UV forecast courtesy of and Copyright &copy; KNMI/ESA (http://www.temis.nl/). Used with permission. -->
<!-- Network error:  () -->
<!--Unable to write cache ./uv-forecast.txt -->
<!-- UV data load from from URL http://www.temis.nl/uvradiation/nrt/uvindex.php?lon=-122.0227&lat=37.2715 -->
<!-- data not available -->

... means no UV forecast available

         <!-- advforecast2.php - V2.14 - 14-Jan-2009 -->
<!-- NWS URL: http://forecast.weather.gov/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2 -->
<!-- zone=CAZ513 -->
<!-- Network error:  () --><!-- unable to write cache file forecast.txt -->

... means no NOAA forecast available

All these issues are IIS/PHP configuration issues.   If you're hosting your own site, I'd strongly recommend you ditch IIS and install XAMPP which includes Apache, PHP and mySQL so you'll be ready to install/use any of the scripts available.

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 kb5bfa

  • Member
  • *
  • Posts: 7
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #2 on: January 29, 2009, 12:26:11 PM »
Hi Ken

You were correct, the problem was the host, I had it switched to Linux and now it works. Thanks for the quick answer and also for making the templates, you did an excellent job.

Thank you!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #3 on: January 29, 2009, 02:55:01 PM »
You're very welcome!  I think you'll find the Linux/Apache host will be a lot more compatible with the scripts .. IIS is just strange acting with PHP on many things.

Thanks for the kind words about the templates .. so far, 114 sites are using the WD/AJAX/PHP templates as a base for their personal weather website (including yours ;) ) .. having programs used is the highest complement a coder can receive :)

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 kb5bfa

  • Member
  • *
  • Posts: 7
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #4 on: January 30, 2009, 02:53:16 PM »
Hi Ken, more questions

I have gone back and started customizing the templates and I am having problems with the radar.  I have followed the instructions in the WU-radar-inc.php file and have the local and regional radars for the area from Weather Underground. If you look at www.kb5bfa.cim/WU-radar-inc.php you will see the local radar. But if you use the link on the wxindex.php www.kb5bfa.com/wxindex.php then select radar, local radar it continues to show to the Saratoga Radar.

When i open http://www.kb5bfa.com/wxradar.php i see the Saratoga Radar, but when I look in that file I cant seem to find where its calling the Saratoga Radar.

***** I figured it out ******

 ](*,) ](*,) ](*,) ](*,) :-P :-P :-P :-P
« Last Edit: January 30, 2009, 03:39:31 PM by kb5bfa »

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #5 on: January 30, 2009, 04:16:40 PM »
Cool!   =D&gt;  =D&gt;  =D&gt;
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 kb5bfa

  • Member
  • *
  • Posts: 7
Re: problems displaying thermometer using US Saratoga Weather templates
« Reply #6 on: January 31, 2009, 07:27:21 PM »
Hi Ken

Well after several days I have almost completed getting all the templates working. Today I added the GRlevel3 radar and the buoy's for the western gulf of mexico. I have a few more things to figure out, like how to make the buoy page look like the rest but I think I can make it work.

I also wanted to give you a HUGE THANK YOU for making and sharing the scripts they are excellent I have dabbled with HTML, but never with PHP, your guides and info you share in each page has helped a lot.

I hope to have it all completed by next week.