some problems with php8.1
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
some problems with php8.1
hi,
justo for info, I tried to update the site to version 8.1 (with 8.0 MT does not work, boh).
maybe Davide already knows but there are some pages that don't work for me:
/pages/station:
climapeIndices.php
graph.php (monthly averages)
reportDaily.php
all PDF reports (daily/monthly/yearly) - (already fixed for version 8 (but on my side they don't work)
/metar/index.php
thanks in advance
justo for info, I tried to update the site to version 8.1 (with 8.0 MT does not work, boh).
maybe Davide already knows but there are some pages that don't work for me:
/pages/station:
climapeIndices.php
graph.php (monthly averages)
reportDaily.php
all PDF reports (daily/monthly/yearly) - (already fixed for version 8 (but on my side they don't work)
/metar/index.php
thanks in advance
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: some problems with php8.1
Adding Station Diary and Climate to the list.
In general, it seems anything associated with a PDF fails.
Tom
www.MeckWeather.com
In general, it seems anything associated with a PDF fails.
Tom
www.MeckWeather.com
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
Ciao,
today I discovered that I had problems with the meteobridge: it was no longer recording data on the database. (restarted MB and everything restarted regularly)
But the problem arises that the offline notification does not work with php8.1:
The current block continues to show the current time and the icon in the footer is also green "online". (and obviously no notification email has be sent)
I noticed the anomaly from the stationStatus block (lastest version 5.1) which was correctly displaying offline.
to add to the to-do list
tnx
today I discovered that I had problems with the meteobridge: it was no longer recording data on the database. (restarted MB and everything restarted regularly)
But the problem arises that the offline notification does not work with php8.1:
The current block continues to show the current time and the icon in the footer is also green "online". (and obviously no notification email has be sent)
I noticed the anomaly from the stationStatus block (lastest version 5.1) which was correctly displaying offline.
to add to the to-do list
tnx
- Attachments
-
- ScreenShot01099.jpg (84.87 KiB) Viewed 3094 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
It seems working correctly on your site now
But the image you posted is indeed strange
After a blackout period, the indication at the bottom of the page goes 'online' after the first update of the meteotemplateLive.txt file while the stationStatus block goes 'online' after the first write in the database.
So it is possible, for a few minutes, to have the first indicator 'online' and the second 'offline'.
But the image you posted shows the stationStatus block 'offline' with the indication that the last database write occurred 4' 23" ago ( and this is not correct )
But the image you posted is indeed strange
After a blackout period, the indication at the bottom of the page goes 'online' after the first update of the meteotemplateLive.txt file while the stationStatus block goes 'online' after the first write in the database.
So it is possible, for a few minutes, to have the first indicator 'online' and the second 'offline'.
But the image you posted shows the stationStatus block 'offline' with the indication that the last database write occurred 4' 23" ago ( and this is not correct )
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
Yes, it works but...
Note, however, that the image has been modified with paint to show you how at about 14:00 I discovered the problem before I restored everything.
Note the interruptions: from your screenshot of last night at 23:50 to now ,there has been other interruptions for a total of 125 minutes (almost every 2 hours there are holes of 30-45 minutes) VERY STRANGE, and no reports of offline.
it will be necessary to understand what causes these interruptions, whether to php8.1, or to meteobridge (but it never happened) or to something else.
and above all that it notifies the offline
Note, however, that the image has been modified with paint to show you how at about 14:00 I discovered the problem before I restored everything.
Note the interruptions: from your screenshot of last night at 23:50 to now ,there has been other interruptions for a total of 125 minutes (almost every 2 hours there are holes of 30-45 minutes) VERY STRANGE, and no reports of offline.
it will be necessary to understand what causes these interruptions, whether to php8.1, or to meteobridge (but it never happened) or to something else.
and above all that it notifies the offline
- Attachments
-
- ScreenShot01106.jpg (15.27 KiB) Viewed 3082 times
Last edited by meteoesine on Tue Aug 16, 2022 6:35 am, edited 1 time in total.
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
Another minor anomaly:
I noticed that since I set for php8.1 evapotranspiration does not report the value at 00:00 the next day
I noticed that since I set for php8.1 evapotranspiration does not report the value at 00:00 the next day
- Attachments
-
- ScreenShot01104.jpg (34.29 KiB) Viewed 3081 times
-
- ScreenShot01103.jpg (53.5 KiB) Viewed 3081 times
-
- ScreenShot01105.jpg (21.42 KiB) Viewed 3081 times
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
established that it is not meteobridge that loses data
- Attachments
-
- ScreenShot01107.jpg (13.3 KiB) Viewed 3074 times
-
- ScreenShot01108.jpg (43.96 KiB) Viewed 3074 times
- lemimi
- Advisor
- Posts: 86
- Joined: Wed Dec 12, 2018 3:31 pm
- Location: France - Normandie
- Station model: Brandson 304557
- Contact:
Re: some problems with php8.1
Hi there,
I seem to have had the same kind of problem, see the images below for the last 14,10 and 7 days.
My MeteoTemplate runs in PHP 7.4.
On August 11 in the evening, I reloaded a new WU API key.
It seems to work fine since
Have a nice day everyone... Michel
I seem to have had the same kind of problem, see the images below for the last 14,10 and 7 days.
My MeteoTemplate runs in PHP 7.4.
On August 11 in the evening, I reloaded a new WU API key.
It seems to work fine since
Have a nice day everyone... Michel
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
why sometimes it displays meteobridge and other times ecowitt plugin?
Help! what is happening?
Help! what is happening?
- Attachments
-
- ScreenShot01110.jpg (19.13 KiB) Viewed 3069 times
-
- ScreenShot01106.jpg (18.93 KiB) Viewed 3069 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
Try updating the api.php script with the attached one.
On line 47 it has a debug option activated ( logging of all calls in cache/apiReqLog.txt ).
Has also a fix in case meteotemplateLive.txt is malformed.
Please send me the meteobridge log 8:00-8:40 so I can take a look if it contains anything 'suspicious'
On line 47 it has a debug option activated ( logging of all calls in cache/apiReqLog.txt ).
Has also a fix in case meteotemplateLive.txt is malformed.
Please send me the meteobridge log 8:00-8:40 so I can take a look if it contains anything 'suspicious'
- Attachments
-
- api_php8.1.zip
- (11.92 KiB) Downloaded 61 times
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
now I try it
see the meteobridge log, since I restarted it yesterday afternoon.
last operation around 9:00 when I extrapolated the data to check the last missing 30 min
see the meteobridge log, since I restarted it yesterday afternoon.
last operation around 9:00 when I extrapolated the data to check the last missing 30 min
- Attachments
-
- ScreenShot01111.jpg (110.91 KiB) Viewed 3065 times
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
You are using your meteobridge ( calling api.php script directly ) and the ecowitt plugin ( that feeds only indoor T/H/P, soil moisture and lightning ), the stationData block shows the last software signature it finds, so it is normalmeteoesine wrote: ↑Tue Aug 16, 2022 7:34 am why sometimes it displays meteobridge and other times ecowitt plugin?
Help! what is happening? :shock: :shock:
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
I mean this logging ( in text form, if possible ):
The other log you posted shows that nothing strange was logged by the meteobridge
The other log you posted shows that nothing strange was logged by the meteobridge
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
in allegato
- Attachments
-
- standard-iso-202208160800-202208160840-min5.zip
- (477 Bytes) Downloaded 54 times
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
another hole of 30 min
offline e non manda più i dati a meteobridge
offline e non manda più i dati a meteobridge
- Attachments
-
- ScreenShot01115.jpg (22.78 KiB) Viewed 3055 times
-
- ScreenShot01114.jpg (57.54 KiB) Viewed 3056 times
-
- ScreenShot01113.jpg (4.88 KiB) Viewed 3058 times
Last edited by meteoesine on Tue Aug 16, 2022 11:21 am, edited 1 time in total.
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
it must be a problem due to php 8.1
as soon as I set to 7.4 everything started working again
as soon as I set to 7.4 everything started working again
- Attachments
-
- ScreenShot01117.jpg (5.92 KiB) Viewed 3054 times
-
- ScreenShot01116.jpg (18.99 KiB) Viewed 3054 times
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: some problems with php8.1
I believe if you are using the Ecowitt Plugin and the 'new' api, you should be using a service call to send a http: call to the api.
I might be wrong about that, but it does work for me.
Tom
I might be wrong about that, but it does work for me.
Tom
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
hello Tom,
I am always open to all alternatives
could you kindly send me the complete details and instructions of the events to be added in the meteobridge?
have you also set php 8.1?
But in the 'weather nets' I guess meteotemplate has to be removed, isn't it?
many thanks in advance
I am always open to all alternatives
could you kindly send me the complete details and instructions of the events to be added in the meteobridge?
have you also set php 8.1?
But in the 'weather nets' I guess meteotemplate has to be removed, isn't it?
many thanks in advance
- Attachments
-
- ScreenShot01118.jpg (15.88 KiB) Viewed 3043 times
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: some problems with php8.1
Yes, I am using PHP 8.1.
I followed the directions from this thread: https://www.wxforum.net/index.php?topic=40447.0
The complete line to be entered is:
http://YOUR-SITE/yourpath-to-the-templa ... api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&TIN=[thb0temp-lastval.1:]&HIN=[thb0hum-lastval.1:]&T1=[th1temp-lastval.1:]&H1=[th1hum-lastval.1:]&SM1=[th20hum-lastval.0:]&SM2=[th21hum-lastval.0:]&SM3=[th22hum-lastval.0:]&SM4=[th23hum-lastval.0:]&SM5=[th24hum-lastval.0:]&L=[lgt0energy-lastval.0:]&PP1=[air0pm-lastval:2]&PP2=[air1pm-lastval:2]&PASS=yourpassword
You have to remove any sensors you do not have.
At the bottom of the "Services" tab, you need to add a service. Select 'HTTP Request' then select 'Periodical" then click add service event.
You will now see a blank service event.
You need to pick your frequency to send and add your api call, then click save.
For your reference, this is mine.
http://www.meckweather.com/template/api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&TIN=[thb0temp-lastval.1:]&HIN=[thb0hum-lastval.1:]&SM1=[th20hum-lastval.0:]&L=[lgt0total-dmax.0:]&LD=[lgt0dist-lastval.1:]<=[lgt0total-nonzerotime=epoch:]&PASS='password" <-Use your update password
Just so you know, there seems to be a bit a lag using this method as I do not think the MB device places as high a priority on these events - sometimes it will not report for a few seconds and then I get 3 in 10 secs - but overall, I am happy with the results.
Additionally, you are correct to remove Meteotemplate from the "Weather Networks" tab by clicking 'No Upload' and then save.
I do not see the api viewer plugin on your site, but if you use it - the software description would show EcowittNet not Meteobridge.
Good luck and ask any more question if you need to.
Tom
I followed the directions from this thread: https://www.wxforum.net/index.php?topic=40447.0
The complete line to be entered is:
http://YOUR-SITE/yourpath-to-the-templa ... api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&TIN=[thb0temp-lastval.1:]&HIN=[thb0hum-lastval.1:]&T1=[th1temp-lastval.1:]&H1=[th1hum-lastval.1:]&SM1=[th20hum-lastval.0:]&SM2=[th21hum-lastval.0:]&SM3=[th22hum-lastval.0:]&SM4=[th23hum-lastval.0:]&SM5=[th24hum-lastval.0:]&L=[lgt0energy-lastval.0:]&PP1=[air0pm-lastval:2]&PP2=[air1pm-lastval:2]&PASS=yourpassword
You have to remove any sensors you do not have.
At the bottom of the "Services" tab, you need to add a service. Select 'HTTP Request' then select 'Periodical" then click add service event.
You will now see a blank service event.
You need to pick your frequency to send and add your api call, then click save.
For your reference, this is mine.
http://www.meckweather.com/template/api.php?U=[epoch.1:]&T=[th0temp-lastval.1:]&TMX=[th0temp-max5:]&TMN=[th0temp-min5:]&H=[th0hum-lastval.1:]&P=[thb0seapress-lastval:1]&W=[wind0avgwind-lastval=kmh:1]&G=[wind0wind-lastval=kmh:1]&B=[wind0dir-lastval:1]&R=[rain0total-daysum:--]&RR=[rain0rate-lastval:1]&S=[sol0rad-lastval:2]&UV=[uv0index-lastval:1]&TIN=[thb0temp-lastval.1:]&HIN=[thb0hum-lastval.1:]&SM1=[th20hum-lastval.0:]&L=[lgt0total-dmax.0:]&LD=[lgt0dist-lastval.1:]<=[lgt0total-nonzerotime=epoch:]&PASS='password" <-Use your update password
Just so you know, there seems to be a bit a lag using this method as I do not think the MB device places as high a priority on these events - sometimes it will not report for a few seconds and then I get 3 in 10 secs - but overall, I am happy with the results.
Additionally, you are correct to remove Meteotemplate from the "Weather Networks" tab by clicking 'No Upload' and then save.
I do not see the api viewer plugin on your site, but if you use it - the software description would show EcowittNet not Meteobridge.
Good luck and ask any more question if you need to.
Tom
- Dehatter
- Professional
- Posts: 349
- Joined: Sun Jan 07, 2018 5:11 am
- Location: Matthews, NC, USA
- Station model: Ecowitt WH80
- Software: Ecowitt GW1000
- Contact:
Re: some problems with php8.1
Additionally, I have determined that rebooting my Meteobridge device dramatically increases the stability of the calls.
Tom
Tom
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
The logging shows 'ERROR 500 internal server error'.
It could be useful, if you have access to the error log on your server, if you could verify if there is any error in the script api.php
( access to the error log varies, depending on server, on one server of mine every directory has an 'error_log' file, on another there is an entry in the control panel ).
You may also try this version of api.php ( which has additional logging and also error logging in file cache/apiErrorLog.txt, I tested this feature in the last block I wrote )
It could be useful, if you have access to the error log on your server, if you could verify if there is any error in the script api.php
( access to the error log varies, depending on server, on one server of mine every directory has an 'error_log' file, on another there is an entry in the control panel ).
You may also try this version of api.php ( which has additional logging and also error logging in file cache/apiErrorLog.txt, I tested this feature in the last block I wrote )
- Attachments
-
- api_php8.1.zip
- (12.26 KiB) Downloaded 53 times
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
thank you very much Tom,
I followed your instructions and you have to say that it works, but...
most probably as I have a lot (maybe too much) events/FTP/and scripts, and as you say, it has a certain (strong) delay, with the execution of this additional event, there is more time when Meteotemplate is offline than the time it is operational.
This is not good for me
I'll go back to the old API with stable php 7.4 waiting for a solution
thanks again for your contribution
I followed your instructions and you have to say that it works, but...
most probably as I have a lot (maybe too much) events/FTP/and scripts, and as you say, it has a certain (strong) delay, with the execution of this additional event, there is more time when Meteotemplate is offline than the time it is operational.
This is not good for me
I'll go back to the old API with stable php 7.4 waiting for a solution
thanks again for your contribution
- meteoesine
- Forecaster
- Posts: 166
- Joined: Sun Aug 20, 2017 4:08 pm
- Location: Esine, Valcamonica (BS) - Italy
- Station model: Davis Pro2+
- Software: Meteobridge nano
- Contact:
Re: some problems with php8.1
grazie Davide per il tuo 'sbattimento'. grazie davvero.
l'ultima api che mi hai inviato non contiene gli extra sensori quindi ho ripristinato quella precedente
ho rimesso php 8.1 e ho attivato il log degli errori che era disabilitato.
stiamo a vedere
l'ultima api che mi hai inviato non contiene gli extra sensori quindi ho ripristinato quella precedente
ho rimesso php 8.1 e ho attivato il log degli errori che era disabilitato.
stiamo a vedere
-
- Observer
- Posts: 40
- Joined: Tue Sep 05, 2017 10:55 am
- Location: Ballaugh
- Station model: Davis VP2
- Software: Weather Display
- Contact:
Re: some problems with php8.1
my host has 8.1.9 on https://www.hc-iom.co.uk/template/indexDesktop.php
the summary block just has the spinning icon
on the forecast block the wxsim fails to load
i have the php8.0 updates on
when i tried to change the default forecast from wxsim to noyr via block setup in admin i got error 504 so that's not working the plugin setup ran ok
i had to do it by editing the settings file in that block manually
these run ok on php8.0.17 running on my synology unit http://ballaugh.no-ip.biz:59202/templat ... esktop.php
there are other issues but these will do to start with
the summary block just has the spinning icon
on the forecast block the wxsim fails to load
i have the php8.0 updates on
when i tried to change the default forecast from wxsim to noyr via block setup in admin i got error 504 so that's not working the plugin setup ran ok
i had to do it by editing the settings file in that block manually
these run ok on php8.0.17 running on my synology unit http://ballaugh.no-ip.biz:59202/templat ... esktop.php
there are other issues but these will do to start with
-
- Expert
- Posts: 862
- Joined: Tue Jan 12, 2021 8:03 am
- Location: Italy
- Station model: WH2650
- Software: WH2650 (direct upload)
- Contact:
Re: some problems with php8.1
- regarding the summary block here is an updated version (uses yr.no api v2, it is compatible with php 8.1, at leat on my test ): viewtopic.php?f=54&t=2278&p=11393&hilit ... ock#p11431
- regarding the forecast block try rerunning the setup, set 'field separator in latest.csv' and save
- regarding the forecast block try rerunning the setup, set 'field separator in latest.csv' and save