Page 40 of 55

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 12:35 am
by beteljuice
@Mapantz ...

Well it seems to be working for you ..... :D

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 8:34 pm
by Phil23
On two different data sets.

My live data http://weather.inverellit.com/test_dayfile.php & also my old & new data merged http://weather.inverellit.com/historic/test_dayfile.php

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 9:19 pm
by beteljuice
Phil23 wrote: Sun 04 Aug 2019 8:34 pm On two different data sets.

My live data http://weather.inverellit.com/test_dayfile.php
You seem to have your TZ as <space> ..
.. missing hatch2.jpg from the directory.

... but functionally OK :clap:

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 10:18 pm
by Phil23
Just got this

Code: Select all

Notice: Undefined offset: -6 in /home/inv49478/public_html/weather/historic/TEST_readDayfile.php on line 1951
On
Min T° App
Min DP

& on Sunshine

Code: Select all

Notice: date_default_timezone_set(): Timezone ID '' is invalid in /home/inv49478/public_html/weather/historic/TEST_readDayfile.php on line 2248
Added timezone as

Code: Select all

$maxsunhours = 24; // Set sunshine bar graph option as above

$bg_lat = -29.773; // If $maxsunhours 0 or 1 set your Latitude in decimal, -negative values for Southern hemisphere
$bg_lon = 151.120; // If $maxsunhours 0 or 1 set your Longitude in decimal, -negative values for West
$bg_time_zone = "Australia/Sydney";  // If $maxsunhours 0 or 1 set your timezone ONLY if your data is a different TZ to your server - see: http://php.net/manual/en/timezones.php
But error is unchanged.

No issues on my working pages though that don't have the TZ set.

Code: Select all

$maxsunhours = 0; // Set sunshine bar graph option as above

$bg_lat = -29.773; // If $maxsunhours 0 or 1 set your Latitude in decimal, -negative values for Southern hemisphere
$bg_lon = 151.120; // If $maxsunhours 0 or 1 set your Longitude in decimal, -negative values for West
$bg_time_zone = "";  // If $maxsunhours 0 or 1 set your timezone *ONLY* if your data is a different TZ to your server - see: http://php.net/manual/en/timezones.php
http://weather.inverellit.com/datasummary.php
http://weather.inverellit.com/historic/datasummary.php

Edit errors only on Historic data Test Page.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 10:45 pm
by beteljuice
errors only on Historic data Test Page.
Check out your entries Jan 2012 ...

Re. TZ - I seem to remember someone else having a problem with Sydney being recognized ... put it back to ""

Re: IMPORTANT UPDATE

Posted: Sun 04 Aug 2019 10:56 pm
by beteljuice
New distribution ready ...

Ver 7.1.1 Important Update ...

betel_readDayfile.php has been updated to fix Seasonal wrong year attribution of Jan, Feb, Mar.

Rainfall, EVT, and WindRun have had the data they display changed.
Optional Rain Days summary included in Rainfall data.

Existing users only need to download betel_readDayfile_7_1_1.zip (new raindrop.png included)

Remember to back-up your existing file !!!

... and Copy ALL your user set vars to the new file

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 11:23 pm
by Phil23
beteljuice wrote: Sun 04 Aug 2019 10:45 pm Check out your entries Jan 2012 ...
Yes,

Certainly some very bizarre figures for Min's in 2012 & 13.
Work in progress cleaning those up for the sake of it.

That said though, I don't get it erroring on the original code on the same dirty data.

Re: Yet Another Dayfile Reader (PHP)

Posted: Sun 04 Aug 2019 11:55 pm
by grwkak
Seem to have this partially working:

http://wilsonsweather.host-ed.me/dayfilebetel/test.php

I can display max temp and switch to seasonal but can't display anything else (min temps, switch units) - I get a "getting data" message, but the page never changes.
Any suggestions?

Guy

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 1:32 am
by beteljuice
@grwkak

if you 'post' ?data=rainfall to your page it works (but you can't switch to anything else), That sounds like a javascript problem, or it can't find its way to betel_readDayfile.php

I can't see anything obvious with the paths you've put, and I've rechecked the distribution code and it's test page.

http://beteljuice.co.uk/daytest/test_dayfile.php It's using the 'distribution' file and a bare bones 'holding page' like yours.

Anyone else got the problem ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 1:52 am
by Super-T
I loaded all the files in the zip but get this "FATAL ERROR - Language File FAIL !!"

Perhaps I need some updates as I was running the original or close to it?

T

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 2:09 am
by beteljuice
All the file you need are in the distribution zip.

It has had some serious updates over the years, especially for php 7+

Which zip did you just download ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 2:14 am
by PaulMy
I have it working fine on my Cumulus site as http://www.komokaweather.com/weather/be ... maryCU.php
But on my Saratoga site I can get the initial page (default Max Temp) to display in Daily and Season but when I select another data item I get the Data FAIL!!! message http://www.komokaweather.com/komokaweat ... ummary.php

Enjoy,
Paul

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 3:05 am
by beteljuice
*Paul Yours at least seems to be a path issue.

Did you copy the path from your previous 'worker'

on .ca where is betel_readDayfile ?

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 9:18 am
by berwickw

Re: Yet Another Dayfile Reader (PHP)

Posted: Mon 05 Aug 2019 1:57 pm
by PaulMy
Thanks beteljuice. Saratoga now seems to be working well http://www.komokaweather.ca/betel_datasummary.php

Previously I had all the necessary files in /weather which is the home folder for the Cumulus site. And in the komokaweather-ca Saratoga folder only had betel_datasummary.php which had an include_once "../weather/betel_readDayfile.php" (I believe with the help of BCJKiwi to minimize the duplication of files)
With the new v7.1.1 that gave the DataFAIL when selecting a different data element.
Now added all the necessary files in the Saratoga komokaweather-ca folder and this now works fine as well. No doubt a path issue as you mentioned but have not been able to track it down and will need to do some further checking, but the script works great!.

Enjoy,
Paul