From d36780a725f29c8ef61b36bbb8bce49a60732b40 Mon Sep 17 00:00:00 2001 From: Jules Date: Tue, 5 May 2026 11:24:06 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20d=C3=A9tection=20automatique=20version?= =?UTF-8?q?=20PHP=20(support=20Debian=2013=20Trixie/PHP=208.4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index b79db95..42f962d 100644 --- a/install.sh +++ b/install.sh @@ -32,9 +32,13 @@ apt-get upgrade -y -qq # ============================================================================= step "Installation des paquets" +PHP_VER=$(apt-cache search '^php[0-9]\.[0-9]-fpm$' | awk '{print $1}' | sort -V | tail -1 | grep -oP '\d+\.\d+') +[[ -z "$PHP_VER" ]] && PHP_VER="8.4" +log "Version PHP détectée : ${PHP_VER}" + DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \ nginx \ - php8.2-fpm php8.2-mysql php8.2-cli php8.2-mbstring php8.2-curl php8.2-intl \ + php${PHP_VER}-fpm php${PHP_VER}-mysql php${PHP_VER}-cli php${PHP_VER}-mbstring php${PHP_VER}-curl php${PHP_VER}-intl \ mariadb-server \ postfix postfix-mysql \ dovecot-core dovecot-imapd \ @@ -229,7 +233,7 @@ server { location ~ \.php$ { include snippets/fastcgi-php.conf; - fastcgi_pass unix:/run/php/php8.2-fpm.sock; + fastcgi_pass unix:/run/php/php${PHP_VER}-fpm.sock; fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; }