Page 28 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Tue 06 Jun 2017 9:54 pm
by Grimers
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:

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 07 Jun 2017 9:04 am
by beteljuice
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 ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 08 Jun 2017 4:07 pm
by Grimers
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. :)

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 26 Jul 2017 12:54 am
by PaulMy
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 26 Jul 2017 3:45 am
by jlmr731
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.

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 26 Jul 2017 4:06 am
by PaulMy
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 26 Jul 2017 11:38 am
by jdc
Just a thought - are dayfile delimiters correctly set? As I see dates are 03-07-17

Code: Select all

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

Re: Yet Another Dayfile Reader (PHP)

Posted: Wed 26 Jul 2017 2:35 pm
by PaulMy
I don't have direct access at the moment but will check that out. Thanks,

Paul

Re: Yet Another Dayfile Reader (PHP)

Posted: Thu 27 Jul 2017 1:56 am
by PaulMy
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 31 Jul 2017 6:10 pm
by sperry russ
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 19 Aug 2017 12:47 pm
by mcrossley
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

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 19 Aug 2017 2:13 pm
by sperry russ
That shows any day that rain has fallen. But is there anyway to show the actual amount? Between .010-.050

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 19 Aug 2017 3:19 pm
by sfws
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.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sat 19 Aug 2017 6:00 pm
by sperry russ
Thanks for all the help. It is displaying the lower amounts now.

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 22 Jan 2018 11:55 pm
by beteljuice
Distribution file and languages file updated.

Thank you sutne for the Norwegian translation :D