wxhistory.php help please

Hi folks

It looks like my wxhistory.php page aint working any more, its strange though, because it is lol

Basically, its working ok, until i want to view this month and it only goes to the 7th :?

The December2010.htm is on the server and in the same place as all the other files

Please can someone take a look?

http://www.northantsweather.com/wxhistory.php

http://www.northantsweather.com/December2010.htm

Thanks in advance…

Simon I dont use that php program so I dont have the source. I would look for some additional characters perhaps which dont show in a browser but might stop the program. From here I cant see anything but you might if you edit the text file locally.

Stuart

Hi Stuart

Thanks for the reply…

I have removed Day 7 and its now working, but i cant see anything untoward, this is what was removed

<FONT COLOR="#3333FF" SIZE=+2 style="font-family: Arial"><B>Averages\Extremes for day :07</B></font>
------------------------------------------------------------
<FONT COLOR="#3333FF">
Any Special weather conditions for the day:
<img SRC="---.gif" height=66 width=89>
Freezing fog affecting some parts of the region may persist all day in 
places, especially over Northamptonshire and Leicestershire. Sunshine 
is most likely in the north of the region and it will be dry and very cold 
generally. Maximum temperature 0C.
<FONT COLOR="#000000" style="font-family: Fixedsys">
 Average temperature     = -6.6

The problem can be a non-printable character, look at what the php code uses to determine the end of file, if it is checking for EOF then it should not end prematurely but if it looks for something else then look for whatever that is in the text. Some editors like ConTEXT allow special characters to be highlighted. What happens if you recreate the file in WD?

Stuart

Hi Stuart, i just had a quick look at the wxhistory.php and nothing stood out, also the same for include-wxhistory.php again nothing stands out to me anyway lol

Nothing stood out in ConTEXT either, just installed it :slight_smile:

WD creates December2010 no problems, all the data is in there as it should be…

If you upload this does your history page work now?

Stuart

No m8, it dont :frowning: it stops at day 7 even though all the data is in there

The problem is related to the word “sunshine” in the special weather conditions. Change it to sonshine and it displays properly.

Any Special weather conditions for the day: Freezing fog affecting some parts of the region may persist all day in places, especially over Northamptonshire and Leicestershire. Sunshine is most likely in the north of the region and it will be dry and very cold generally. Maximum temperature 0C.

The script appears to be doing a match on that word for sunshine hours purposes and finding it in the special weather conditions section throws it for a loop.

ah…oh…wow, not good, thank you Murry, will sort that now, Thanks to you also Stuart for looking in to it for me!!!

Mine quit working in October. Can you e-mail me how to fix it, please.

Thanks

See http://discourse.weather-watch.com/p/376972

Thanks, I missed that one.

#-o

I posted another update (thanks to Murray) in http://discourse.weather-watch.com/p/380945