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

Yet Another Dayfile Reader (PHP)

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

Moderators: daj, TNETWeather

User avatar
Grimers
Posts: 195
Joined: Tue Nov 24, 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby Grimers » Tue Jun 06, 2017 9:54 pm

Aha, thanks guys. It wasn't something I've done then! I've modified my script, so hopefully I'll be able to find what's been changed. :lol:
William Grimsley.

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: Yet Another Dayfile Reader (PHP)

Postby beteljuice » Wed Jun 07, 2017 9:04 am

Thanks Mark. :clap:

Only problem is I don't actually have a script which works accross all versions of php :bash:

I'll have to go back to the 'base' release when I can get my tired old head around it - thought, did it behave like this in earlier php releases ?
Image
......................Imagine, what you will KNOW tomorrow !

User avatar
Grimers
Posts: 195
Joined: Tue Nov 24, 2015 9:07 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 64-bit
Location: Newton Poppleford, Devon, UK
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby Grimers » Thu Jun 08, 2017 4:07 pm

No idea on that one, but just thinking it may be easier for you to distribute just the snippet of code that needs changing, as quite a few people have changed the scripts' look. :)
William Grimsley.

User avatar
PaulMy
Posts: 1564
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Wed Jul 26, 2017 12:54 am

I am helping a new user with his website and trying to get the Dayfile Reader working. He had downloaded the script but that didn't work out of the box so he came here with his laptop and now using my working files, edited with his data files, etc. But no luck http://www.blenheimweather.ca/cu/betel_ ... maryCU.php

Any suggestion where I have misled?

Paul

jlmr731
Posts: 112
Joined: Sat Aug 27, 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Youngstown, Ohio
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby jlmr731 » Wed Jul 26, 2017 3:45 am

PaulMy wrote:I am helping a new user with his website and trying to get the Dayfile Reader working. He had downloaded the script but that didn't work out of the box so he came here with his laptop and now using my working files, edited with his data files, etc. But no luck http://www.blenheimweather.ca/cu/betel_ ... maryCU.php

Any suggestion where I have misled?

Paul


do you know what version of php?
can you access any error log files from his server? that might give a clue
i had issues with php ver 7 and if you look back a few pages BCJKiwi did post a workaround that got mine to work.

User avatar
PaulMy
Posts: 1564
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Wed Jul 26, 2017 4:06 am

Thanks for your reply.
His php version is 5.6 and looking at his cPanel there were no errors shown. Could there be some php settings that needs to be done?

We think we have the dayfile.txt path correct as everything is in the same folder, and message indicating that day file not found when we had entered an incorrect path.

Paul

User avatar
jdc
Posts: 121
Joined: Tue Jun 19, 2012 8:51 pm
Weather Station: Davis VP2 : Instromet
Operating System: Win 10 : Win XP
Location: Berwick-upon-Tweed, England.
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby jdc » Wed Jul 26, 2017 11:38 am

Just a thought - are dayfile delimiters correctly set? As I see dates are 03-07-17

Code: Select all

$field_delimiter = ',';
$date_delimiter = '-';

User avatar
PaulMy
Posts: 1564
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Wed Jul 26, 2017 2:35 pm

I don't have direct access at the moment but will check that out. Thanks,

Paul

User avatar
PaulMy
Posts: 1564
Joined: Sun Sep 28, 2008 11:54 pm
Weather Station: Davis Vantage Pro 2 w/Envoy USB
Operating System: Windows-8
Location: Komoka, ON Canada
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby PaulMy » Thu Jul 27, 2017 1:56 am

Yes you are correct and it is now working by changing the date delimiter. Thank you very much :clap:

I will have him look at his setup and see why he has his date format different.

Paul

@John,
Looked at your website and it is very very nice.
We travel through Northumberland County and Tweed village to get to our cottage ;)
Paul

sperry russ
Posts: 70
Joined: Mon Jan 30, 2012 5:09 pm
Weather Station: WindBlown Weather Station
Operating System: Windows XP (SP3)
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby sperry russ » Mon Jul 31, 2017 6:10 pm

I have noticed that if rainfall is .004 or less that it does not show in the statistics of dayfile reader. If .005 or more it does. Is there any way for me to show the lesser amounts in my statistics with the dayfile reader?

Thanks

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

Re: Yet Another Dayfile Reader (PHP)

Postby mcrossley » Sat Aug 19, 2017 12:47 pm

I added "Rain Days" to my version a little while back - maybe something someone wants to incorporate into the official release?
http://weather.wilmslowastro.com/datasummary.php

sperry russ
Posts: 70
Joined: Mon Jan 30, 2012 5:09 pm
Weather Station: WindBlown Weather Station
Operating System: Windows XP (SP3)
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby sperry russ » Sat Aug 19, 2017 2:13 pm

That shows any day that rain has fallen. But is there anyway to show the actual amount? Between .010-.050

sfws
Posts: 349
Joined: Fri Jul 27, 2012 11:29 am
Weather Station: off-line Fine Offset plus others
Operating System: off-line Vista and W10 PCs
Location: UK

Re: Yet Another Dayfile Reader (PHP)

Postby sfws » Sat Aug 19, 2017 3:19 pm

sperry russ wrote:I have noticed that if rainfall is .004 or less that it does not show in the statistics of dayfile reader. If .005 or more it does. Is there any way for me to show the lesser amounts in my statistics with the dayfile reader?

Simple answer Sperry - remove the following single line from the PHP script.
Line 443 (in my copy) reads

Code: Select all

        if($value < 0.05) $value = 0; // 1 tip regarded as error

I can see your source using "http://sperry.us/stats/stats.php?view=getorfmiland", although that shows a messy output, it does confirm that your script does contain the above line within a function called "DoRain". So if your source is minimised and so you cannot identify line numbers, in your script editor use Find to locate the above code snippet up to and including the semicolon, so you can delete it. You probably also want to delete the equivalent nearby line for rainfall in mm.

sperry russ
Posts: 70
Joined: Mon Jan 30, 2012 5:09 pm
Weather Station: WindBlown Weather Station
Operating System: Windows XP (SP3)
Location: Central Florida USA
Contact:

Re: Yet Another Dayfile Reader (PHP)

Postby sperry russ » Sat Aug 19, 2017 6:00 pm

Thanks for all the help. It is displaying the lower amounts now.


Return to “Web site - General”

Who is online

Users browsing this forum: Toxic17 and 7 guests