Post-Install Issues

Post Reply
wavelov3r
Newbie
Newbie
Posts: 3
Joined: Tue Mar 18, 2025 7:27 am
Station model: FT-0370L
Software: Custom script

Post-Install Issues

Post by wavelov3r » Thu Mar 20, 2025 7:41 am

Hi, i'm an intermediate user, and i have more than one issue after installing (and setup) meteotemplate.
My host is Aruba.it, with php 8+ and Mysql on Linux (Apache / PHP-FPM).
All checks are ok, (install/testMySql.php, install/serverCheck.php).

Main issues are:
1) When trying to open Control panel

Code: Select all

Fatal error: Uncaught mysqli_sql_exception: Expression #1 of ORDER BY clause is not in SELECT list, references column 'Sql1853116_5.alldata.DateTime' which is not in SELECT list; this is incompatible with DISTINCT in /web/htdocs/www.mysite.com/home/template/admin/index.php:41 Stack trace: #0 /web/htdocs/www.mysite.com/home/template/admin/index.php(41): mysqli_query() #1 {main} thrown in /web/htdocs/www.mysite.com/home/template/admin/index.php on line 41
2) When trying to update via API (success is displayed, but i've this error in php logs, and no update is made)

Code: Select all

AH02296: Unknown directive php_flag perhaps misspelled or defined by a module not included in the server configuration
For the 1) i've had access to admin panel modifying the query in index.php line 41:
from SELECT DISTINCT YEAR(DateTime) FROM alldata ORDER BY DateTime
to SELECT DISTINCT YEAR(DateTime) AS year FROM alldata ORDER BY YEAR(DateTime) DESC;
it works, but this is a fix, not a solution....

For the 2) i have no idea (the get update query, custom generated is: api.php?U=1742405467&T=25.3&H=79.9&P=1000.1&W=12.6&G=19.8&R=0&B=272&S=788&UV=0&PASS=MYPASS).
I've manualy added 1 row of data just to see if something changes..

Also, i can see random errors when load other pages (with ?errors in the last part of the link), i.e.:
/template/indexDesktop.php?errors:

Code: Select all

Warning: Undefined array key "climate" in /web/htdocs/www.mysite.com/home/template/menu.php on line 490
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 490
Warning: Undefined array key "climate" in /web/htdocs/www.mysite.com/home/template/menu.php on line 513
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 513
Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /web/htdocs/www.mysite.com/home/template/menu.php on line 513
Warning: Undefined array key "climate" in /web/htdocs/www.mysite.com/home/template/menu.php on line 525
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 525
Warning: Undefined array key "us" in /web/htdocs/www.mysite.com/home/template/scripts/functions.php on line 115
Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /web/htdocs/www.mysite.com/home/template/scripts/functions.php on line 162
Warning: Undefined array key "climate" in /web/htdocs/www.mysite.com/home/template/menu.php on line 525
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 525
/web/htdocs/www.mysite.com/home/template/menu.php on line 527
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 527
" target="_blank" class="digimeg-nav-item">
Warning: Undefined array key "climate" in /web/htdocs/www.mysite.com/home/template/menu.php on line 528
Warning: Trying to access array offset on null in /web/htdocs/www.mysite.com/home/template/menu.php on line 528
Warning: Undefined array key "us" in /web/htdocs/www.mysite.com/home/template/scripts/functions.php on line 115
Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /web/htdocs/www.mysite.com/home/template/scripts/functions.php on line 162
And this error appears with climate, astronomy, etc (i've not pasted all errors).

Finally, the DEV told me to run a query into my PhPMyAdmin:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
result:
#1227 - Access denied; you need (at least one of) the SUPER or SYSTEM_VARIABLES_ADMIN privilege(s) for this operation

i start to think it's incompatible with this host.
Any hint, maybe from someone who uses the same hosting service?

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

Re: Post-Install Issues

Post by FSC830 » Thu Mar 20, 2025 5:53 pm

Actually I did not see the errors #1 and #2 you reported, for the random errors it seems that the code is not modified for PHP 8.x.
And as far as I remember I need to set the global sql_mode and sql_mode to ' '.
I did set this also in /etc/mysql/my.cnf.

Regards
Image

wavelov3r
Newbie
Newbie
Posts: 3
Joined: Tue Mar 18, 2025 7:27 am
Station model: FT-0370L
Software: Custom script

Re: Post-Install Issues

Post by wavelov3r » Fri Mar 21, 2025 3:29 pm

I don't have a self-hosted website, i'm using a paid service, so no /etc/mysql/my.cnf to configure :/

service is aruba.it site hosting

edit, after a ticket opened on the hosting assistance :

Dear Customer,

I am sorry to inform you that it is not possible to apply the changes you requested.

I would like to inform you that the database Sql1853116 is running MySQL version 8.0, and in this version, the following sql_modes are set by default:

ONLY_FULL_GROUP_BY
STRICT_TRANS_TABLES
NO_ZERO_IN_DATE
NO_ZERO_DATE
ERROR_FOR_DIVISION_BY_ZERO
NO_AUTO_CREATE_USER
NO_ENGINE_SUBSTITUTION
These settings cannot be disabled at the server level.

To resolve the issue, it is necessary to disable these functions at the code level.

The syntax to disable all sql_modes is as follows:

sql
Copia
Modifica
set session sql_mode='';
This statement should be placed in all the points where the MySQL connection is created (after the connection statement).

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

Re: Post-Install Issues

Post by FSC830 » Sat Mar 22, 2025 11:02 am

Anyhow, my main site runs also at a hoster (strato.de) without access to /etc.
But as far as I can see all of my used plugins/blocks and the template are running fine, except the .pdf creation.
This is something I need to fix, but currently I am very busy with other things, so I do not set priority to this.
Actual PHP version at hosted site is v8.3.

Regards
Image

wavelov3r
Newbie
Newbie
Posts: 3
Joined: Tue Mar 18, 2025 7:27 am
Station model: FT-0370L
Software: Custom script

Re: Post-Install Issues

Post by wavelov3r » Mon Mar 24, 2025 7:45 am

...Ok no worry, i have switched to Grafana in a self-hosted server. LOOKS GREAT.
The user can change the time series for its needs ;)
Under development...
1.png
1.png (97.2 KiB) Viewed 2574 times
2.png
2.png (110.22 KiB) Viewed 2574 times

Post Reply