docker-glpi icon indicating copy to clipboard operation
docker-glpi copied to clipboard

PHP 7.4.0 - 8.3.0 (exclusive) required after update to latest image

Open AnthonyLabalestra opened this issue 2 years ago • 17 comments

Hi, I tried to update to latest image today, I got this error while trying to access from the brower. PHP 7.4.0 - 8.3.0 (exclusive) required I tried an other browser with no success. Thank you for your help

AnthonyLabalestra avatar Mar 28 '24 11:03 AnthonyLabalestra

Same issue here, docker exec 7bbfbdc8667c php /var/www/html/glpi/bin/console glpi:system:check_requirements [REQUIS] Parser PHP | [ERREUR] | La version de PHP doit être entre 7.4.0 et 8.3.0 (exclusif).

AlexGiroudOSG avatar Mar 29 '24 10:03 AlexGiroudOSG

I've done a backup and manually updated the GLPI install in the container via this portion of the script SRC_GLPI=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/tags/${VERSION_GLPI} | jq .assets[0].browser_download_url | tr -d \") TAR_GLPI=$(basename ${SRC_GLPI}) wget -P ${FOLDER_WEB} ${SRC_GLPI} tar -xzf ${FOLDER_WEB}${TAR_GLPI} -C ${FOLDER_WEB} rm -Rf ${FOLDER_WEB}${TAR_GLPI} chown -R www-data:www-data ${FOLDER_WEB}${FOLDER_GLPI}

After one or two maintenance command asked by glpi, everything was fine.

AlexGiroudOSG avatar Mar 29 '24 11:03 AlexGiroudOSG

Hello,

I'm using the latest docker image and I'm not getting this error.

What version of GLPI are you using? Have you tried updating GLPI?

DiouxX avatar Mar 29 '24 12:03 DiouxX

Can confirm I've got the same issue as well.

Using: diouxx/glpi:latest@sha256:cadfa091414052b52a45fd7d1fc04240f403ea9330fc06db94ae8b56d6727a1e

mrcheap1984 avatar Mar 29 '24 22:03 mrcheap1984

Checking php versions in the container.

Could this be the cause? root@help:/var/log/apache2# php -version PHP 8.3.4 (cli) (built: Mar 20 2024 17:21:36) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.4, Copyright (c) Zend Technologies with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies

mrcheap1984 avatar Mar 29 '24 22:03 mrcheap1984

I use the latest version of GLPI

image

with the latest docker image that uses the PHP 8.3.4 and I don't get your error

php -version PHP 8.3.4 (cli) (built: Mar 20 2024 17:21:36) (NTS) Copyright (c) The PHP Group Zend Engine v4.3.4, Copyright (c) Zend Technologies with Zend OPcache v8.3.4, Copyright (c), by Zend Technologies

To use the latest docker image, I followed the steps below :

  1. docker-compose down
  2. docker pull diouxx/glpi
  3. docker-compose up -d
  4. Update to GLPI 10.0.14 with the tarball inside container

DiouxX avatar Mar 30 '24 10:03 DiouxX

@DiouxX, can you expand on step 4? How are you updating GLPI?

It appears that the script targets version 10.0.7, which is what my container is running.

farrowscore avatar Apr 04 '24 15:04 farrowscore

You can use your GLPI volume on your host to update with the archive in the "classic" way :

  1. Download tarball : wget https://github.com/glpi-project/glpi/releases/download/10.0.14/glpi-10.0.14.tgz
  2. Extract tarball : tar -xf glpi-10.0.14.tgz
  3. Copy content to yyour GLPI folder : cp -Rf glpi/* <YOUR_GLPI_FOLDER>/
  4. Update ownershirp : chown -R www-data:www-data <YOUR_GLPI_FOLDER>/*
  5. Clean old version (maybe optional) : <YOUR_GLPI_FOLDER>/version/10.0.7
  6. Go to your GLPI website to proceed update
  7. Delete install.php: rm <YOUR_GLPI_FOLDER>/install/install.php

This is an example and some steps need to be adapted to your configuration

DiouxX avatar Apr 04 '24 18:04 DiouxX

same problem, but i can't update glpi to latest, i'm using version 10.0.6 (compatible with fusioninventory. eventually do you know alternative to fusioninventory?) thanks. regards.

donmart85 avatar Apr 11 '24 07:04 donmart85

Maybe, you can use the GLPI agent (https://github.com/glpi-project/glpi-agent) instead of the fusioninventory agent

DiouxX avatar Apr 11 '24 07:04 DiouxX

You can use your GLPI volume on your host to update with the archive in the "classic" way :

  1. Download tarball : wget https://github.com/glpi-project/glpi/releases/download/10.0.14/glpi-10.0.14.tgz
  2. Extract tarball : tar -xf glpi-10.0.14.tgz
  3. Copy content to yyour GLPI folder : cp -Rf glpi/* <YOUR_GLPI_FOLDER>/
  4. Update ownershirp : chown -R www-data:www-data <YOUR_GLPI_FOLDER>/*
  5. Clean old version (maybe optional) : <YOUR_GLPI_FOLDER>/version/10.0.7
  6. Go to your GLPI website to proceed update
  7. Delete install.php: rm <YOUR_GLPI_FOLDER>/install/install.php

This is an example and some steps need to be adapted to your configuration

Ty for the solution, indeed we need to update GLPI to start the new docker

Dev-AMSOM avatar May 07 '24 10:05 Dev-AMSOM

This is not a solution (upgrade) I'm using some plugins that is not updated yet to latest version of GLPI

krystianroza avatar May 23 '24 01:05 krystianroza

The problem is due to the plugins you are using which are not up to date and do not support the latest version of GLPI.

DiouxX avatar May 29 '24 04:05 DiouxX

I have the same error and I can't update due to some versions of some plugins. 10.0.3 is my version.

It would be interesting to be able to specify the version of PHP you want to use.

eduardosantanna avatar May 29 '24 19:05 eduardosantanna

PHP 7.4 is end of life and no longer maintained. It's best if the plugins you use are updated to be compatible with PHP 8.3.

I can try to make a separate image based on Debian 12 and with PHP 7.4.

Just give me time to do it

DiouxX avatar May 30 '24 11:05 DiouxX

I've created an Docker image to GLPI based on Debian 12 and with PHP 7.4

You can use the tag glpi:php7.4

DiouxX avatar Jun 14 '24 13:06 DiouxX

Thank you @DiouxX for providing us with this Docker image! Can you produce versions of your docker image in addition to latest? Like x.y.z (your version, not GLPI ones). I think this might solve this kind of issues in the future.

bh42 avatar Jun 24 '24 16:06 bh42