Values from database not read?

Post Reply
FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Values from database not read?

Post by FSC830 » Mon Jan 30, 2023 1:37 pm

Actually I am stucking with an issue I tried to solve the whole weekend - without success so far.
I did setup 2 VM for testing, currently both with PHP 7.4.
One is using the "custom" for updating the mysql database, the other use the "API" option.
Both VMs pull the weatherstation data from the real instance accessible in internet.
At both VMs I can see, that the databases are filled in 5 minute intervall with the data.
But: at both VMs it seems, that each PHP script reading the database does not work!?? :cry:

I noticed that i.e. when using the stationAveragesBlock.php, at both VMs the averages remain empty:
stn_Average.png
stn_Average.png (16.01 KiB) Viewed 316 times
So all interactive pages (graph.php or table.php) remain empty.

Checking the mysql database from host CLI I can run the queries. I even wrote a small PHP script to check access from browser - data can be retrieved, but not from meteotemplate scripts...?

At real internet all works without any issues, but not in the test environment.

Prior digging deeper into the scripts may be someone cn point me to the right direction?

Regards
Image

FSC830
Forecaster
Forecaster
Posts: 139
Joined: Thu Aug 02, 2018 11:40 am
Station model: Davis Vantage Pro2
Software: Meteobridge

Re: Values from database not read?

Post by FSC830 » Tue Jan 31, 2023 8:52 pm

Actually I found a solution, which works at least for me.
The mysql environment value "ONLY_FULL_GROUP_BY" must not be used. Seems, that this is set by default since mysql version 5.7.
Removing this value and the averages are working.

Regards
Image

davidefa
Expert
Expert
Posts: 862
Joined: Tue Jan 12, 2021 8:03 am
Location: Italy
Station model: WH2650
Software: WH2650 (direct upload)
Contact:

Re: Values from database not read?

Post by davidefa » Thu Feb 02, 2023 8:38 pm

Yes, alternatively you can use MariaDb which has ONLY_FULL_GROUP_BY disabled by default
Image

Post Reply