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 2020-07-27 16:56:01

talekksna
Member
Registered: 2017-12-13
Posts: 4

GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hi,

When I try to upgrade from GLPI 9.4.6 to 9.5.1 and i run check requirements, I got message regarding MYSQL access to timezone?!?!

Can anyone have any idea what that means?

Thank you.

Offline

#2 2020-07-27 20:07:56

WebGreg
Member
Registered: 2020-02-27
Posts: 727

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Yep. Try (for ubuntu server 20):

# sudo mysql -u root -p
# GRANT SELECT ON mysql.time_zone_name TO 'yourglpiuser'@'localhost';
# FLUSH PRIVILEGES;
# exit;
# cd /var/www/html/glpi
# sudo bin/console glpi:migration:timestamps

And Yes when ask.

Last edited by WebGreg (2020-07-27 20:43:11)


--
GLPI 10.0.7
GLPI-Inventory 1.2.1
Ubuntu Server 20.04 LTS

Offline

#3 2020-08-05 08:55:59

talekksna
Member
Registered: 2017-12-13
Posts: 4

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hi and I want to thank you for your help. I try that and it worked.

If you don't happen to know how to solve the problem of time zones? When I try to import time zone files in MariaDB as it is described, I got error regarding leap-seconds.list can be imported...
I can import certain timezone, like Europa/Belgrade and it accept command:

mysql_tzinfo_to_sql timezone_file timezone_name | mysql -u root mysql

but

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

I got error. And if I skip that I got warning in GLPI home panel page that I missing 400 and something time zones...


Thank you.

Offline

#4 2020-08-05 11:05:20

talekksna
Member
Registered: 2017-12-13
Posts: 4

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Just to inform you that I solved everything (i hope smile ).

Thank you again for your help.

Offline

#5 2020-08-07 14:36:10

v2ni0
Member
Registered: 2020-08-07
Posts: 1

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hello talekksna,

How did you manage to solve that issue ?
I have exactly the same, and unfortunately the following command stays stuck at 40% :

php bin/console glpi:migration:timestamps

Thanks

Offline

#6 2021-03-12 12:53:33

zith
Member
Registered: 2021-03-12
Posts: 1

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

This is old but if anyone gets stuck at 40% during migration try to temporarily stop php-fpm/apache. Helped in my case and the migration completed successfully. I guess it may be waiting for some locked resources (?).

Offline

#7 2021-04-13 14:29:43

Albager
Member
Registered: 2021-03-16
Posts: 10

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hello there, I came across an issue with this step and allready searched around, but cannot find an exact answer.

Can you tell me what might be causing this?

root@geo-edvdb:/var/www/glpi# sudo bin/console glpi:migration:timestamps
Session::loadLanguage() in /var/www/glpi/inc/session.class.php line 628
Missing required intl PHP extension [color=#FF0000]Some mandatory system requirements are missing. Run "php bin/console glpi:system:check_requirements" for more details.[/color] 
root@geo-edvdb:/var/www/glpi# php bin/console glpi:system:check_requirements
Session::loadLanguage() in /var/www/glpi/inc/session.class.php line 628
Missing required intl PHP extension PHP Fatal error:  __autoload() is no longer supported, use spl_autoload_register() instead in /usr/share/php/CAS/Autoload.php on line 99

I'm running GLPI 9.5.4, PHP 8.0.3, 10.1.48-MariaDB-0+deb9u2 Debian 9.13

TIA


---edit: Problem solved. I simply forgot to restart the mysql server after

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

...completed successfully (overread that in the docs). After restart of mysql server I repeated the steps and it worked flawlessly, now the timezone-warning in GLPI is gone.

Last edited by Albager (2021-04-13 14:51:45)

Offline

#8 2021-04-15 20:59:06

oj69
Member
From: Somewhere in the cloud
Registered: 2021-02-01
Posts: 157

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Great you have found a solution. Could you please add a [SOLVED| to the title ? Thanks.

Offline

#9 2021-04-19 10:35:17

Albager
Member
Registered: 2021-03-16
Posts: 10

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hello again, obviously I was too fast saying "Problem solved".

Now I have a warning displayed in GLPI Dashboard saying "433 columns are not compatible with timezones usage."

I found that the php-intl extension was in deed missing and installed it, hoping that would fix the problem. But now the error message I receive after running the

bin/console glpi:migration:timestamps

has reduced to:

PHP Fatal error:  __autoload() is no longer supported, use spl_autoload_register() instead in /usr/share/php/CAS/Autoload.php on line 99

What am I doing wrong? I can provide more info about my setup if needed.

TIA

Offline

#10 2021-04-19 20:20:18

oj69
Member
From: Somewhere in the cloud
Registered: 2021-02-01
Posts: 157

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

please try to de-install php-cas and see if it will work. Please dont forget to restart apache after installing/deinstalling such modules

Offline

#11 2021-04-20 14:34:14

Albager
Member
Registered: 2021-03-16
Posts: 10

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

oj69 wrote:

please try to de-install php-cas and see if it will work. Please dont forget to restart apache after installing/deinstalling such modules

Thank you for the hint! I uninstalled php-cas extension using

apt-get remove php-cas

and the command

bin/console glpi:migration:timestamps

has now successfully completed the timezone migration and I think all warnings related to timezones are gone now!

Found 192 table(s) requiring migration.
Wollen Sie frotfahren [Yes/no]y
 192/192 [============================] 100%
Migrierung erfolgt.

Of course now the php-cas extension is marked as "not present" in the GLPI server extension checks page, but I guess I don't need that anyways as stated in "CAS extension test" by user remi:

"Notice: CAS library is optional.
Most users don't need it."

Last edited by Albager (2021-04-20 14:43:53)

Offline

#12 2022-09-18 22:10:50

raphou20
Member
Registered: 2016-09-04
Posts: 18

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

Hello, ,

Thanks for your response, unfortunately i have this message

MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO 'glpi'@'localhost';
ERROR 1133 (28000): Can't find any matching row in the user table

et la fameuse ligne  mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

me retourne :

Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
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.

Thanks

Last edited by raphou20 (2022-09-18 22:18:36)

Offline

#13 2022-11-15 09:22:59

WizzurdOfOdd
Member
Registered: 2022-11-15
Posts: 21

Re: GLPI 9.4.6 to 9.5.1 MYSQL time zone access

WebGreg wrote:

Yep. Try (for ubuntu server 20):

# sudo mysql -u root -p
# GRANT SELECT ON mysql.time_zone_name TO 'yourglpiuser'@'localhost';
# FLUSH PRIVILEGES;
# exit;
# cd /var/www/html/glpi
# sudo bin/console glpi:migration:timestamps

And Yes when ask.


THANK YOU SO MUCH!......
i just started using GLPI 10 and installed it on an ubuntu server with mysql... for the last 2 days i was looking for this command: # GRANT SELECT ON mysql.time_zone_name TO 'yourglpiuser'@'localhost';
unfortunately your post did only come up after registering here big_smile

thank you again @WebGreg

Offline

Board footer

Powered by FluxBB