Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

PHP Web 'viewer' for Cumulus NOAA Style reports

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

Moderators: daj, TNETWeather

stewart45
Posts: 14
Joined: Thu Jan 17, 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

Postby stewart45 » Wed Sep 25, 2013 3:00 pm

Think you might be right there, will have a look at " include"

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

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

Postby mm23 » Sat Apr 05, 2014 8:55 am

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: 26247
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

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

Postby steve » Sat Apr 05, 2014 9:29 am

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/NOAA-reports/NOAAMO0114.txt
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

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

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

Postby mm23 » Sat Apr 05, 2014 9:35 am

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: 2455
Joined: Tue Dec 09, 2008 1:37 pm
Weather Station: None !
Operating System: XP SP3 - honest
Location: Dudley, West Midlands, UK

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

Postby beteljuice » Sat Apr 05, 2014 10:19 am

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 Feb 03, 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

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

Postby mm23 » Sat Apr 05, 2014 10:22 am

...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 Feb 03, 2014 12:22 pm
Weather Station: ws 2350
Operating System: windows xp sp3
Location: Europe

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

Postby mm23 » Sat Apr 05, 2014 10:31 am

Well done beteljuice!!

It works!

Thanks.............
Image

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

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

Postby mm23 » Sun May 04, 2014 6:58 pm

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: 26247
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

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

Postby steve » Sun May 04, 2014 7:55 pm

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

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

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

Postby mm23 » Sun May 04, 2014 8:17 pm

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: 26247
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

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

Postby steve » Sun May 04, 2014 10:12 pm

The only way to find out is to do the same thing as for any possible ftp problem - turn on ftp logging.
Steve
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

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

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

Postby mm23 » Mon May 05, 2014 6:26 am

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: 26247
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in France
Contact:

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

Postby steve » Mon May 05, 2014 6:39 am

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
-----
Hosting available for Cumulus web sites. See http://sandaysoft.com/forum/viewtopic.php?f=2&t=11876

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

User avatar
duke
Posts: 845
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

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

Postby duke » Sun Dec 07, 2014 11:03 am

@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','&lt;',$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','&lt;',$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

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!

User avatar
duke
Posts: 845
Joined: Sun Jul 03, 2011 6:23 pm
Weather Station: Davis VP2 Plus - 24hr FARS
Operating System: Windows 10 - 64 bit
Location: Eastleigh, Hampshire, UK
Contact:

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

Postby duke » Sun Dec 07, 2014 11:28 am

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

Nightingale Weather
Eastleigh, Hampshire, UK
------------------------------------------------------
Validate your pages - often!


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 6 guests