[SOLVED] install fails because of timezone but only on PHP/WEB (not CLI)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
borelian
Posts: 1
Joined: Sat Oct 15, 2022 11:33 am

[SOLVED] install fails because of timezone but only on PHP/WEB (not CLI)

Post by borelian »

I'm stuck installing cacti because of date.timezone (A valid timezone that matches MySQL and the system)

The strange thing is that I added to my.cnf, and in fact is working for the PHP CLI, but fails for the PHP WEB.

My configuration: Cacti 1.2.21, Centos 7, Apache 2.4.6, MariaDB 10.6.5, PHP 7.4.32

Things that I checked:
- There are no two different php.ini files. I checked that Apache is using the same file (https://mansci-web.uai.cl/.well-known/php.php) It also shows that the timezone is correct.
- I added the /usr/share/zoneinfo/ to MariaDB, and it is has the right timezone

Code: Select all

MariaDB [mysql]> show variables like '%time_zone%';
+------------------+------------------+
| Variable_name    | Value            |
+------------------+------------------+
| system_time_zone | -03              |
| time_zone        | America/Santiago |
+------------------+------------------+
- I added the right timezone to PhP (it is working for the CLI version)
- I restarted the services. I also rebooted the server (as suggested by someone) and it doesn't work.

but nothing works. Any idea? How to check what is validating internally?

PS: The only strange thing that I had is when adding the zone info to MariaDB, and I get the following warnings:

Code: Select all

$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
Enter password: 
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
SOLVED: It's related with the browser (safari in my case). I changed browser and started using chrome, and it works. (Maybe browser's cache problem?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: [SOLVED] install fails because of timezone but only on PHP/WEB (not CLI)

Post by TheWitness »

Yea, we are going to change this feature to make it more optional moving forward. Likely in the 1.2.23 release. It was an attempt to have the graphs and the UI follow the users timezone. Most modern browsers are supposed to work with passing the TZ via a cookie though. Kind of odd.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests