Saratoga PHP Scripts - Questions on 'vanilla' pages

Original query was posted in the “creating weather web sites” forum, but as most of the .php questions are in this, i guess I really should post in the correct forum…

I’ve d/l’d, and changed settings for the PHP pages. I get a number of XHTML violations on the vanilla pages – the following pages give errors.
1 Advisories
2 Almanac … Station monthly Reports
3 About

Most of them deal with tagging errors, but I’m totally novice on PHP, and not much better on HTML.

Also… On the Radar … Local radar … page, I have a problem concering the ‘placement’ of my town, Maricopa. The red dot and town name appear centered in the display -which is wrong - and the Marker cirlce with cross hairs appears exactly where it should. I’ve gone through all variables Ii can find for lat. and long. and they do show the correct locations for my stations.

So, a big request for help.

Can some one do the verify Xhtml and have a look tosee if any errors are so obvious a novice can correct them?



The wxadvisory.php error is caused by a missing rss-advisory-AZZ027.txt file in your document root … the rss-advisory.php script (and rss-top-warning.php) require this cache file to be writable. Upload a blank file named rss-advisory-AZZ027.txt, set the permissions to 666 or 777 then run to load the cache.

You should do the same for the forecast script by creating ‘forecast.txt’, uploading it, setting permissions on it to 666 or 777, and then running to load the cache.

And also create a ‘quakesUSA.txt’ text file, upload it to your website, change the permissions to 666 or 777 and run … the cache will refill after 30 minutes.

Your wxtrends.php page is out of date since you don’t appear to be uploading c:\wdisplay\webfiles\trends-inc.txt as trends-inc.html . Check the instructions in the WD-webfiles directory in the distribution zip to do the rest of the setup. Both the trends-inc.txt → trends-inc.html and testtags.txt → testtags.php uploads by WD are required for proper operation of the website template.

For the Radar page, you’ll need to do the setup using the WU-radar-testpage.php on your site… You won’t be able to accurately position the ‘dot’ using any other page for the setup. Instructions are at

It’s important to have the Settings.php and all the cache files ready (and writable by PHP) to get the full operation of the template set. When all elements are functioning correctly, the validation to XHTML 1.0-Transitional should work fine.

Hope this helps…
Best regards,


Thank you so much – I’ll work on it this afternoon!


– Saratoga is north I know, but are you safe and sound from the wild fires in the Santa Cruz Mountains?

You’re very welcome, Ken!

The Summit Fire is south-east of us about 10 miles away (and moving south-east). Here’s a map I’d posted yesterday on the SWN forum

The weather has been very cool/humid with light sea breeze (unlike the offshore, dry winds that fanned the flames on the 22nd) so they’re slowly getting containment on the fire.

Hi Ken,
back again… Accomplished most everything, except the centering of the weather maps from WU…

I get

Parse error: syntax error, unexpected ‘%’, expecting ‘]’ in /virtual/users/e14384-16184/web/testtags.php on line 346

when I try to invoke

I’ve looked thru the testtags.txt and .php, but I can’t see anything obvious to a novice. Looking at the displayed page source only shows the error information, not the page source code.

Where should I start looking?



The error means pretty much was it says…

There is an error in the testtags.php file you are using at line 346.

Which would be somewhere around…

$extratemp1 = "%extratemp1%"; // Extra temperature sensor 1 (change through to 8) $indoordewfaren = "%indoordewfaren%"; // Indoor dew point (o F) [b]$indoordewcelsius = "%indoordewcelsius%"; // Indoor dew point (o C)[/b] $humidexfaren = "%humidexfaren%"; // Humidex value in oF $humidexcelsius = "%humidexcelsius%"; // Humidex value in oC

Unless you provide a txt version of the testtags.php file you are using, you really can’t tell what the problem is since we can’t see the source of the file you are actually using.

Thanks Kevin,

I’ve printed off a number of the .txt and .php files and am going thru them line by line. If I can’t isolate it, I plan to drop back to square one and use the pages I unzipped, and start all over again.

Figure since I have a little time, i’ll try and learn, or at least understand, how php, ajax etc work as part of my debug process


Happily making the site specific changes; feeling a little more knowledgeable about it all this pass thru.

Question Ken mentioned setting permissions on it to 666 or 777 for the files to be manually created and uploaded.

my file attributes for the files show rw r r in them (using filezilla). Do I need to do the special permissions attribute actions given these are the attibutes, and if so, how do I do it with Filezilla?

Thanks a bunch


In Filezilla, right click the file name on the server, at the bottom you see a ‘File attributes…’ click on that. It’ll bring up a screen where you can change the permissions. Ticking execute for each line will give you 777 as you’ll see in the box at the bottom.


Thanks Dave!

Printed your help out and wil use it when the time comes!

Having issues uploading, so I’ll post another thread for help