fix: détection automatique version PHP (support Debian 13 Trixie/PHP 8.4)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -32,9 +32,13 @@ apt-get upgrade -y -qq
|
|||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
step "Installation des paquets"
|
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 \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
|
||||||
nginx \
|
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 \
|
mariadb-server \
|
||||||
postfix postfix-mysql \
|
postfix postfix-mysql \
|
||||||
dovecot-core dovecot-imapd \
|
dovecot-core dovecot-imapd \
|
||||||
@@ -229,7 +233,7 @@ server {
|
|||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
include snippets/fastcgi-php.conf;
|
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;
|
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user