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

User avatar
beteljuice
Posts: 2456
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 » Tue Aug 13, 2013 9:46 am

Yours is configured for CUmulus Laurent, wetter-pocking is configured for VWS which has a different naming scheme and has a 'fixed' title for current year / month files.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
GraemeT
Posts: 308
Joined: Wed Oct 21, 2009 11:19 am
Weather Station: La Crosse WS-2355 & WS-2306
Operating System: Windoze 7
Location: Bayswater, Australia
Contact:

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

Postby GraemeT » Thu Aug 15, 2013 11:18 pm

Hi all,
Not sure if this has been covered before.

It seems that some server/php configurations implement certain $_SERVER and $_ENV variables in a manner which causes their values to be incorrect.
One of these is the $_SERVER['PHP_SELF'] variable, used in the NOAA-reports.php script.
In my case this was returning /noaarep.php/noaarep.php instead of /noaarep.php
I found a description of the cause of this and a solution at http://php.net/manual/en/reserved.variables.php

The solution is to change the code at about line 158 from:

Code: Select all

$PHP_SELF = $_SERVER['PHP_SELF'];
to

Code: Select all

$PHP_SELF = $_ENV['SCRIPT_URL'];

Since this change I've had no more problems.

Here's a link to my test page: http://weather.gktnet.com/noaarep.php
Cheers,
Graeme.

Image

User avatar
beteljuice
Posts: 2456
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 » Fri Aug 16, 2013 10:51 pm

@wetter-pocking

I've copied some of your files and directory settings and replicated the problem, which only becomes obvious when there is more than 'this' years data, although the bug is deeper than that !

I continue to investigate ...
... but I do have other commitments ATM .............
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

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

Postby nitrx » Sat Aug 17, 2013 1:16 pm

wetter-pocking wrote:There is no "2013_08.txt", because this is the current month and the data is written to "noaamo.txt".

And there is no "2013.txt"-file, data of 2013 is written to "noaayr.txt".


Can't you do an automatic rename on the serversite for those 2 files ? or upload these two with right names in a batch ftp ?

User avatar
beteljuice
Posts: 2456
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 Aug 17, 2013 2:35 pm

Update affecting non CUmulus users

Menu bug fix

Many thanks to wetter-pocking for making me find a logic 'hole' that no one else has mentioned :clap:
Last edited by beteljuice on Sat Aug 17, 2013 5:18 pm, edited 1 time in total.
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

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

Postby nitrx » Sat Aug 17, 2013 3:28 pm

Hi I've never followed this but does the script handles NOAA-reports wit a comma as decimal separator ?

like this ?

Monthly Climatological Summary for aug 2013

Name: Apeldoornmeteo City: Apeldoorn State: The Netherlands
Elevation: 10 m Lat: N 52° 13' 12" Lon: E 006° 00' 02"

Temperature (°C), Rain (mm), Wind Speed (m/s)

Heat Cool Avg
Mean Deg Deg Wind Dom
Day Temp High Time Low Time Days Days Rain Speed High Time Dir
----------------------------------------------------------------------------------
1 24,7 30,7 18:04 18,1 05:59 0,0 6,6 0,0 1,4 6,6 15:17 ZZW
2 26,6 34,7 17:03 17,4 05:59 0,2 8,9 0,0 1,3 6,6 14:47 ZZW
3 22,2 27,9 00:00 16,2 23:58 0,0 4,1 0,0 2,1 8,7 13:54 WZW
4 20,1 26,4 17:32 12,5 05:52 1,4 3,3 0,0 0,9 5,1 19:48 WZW
5 22,2 29,3 16:10 14,0 05:56 1,0 5,0 0,0 1,1 8,7 13:10 ZZW
6 18,8 22,3 14:22 15,5 23:49 0,7 1,3 6,6 1,8 6,6 00:09 NW
7 14,5 16,6 10:16 12,1 05:40 3,8 0,0 11,0 3,2 11,7 15:52 NNO
8 16,7 21,7 16:54 13,1 23:55 2,4 0,7 1,5 1,9 8,1 16:34 NNO
9 17,4 23,3 15:23 10,6 05:38 2,6 1,7 0,0 0,9 5,1 14:43 WZW
10 16,8 21,0 16:21 11,6 23:47 1,9 0,4 0,0 1,7 8,1 18:35 WZW
11 16,1 22,8 17:10 10,3 03:08 3,0 0,8 0,3 1,4 6,6 15:48 WZW
12 16,5 22,3 16:35 12,1 23:58 2,3 0,6 0,0 1,2 6,1 17:50 WZW
13 14,5 19,6 17:47 10,3 06:25 3,8 0,1 3,0 1,7 8,1 16:56 W
14 15,3 21,3 16:37 9,3 05:13 3,6 0,6 0,0 1,2 7,2 13:27 N
15 15,1 20,2 19:22 8,2 06:07 3,5 0,2 0,5 1,0 6,1 11:16 ZW
16 19,5 27,3 15:46 12,7 06:14 1,6 2,8 0,5 1,4 8,1 13:55 ZW
----------------------------------------------------------------------------------
18,6 34,7 2 8,2 15 31,8 37,1 23,4 1,5 11,7 7 W

Max >= 25,0: 6
Max <= 30,0: 14
Min <= 0,0: 0
Min <= -10,0: 0
Max Rain: 11,0 on day 7
Days of Rain: 7 (>= 0,2 mm) 3 (>= 2,0 mm) 0 (>= 20,0 mm)
Heat Base: 18,3 Cool Base: 18,3 Method: Integration

User avatar
mcrossley
Posts: 5006
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Jessie Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

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

Postby mcrossley » Sat Aug 17, 2013 4:06 pm

Ron, it doesn't look at the content of the reports, it just displays them, so yes it will work fine with a comma decimal.

User avatar
nitrx
Posts: 1300
Joined: Sun Dec 13, 2009 1:21 pm
Weather Station: WH1080
Operating System: Windows 10
Location: Apeldoorn The Netherlands
Contact:

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

Postby nitrx » Sat Aug 17, 2013 6:17 pm

mcrossley wrote:Ron, it doesn't look at the content of the reports, it just displays them, so yes it will work fine with a comma decimal.


Thanks Mark I will give it a try soon.

Ron

wetter-pocking
Posts: 4
Joined: Wed Jan 04, 2012 7:45 pm
Weather Station: Davis Monitor II
Operating System: Windows 7
Location: Pocking

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

Postby wetter-pocking » Sat Aug 17, 2013 6:56 pm

@ beteljuice

:clap: Thanks for your work! :clap:

Everything works fine now!

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 » Tue Sep 17, 2013 4:38 pm

Got this working even with my limited knowledge, http://www.rainman.me.uk/month-reports.php
only problem the website is displaying the degree symbol wrong, looks OK on the original report any ideas where to look to correct this
thanks in anticipation
You do not have the required permissions to view the files attached to this post.

User avatar
steve
Cumulus Author
Posts: 26297
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in Spain
Contact:

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

Postby steve » Tue Sep 17, 2013 5:07 pm

stewart45 wrote:only problem the website is displaying the degree symbol wrong, looks OK on the original report any ideas where to look to correct this
Your web page is utf-8, so I think you need to select the utf-8 option in Cumulus in the NOAA setup.
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

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 18, 2013 7:52 am

Hi Steve
Can't see that option on the NOAA setup under configeration or am I looking in the wrong place

User avatar
steve
Cumulus Author
Posts: 26297
Joined: Mon Jun 02, 2008 6:49 pm
Weather Station: None
Operating System: None
Location: On tour in Spain
Contact:

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

Postby steve » Wed Sep 18, 2013 7:55 am

It was an addition to 1.9.4, it sounds like you have 1.9.3.
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

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 18, 2013 9:25 am

Thanks Steve
upgraded and problem sorted

User avatar
beteljuice
Posts: 2456
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 » Wed Sep 18, 2013 12:27 pm

stewart45 wrote:Got this working even with my limited knowledge, http://www.rainman.me.uk/month-reports.php
....
You have multiple <doctype> , <head><body><html> statements in your page !

I am assuming you didn't follow the instructions on including and have created a html page within a html page.
Image
......................Imagine, what you will KNOW tomorrow !


Return to “Web site - General”

Who is online

Users browsing this forum: No registered users and 4 guests