DiouxX / docker-glpi

Project to deploy GLPI with docker
237 stars 187 forks source link

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

Open AnthonyLabalestra opened 7 months ago

AnthonyLabalestra commented 7 months ago

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

AlexGiroudOSG commented 7 months ago

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 commented 7 months ago

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.

DiouxX commented 7 months ago

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?

mrcheap1984 commented 7 months ago

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

Using: diouxx/glpi:latest@sha256:cadfa091414052b52a45fd7d1fc04240f403ea9330fc06db94ae8b56d6727a1e

mrcheap1984 commented 7 months ago

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

DiouxX commented 7 months ago

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
farrowscore commented 7 months ago

@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.

DiouxX commented 7 months ago

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/* /
  4. Update ownershirp : chown -R www-data:www-data /*
  5. Clean old version (maybe optional) : /version/10.0.7
  6. Go to your GLPI website to proceed update
  7. Delete install.php: rm /install/install.php

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

donmart85 commented 7 months ago

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.

DiouxX commented 7 months ago

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

Dev-AMSOM commented 6 months ago

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/* /
  4. Update ownershirp : chown -R www-data:www-data /*
  5. Clean old version (maybe optional) : /version/10.0.7
  6. Go to your GLPI website to proceed update
  7. Delete install.php: rm /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

krystianroza commented 5 months ago

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

DiouxX commented 5 months ago

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.

eduardosantanna commented 5 months ago

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.

DiouxX commented 5 months ago

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 commented 5 months ago

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

bh42 commented 4 months ago

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.