Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

PHP Web 'viewer' for Cumulus NOAA Style reports

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

stewart45
Posts: 14
Joined: Thu 17 Jan 2013 5:13 pm
Weather Station: Davis VP2 wireless Pro
Operating System: win7
Location: skelton-in-cleveland
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by stewart45 »

Think you might be right there, will have a look at " include"
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

Hi everybody,

I have a some kind of unusually problem here. I manually save my noaa reports as utf 8 and upload it on server. When I open files in mozilla i can not see degree sign and some other signs (š, ž .....) These signs "appears" normally everywhere (on my pc a.g) except from my server.

http://www.vrijemeusibeniku.com/weather ... 2014&mo=02


Any help?

Thanks!
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

I think the problem is that your 'viewer' page is not UTF-8

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

If you view the files directly, they display OK, e.g. http://www.vrijemeusibeniku.com/weather ... MO0114.txt
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

Thanks Steve,

I figure out that. Everything seems ok when I changed the mozilla encoding from some western to utf 8, but when I refresh page the western encoding comes back again....
Image
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by beteljuice »

Aha ... an old 'hangover' !

You are using the page as a stand-alone rather than included in a site template and you have 'foreign' characters.

You need to change this line in the code:

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
// should be
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Image
......................Imagine, what you will KNOW tomorrow !
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

...similar problem:
http://forums.mozillazine.org/viewtopic ... 7&t=683425

and also one bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=158285

What should I do now Steve?.....any suggestion?
Image
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

Well done beteljuice!!

It works!

Thanks.............
Image
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

Hi!

Have one problem with Noaa reports....
My NOAA reports were working well until the beginning of this month. Now I have the situation that on the Cumulus PC NOAA report for May works ok, also in the annual summary for this month on web server (Internet).... but the monthly file on the server is empty.....?

http://www.vrijemeusibeniku.com/weather ... 2014&mo=05

I did not touch anything....

Somebody, please?
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

This isn't anything to do with the viewer, a new thread would have been better. The file should get uploaded every night, just after midnight. Has it been the same every day this month, or is today the first day that it's been empty? If it's OK on your PC, then presumably there was some kind of ftp error last night. It may get uploaded correctly tonight.
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

I'm not sure but I think this is happening since the beginning of the month ...
I have no idea why this happened. It is difficult to assume that every night occurs the same ftp error .... or not?
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

The only way to find out is to do the same thing as for any possible ftp problem - turn on ftp logging.
Steve
mm23
Posts: 152
Joined: Mon 03 Feb 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by mm23 »

Steve,

It was too late last night for what you suggestion, and now it seems that everything is okay. By the way, what time NOAAH files uploaded? I guess it depends on the Web update interval?
I'll follow it and see how things regarding NOAAH files will develop further.........

Thanks for help....
Image
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by steve »

mm23 wrote:By the way, what time NOAAH files uploaded? I guess it depends on the Web update interval?
On the next upload, as it says in the help.
Steve
duke

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by duke »

@beteljuice

I have changed my NOAA page to show the full menu and it has thrown up the strange black diamond error again even though I added your 'Nasty work_around' (your words not mine) when you suggested way back in 'this post'.

Code: Select all

// Replace following code to prevent degree symbol being replaced with black diamond symbol
//
// if($rpt){
//	echo "<pre>\n";
//	echo preg_replace('|<|Uis','<',$rpt);
//	echo "</pre>\n";
//}
//echo "</div> <!-- END noaa_rep_container -->\n";

if($rpt){

// NASTY work-around, the ONLY way I find black diamond question mark (or deg character)
   $checkIt = explode("(", $rpt);
   $dodgy = substr($checkIt[1],0 , 1);

// the ONLY way I can replace when black diamond (unconditionally) to &deg
   $rpt = str_replace($dodgy,'&deg;',$rpt);
// END nasty work around


   echo "<pre>\n";
   echo preg_replace('|<|Uis','<',$rpt);
   echo "</pre>\n";
}
echo "</div> <!-- END noaa_rep_container -->\n";
What's different this time is that the black diamond only shows for the current year and not past years. You can take a look 'here'

Any suggestions? Note, I am using this in a page declared as html & UTF-8

EDIT: I have just discovered that this only applies to reports generated from September 2013 onward which happens to coincide with Steves release of 'Cumulus 1.9.4 (build 1085) ' which has the option for UTF-8 encoding - which I do. Although I do not see any difference in the reports when viewed in notepad++.
duke

Re: PHP Web 'viewer' for Cumulus NOAA Style reports

Post by duke »

OK, I put fingers to keyboard too soon. Removing your work-around and saving the older reports as UTF-8 resolves this issue.
Post Reply