You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2024-06-27 07:20:41

BW~Merlin
Member
Registered: 2021-05-09
Posts: 33

Timezone usage has not been activated.

I am really struggling with getting the timezone activated.

When I run

myuser@helpdesk-01:/var/www/html/glpi$ sudo php bin/console database:enable_timezones

I get the following error

Timezones usage cannot be activated due to following errors:
- Timezones seems not loaded, see https://glpi-install.readthedocs.io/en/ … zones.html.

When I go to

and try and run

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

I get the error message

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

When I login to MariaDB with

 mysql -u MYGLPIDBUSER -p

and run

GRANT SELECT ON `mysql`.`time_zone_name` TO 'glpi'@'localhost';

I get the following error

ERROR 1142 (42000): GRANT command denied to user 'MYGLPIDBUSER'@'localhost' for table `mysql`.`time_zone_name`

It would appear that I have messed something up somewhere but I am unable to figure out where and how to fix it.

Offline

#2 2024-06-27 11:53:49

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Timezone usage has not been activated.

Well.. it seems that you are doing strange things.
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

It's a wrong root password.

first of all, try with
mysql -u root -p
and try a login.
If so, u can launch the grant. I belive that glpi (MYGLPIDBUSER ??) has no rights to edit this... right?

Offline

#3 2024-07-15 14:12:42

g.poulnot
Member
Registered: 2022-10-05
Posts: 68

Re: Timezone usage has not been activated.

In mysql database:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

in /var/www/html/glpi
php bin/console glpi :database :enable_timezones

Offline

#4 2024-07-29 04:26:47

BW~Merlin
Member
Registered: 2021-05-09
Posts: 33

Re: Timezone usage has not been activated.

Kaya84 wrote:

Well.. it seems that you are doing strange things.
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

It's a wrong root password.

first of all, try with
mysql -u root -p
and try a login.
If so, u can launch the grant. I belive that glpi (MYGLPIDBUSER ??) has no rights to edit this... right?

I get the following error

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

I am not 100% sure but I think part of the MariaDB/MySQL security process ask to disable the root account.

Offline

#5 2024-07-29 04:36:07

BW~Merlin
Member
Registered: 2021-05-09
Posts: 33

Re: Timezone usage has not been activated.

g.poulnot wrote:

In mysql database:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

I cannot login to the database as the root user.  If I login as my GLPI user the command doesn't appear to run

g.poulnot wrote:

in /var/www/html/glpi
php bin/console glpi :database :enable_timezones

If I run

php bin/console glpi :database :enable_timezones

I get

Error: An error has occurred, but the trace of this error could not recorded because of a problem accessing the log file.
Uncaught Exception Symfony\Component\Console\Exception\RuntimeException: Cannot write in "/var/lib/glpi/_sessions" directory. in /var/www/html/glpi/src/Console/Application.php at line 384

If I run

sudo php bin/console glpi :database :enable_timezones

I get

Command "glpi" is not defined.

Offline

#6 2024-07-29 12:29:37

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Timezone usage has not been activated.

glpi:database:enable_timezones

No spaces


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#7 2024-07-30 07:12:52

BW~Merlin
Member
Registered: 2021-05-09
Posts: 33

Re: Timezone usage has not been activated.

cconard96 wrote:

glpi:database:enable_timezones

No spaces

When I run

sudo php bin/console glpi:database:enable_timezones

from

/var/www/html/glpi$

I get the following error

Timezones usage cannot be activated due to following errors:
- Timezones seems not loaded, see https://glpi-install.readthedocs.io/en/ … zones.html.

Offline

#8 2024-07-31 11:17:04

Kaya84
Member
Registered: 2019-06-13
Posts: 217

Re: Timezone usage has not been activated.

I think you have a problem with your Mariadb istance.


You need to grant the access to timezone command on the db/tables.
Find the root user for mysql and
GRANT SELECT ON `mysql`.`time_zone_name` TO 'glpi'@'localhost';

then fix permissions (suppose www-data as user and group)

chown -R www-data:www-data /var/www/html/glpi/*

Then try again

Offline

Board footer

Powered by FluxBB