Astronomy scripting error??

Hi gang,

After about the last full moon the astronomy script has been putting out an error on the moon phase and illumination. The image is showing correctly and I’ve went to a few other web sites and their scripts are showing correctly. This is what I’ve got:

Moonrise: 18:15
Moonset: 9:54
Waning Gibbous Moon
97% illuminated

Doing a source on the page gives this information on this area:

Sunrise: 7:52 Sunset: 17:17 Daylight: 0-14:0-36

Direct link to astronomy page:

Anyone have any ideas or words of wisdom here??


The data for the wxastronomy.php page comes from testtags.php …
Yours at hasn’t been uploaded by WD since 14-Nov-2008 at 15:05

// General OR Non Weather Specific/SUN/MOON
// ========================================
$time = "15:05";	// current time
$date = "11/14/08";	// current date
$sunrise = "7:52";	// sun rise time (make sure you have the correct lat/lon
// 		            in view/sun moon)
$time_minute = "05";	// Current minute
$time_hour = "15";	// Current hour
$date_day = "14";	// Current day
$date_month = "11";	// Current month
$date_year = "2008";	// Current year
$monthname = "November";	// Current month name
$dayname = "Friday";	// Current day name
$sunset = "17:17";	// sunset time
$moonrise = "18:15";	// moon rise time
$moonset = "9:54";	// moon set time
$moonage = "Moon age: 16 days,8 hours,21 minutes,97%";	// current age of the moon (days since new moon)
$moonphase = "97%";	// Moon phase %
$moonphasename = 'Waning Gibbous Moon'; // 10.36z addition

Have testtags.php (and trends-inc.html which was last uploaded at the same time) upload regularly and your site will show the current data.

Best regards,

Thank you Ken,

I had tried an upgrade to a newer version that didn’t work a few weeks ago and went back to the old version. Using the instructions:

These two files


need to be placed in your Weather-Display \webfiles directory.

Use the Weather-Display Control Panel,
Web Files/Web Page/Real Time FTP/WDL,
Custom Web Page Setup TAB

In the ‘Special file conversion’ area

put: trends-inc.txt in local file 1
trends-inc.html in Remote file name 1

  testtags.txt       in Local File 2
  testtags.php       in Remote file name 2

Turn the switch to ON

Press Test

Press OK to save the settings.

THESE FILES ARE REQUIRED for proper operation of the weather website.

There now seems to be a mismatch of some sort and I can’t pull up my site. I’m getting a syntax error now.

Parse error: syntax error, unexpected ‘%’, expecting ‘]’ in /home/bigbaywx/domains/ on line 346

Nothing on my site will even pull up now…oops!!

Looking at the testtags.php as near as I can figure line 346 is somewheres around here…

$icon_array[35] = "windyrain.gif"; // Wind+rain $iconnumber = '%iconnumber%'; // icon number

$current_icon = $icon_array[%iconnumber%]; // name of our condition icon
// ----------------------------------------------------------------------------------
// $current_summary = ‘%weathercond%’ . "
" . ‘%Currentsolardescription% ‘;
$weathercond = ‘%weathercond%’;
$Currentsolardescription = ‘%Currentsolardescription% ‘;
$current_summary = $Currentsolardescription;
$current_summary = preg_replace(’|^/[^/]+/|’,’’,$current_summary);

I don’t know what I did but I’m dead in the water now. Any other ideas?? :lol:

Thanks so much,


I went back in the FTP logs and I’m seeing that it is uploading funny with the testtags to php…

*******list of files uploaded******** Uploading C:\Program Files\wdisplay\webfiles\clientraw.txt -> clientraw.txt

Uploading C:\Program Files\wdisplay\webfiles\clientrawextra.txt → clientrawextra.txt
Uploading C:\Program Files\wdisplay\webfiles\clientrawdaily.txt → clientrawdaily.txt
Uploading C:\Program Files\wdisplay\webfiles\clientrawhour.txt → clientrawhour.txt
Uploading C:\Program Files\wdisplay\webfiles\testtags.php → testtags.php
Uploading C:\Program Files\wdisplay\webfiles\trends-inc.html → trends-inc.html
Uploading C:\Program Files\wdisplay\webfiles\customscreen.jpg → customscreen.jpg
Uploading C:\Program Files\wdisplay\webfiles\trends-inc.txt → trends-inc.html
Uploading C:\Program Files\wdisplay\webfiles\testtags.txt → testtags.php
actual messages from upload session*

I’m assuming that the testtags.txt to testtags.php is what I want. Now trying to figure out why it’s doing testtags.php to testtags.php??

You’re uploading it more than one it seems.
Does your file creation screen look kinda like this?

I’ve got that…but I also have this one as well.

Not too sure why. Had this thing set up last year and not paid too much attention to anything since the new version this spring.

That was a way around uploading the files if you couldn’t get file #29 to do it in the advanced internet uploads.

I’d remove the two files from the General FTP functions area … WD doesn’t parse any of those files for WD variables, so it won’t keep things current.

Use the Custom Files as Tony showed in his posting, then you may have to set an upload interval using the Custom WebPage/Webfiles Setup#2 TAB, file#29 to establish an interval.

Replace your c:\wdisplay\webfiles\testtags.txt with the one from the distribution .zip to fix the error you’re seeing.

I upload the same way you do. Dont forget that when you change the testtags,
go into the custom web page setup and test it so it regurgitates a fresh copy
of test tags, then try uploading it again


Up and running again folks with the correct moon phase showing on the main page. I had previously replaced the testtags file with the distribution file but that didn’t do anything. When I deleted the uploading off of the FTP section and then I recreated the special conversion off of file #29 and it seems like the recreation of the file did the trick. Not sure why but just glad it’s working again and thanks all for your assistance!! :wink: