Page 1 of 1

Values from database not read?

Posted: Mon Jan 30, 2023 1:37 pm
by FSC830
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 3297 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

Re: Values from database not read?

Posted: Tue Jan 31, 2023 8:52 pm
by FSC830
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

Re: Values from database not read?

Posted: Thu Feb 02, 2023 8:38 pm
by davidefa
Yes, alternatively you can use MariaDb which has ONLY_FULL_GROUP_BY disabled by default