2026 年 11 月 PHP 安全更新:用脚本检查你的服务器

2026 年 11 月 19 日,PHP 项目为所有受支持的版本发布了安全更新。严重问题只在特定设置下才会出现。一个免费的脚本能在几秒钟内检查你的服务器是否受影响,而不改动系统上的任何东西。

此次发布修复了什么

此次发布修复了 17 个漏洞,其中几个是严重漏洞,可能导致代码执行。据 PHP 安全团队称,这些严重问题需要非默认设置或不常见的部署方式。除了版本之外,脚本还会专门检查这些设置。

版本修复版本备注
PHP 8.58.5.13积极支持中
PHP 8.48.4.28积极支持中
PHP 8.38.3.37仅提供安全修复
PHP 8.28.2.36仅提供安全修复,直到 2026 年底
PHP 8.68.6.0同日发布的新主版本,包含这些修复
PHP 8.1 及更早版本–PHP 项目不再提供更新

以下设置是主要风险:

下载检查脚本

下载 check-php-nov2026-en.sh

curl -fsSLO https://www.hollop.net/downloads/check-php-nov2026-en.sh
echo "617c5f0e8ca9c8da31160f3959739e2ca5e1615ef3b948038a1a1b2b4ae2c745  check-php-nov2026-en.sh" | sha256sum -c
chmod +x check-php-nov2026-en.sh

该脚本可在 Ubuntu、Debian、RHEL、Alma 和 Rocky 上用 Bash 运行。它只读取:不修改任何文件,不重启任何服务,也不发送任何数据。运行之前,你可以在下方查看完整的源代码。脚本的输出是英文的。

脚本检查哪些内容

  1. 服务器上的所有 PHP 程序(CLI、FPM、CGI,也包括 /opt/remi 和 /opt/plesk 下的)及其版本。
  2. 向后移植:Ubuntu 和 Debian 在自己的软件包中保留旧的版本号,只应用修复。因此脚本会在软件包的变更日志中搜索 CVE 编号。
  3. 更新后内存中仍是旧 PHP 版本、需要重启的正在运行的服务。
  4. 分别针对 CLI、FPM、Apache 和 CGI 的有风险的设置。
  5. FPM 池和 Web 服务器配置(nginx、Apache)。
  6. 使用 --docker 时,还会检查正在运行的容器中的 PHP。

用法和结果

sudo ./check-php-nov2026-en.sh             # normal output
sudo ./check-php-nov2026-en.sh --docker    # also running containers
sudo ./check-php-nov2026-en.sh --checkmk   # one line for Checkmk
sudo ./check-php-nov2026-en.sh --no-color  # without colors, e.g. for logs

退出码为 0 表示正常,1 表示有警告,2 表示受影响。这是未打补丁的 Ubuntu 24.04 上的典型输出:

== 1. PHP binaries & versions ==
  /usr/bin/php8.3  →  PHP 8.3.6 (cli)
         Package: php8.3-cli (8.3.6-0ubuntu0.24.04.13)  –  origin: distribution package (backports possible)
  [CRIT] /usr/bin/php8.3: PHP 8.3.6 < 8.3.37 – AFFECTED (no backport found in changelog)

== 4. PHP-FPM pools ==
  [WARN] /etc/php/8.3/fpm/pool.d/www.conf: catch_workers_output=yes (CVE-2026-129291, …)

== Result ==
  AFFECTED – 1 critical finding(s). Update PHP and restart PHP-FPM/Apache!
消息含义该怎么做
CRIT: older version, no backport受影响更新 PHP,然后重启 PHP-FPM 或 Apache
CRIT: process with deleted file更新已安装,但服务未重启systemctl restart php8.3-fpm 或 apache2
CRIT: end of lifePHP 8.1 或更早版本,不再有更新计划迁移到受支持的版本
WARN: backport found发行版已应用修复在发行版的安全公告中确认是否完整
WARN: setting启用了有风险的配置在更新之前先加以缓解,见下文

更新之前的缓解措施

这些步骤可以降低风险,但不能代替更新。

安装更新

# Ubuntu, Debian
sudo apt update && apt list --upgradable 2>/dev/null | grep -i php
sudo apt upgrade
sudo systemctl restart 'php*-fpm' apache2

# RHEL, Alma, Rocky
sudo dnf check-update 'php*'
sudo dnf upgrade 'php*'
sudo systemctl restart php-fpm httpd

来自 Ondřej Surý 的 PPA(deb.sury.org)和 Remi 仓库的软件包通常在当天就能获得新版本。Ubuntu 和 Debian 自己的软件包会稍晚一些。发布后不久,那里的 CRIT 往往只是表示:更新尚未提供。

大量服务器:Checkmk 和批量部署

使用 --checkmk 时,脚本会以 Checkmk 本地检查格式输出一行。一个小小的包装脚本就够了:

sudo install -m 755 check-php-nov2026-en.sh /usr/local/sbin/
sudo tee /usr/lib/check_mk_agent/local/php_security_2026_11 >/dev/null <<'EOF'
#!/bin/sh
exec /usr/local/sbin/check-php-nov2026-en.sh --checkmk
EOF
sudo chmod +x /usr/lib/check_mk_agent/local/php_security_2026_11

执行服务发现后,就会出现服务 “PHP Security 2026-11”。如果包装脚本位于 local/3600/ 这样的子文件夹中,它每小时只运行一次。要把脚本部署到大量服务器上,请使用你已有的工具,例如 Ansible、Salt 或 Uyuni。

查看脚本

完整源代码(313 行),SHA-256 617c5f0e8ca9c8da…
#!/usr/bin/env bash
# =============================================================================
# check-php-nov2026-en.sh  –  https://www.hollop.net/en/php-security-check-november-2026.html
#
# Checks whether a Linux system is affected by the vulnerabilities fixed in the
# PHP security release of 19 Nov 2026 (17 issues, several critical / RCE).
#   Fixed versions: 8.5.13 | 8.4.28 | 8.3.37 | 8.2.36  (8.1 and older: EOL)
#
# Checks:
#   1. All PHP binaries found (CLI, FPM, CGI, /opt/remi, /opt/plesk, ...)
#      -> upstream version against fixed version
#      -> for distribution packages (Ubuntu/Debian/RHEL) also the
#         package changelog for the CVE IDs (backports!)
#   2. Running PHP processes still using an old (deleted) binary
#   3. Risky configuration per SAPI (cli/fpm/apache2/cgi):
#        session.upload_progress.enabled, fatal_error_backtraces,
#        zend.exception_ignore_args, date.timezone
#   4. FPM pools with catch_workers_output, mixed session serializers
#   5. Web server: nginx fastcgi_keep_conn on / Apache enablereuse=on
#   6. Optional: PHP in running Docker containers (--docker)
#
# The script changes nothing on the system and sends no data.
#
# Usage:   sudo ./check-php-nov2026-en.sh [--docker] [--checkmk] [--no-color]
# Exit:    0 = OK, 1 = WARN, 2 = CRIT (affected)
# =============================================================================

set -u

# --- fixed version per branch ---------------------------------------------
declare -A FIXED=( [8.2]=8.2.36 [8.3]=8.3.37 [8.4]=8.4.28 [8.5]=8.5.13 )
SUPPORTED_MIN_BRANCH="8.2"
# PHP 8.6.0 (GA 19 Nov 2026) already contains the fixes
# CVE IDs from the release (for backport detection in the package changelog)
CVES="CVE-2026-129289 CVE-2026-115560 CVE-2026-126714 CVE-2026-129496 \
CVE-2026-129474 CVE-2026-129182 CVE-2026-129481 CVE-2026-129291 \
CVE-2026-129538 CVE-2026-15353 CVE-2026-128064 CVE-2026-48841"

# --- options ----------------------------------------------------------------
DO_DOCKER=0; CHECKMK=0; COLOR=1
for a in "$@"; do
  case "$a" in
    --docker)   DO_DOCKER=1 ;;
    --checkmk)  CHECKMK=1; COLOR=0 ;;
    --no-color) COLOR=0 ;;
    -h|--help)  sed -n '2,30p' "$0"; exit 0 ;;
    *) echo "Unknown option: $a" >&2; exit 3 ;;
  esac
done
[ -t 1 ] || COLOR=0
if [ "$COLOR" = 1 ]; then
  R=$'\e[31m'; G=$'\e[32m'; Y=$'\e[33m'; B=$'\e[1m'; N=$'\e[0m'
else R=; G=; Y=; B=; N=; fi

STATUS=0; CRIT_MSG=(); WARN_MSG=()
out()  { [ "$CHECKMK" = 1 ] || printf '%s\n' "$*"; }
ok()   { out "  ${G}[OK]${N}   $*"; }
warn() { out "  ${Y}[WARN]${N} $*"; WARN_MSG+=("$*"); [ "$STATUS" -lt 1 ] && STATUS=1; }
crit() { out "  ${R}[CRIT]${N} $*"; CRIT_MSG+=("$*"); STATUS=2; }
info() { out "  [INFO] $*"; }
hdr()  { out ""; out "${B}== $* ==${N}"; }

# limit every external call: no stdin, max. 10 s
run10()  { timeout 10 "$@" </dev/null 2>/dev/null; }
ver_ge() { [ "$(printf '%s\n%s\n' "$2" "$1" | sort -V | head -n1)" = "$2" ]; }
is_on()  { case "${1,,}" in 1|on|yes|true) return 0;; *) return 1;; esac; }

[ "$(id -u)" -ne 0 ] && [ "$CHECKMK" = 0 ] && \
  echo "${Y}Note: without root some configs/processes may not be readable.${N}"

# =============================================================================
hdr "1. PHP binaries & versions"
# =============================================================================
mapfile -t CANDIDATES < <(
  {
    find /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin -maxdepth 1 \
         \( -type f -o -type l \) 2>/dev/null
    find /opt -maxdepth 6 \( -type f -o -type l \) -path '*bin/php*' 2>/dev/null
  } | grep -E '/(php([0-9.]+)?|php-fpm([0-9.]+)?|php([0-9.]+)?-fpm|php-cgi([0-9.]+)?|php([0-9.]+)?-cgi|phpdbg([0-9.]+)?)$' \
    | while read -r f; do readlink -f "$f"; done | sort -u
)

declare -A BRANCH_CLI=()   # branch -> CLI binary (for config checks)
FOUND=0
for bin in "${CANDIDATES[@]}"; do
  [ -x "$bin" ] || continue
  # phpdbg: -v = oplog (interactive!), version only with -V
  vflag="-v"; [[ "$(basename "$bin")" == phpdbg* ]] && vflag="-V"
  vout=$(run10 "$bin" "$vflag" | head -n3)
  grep -qiE '^(PHP|phpdbg)' <<<"$vout" || continue
  v=$(head -n1 <<<"$vout" | grep -m1 -oE '[0-9]+\.[0-9]+\.[0-9]+')
  [ -n "$v" ] || continue
  FOUND=1
  br="${v%.*}"
  sapi=$(head -n1 <<<"$vout" | sed -nE 's/.*\(([a-z0-9-]+)\).*/\1/p')
  [[ "$(basename "$bin")" == phpdbg* ]] && sapi="phpdbg"
  [ "$sapi" = "cli" ] && [ -z "${BRANCH_CLI[$br]:-}" ] && BRANCH_CLI[$br]="$bin"

  # determine package origin
  pkg=""; pkgver=""; origin="unknown (self-compiled?)"
  if command -v dpkg-query >/dev/null 2>&1 && pkg=$(dpkg -S "$bin" 2>/dev/null | head -n1 | cut -d: -f1) && [ -n "$pkg" ]; then
    pkgver=$(dpkg-query -W -f='${Version}' "$pkg" 2>/dev/null)
    if [[ "$pkgver" == *sury* ]]; then origin="deb.sury.org / ondrej PPA (upstream versions)"
    else origin="distribution package (backports possible)"; fi
  elif command -v rpm >/dev/null 2>&1 && pkg=$(rpm -qf "$bin" 2>/dev/null) && [ $? -eq 0 ]; then
    pkgver="$pkg"
    if [[ "$pkg" == *remi* || "$bin" == /opt/remi/* ]]; then origin="Remi repo (upstream versions)"
    else origin="distribution package (backports possible)"; fi
  fi

  out ""
  out "  ${B}$bin${N}  →  PHP $v ($sapi)"
  out "         Package: ${pkg:--} ${pkgver:+($pkgver)}  –  origin: $origin"

  if ver_ge "$br" "8.6"; then
    ok "PHP $v – branch 8.6+ contains the fixes"
    continue
  fi
  if ! ver_ge "$br" "$SUPPORTED_MIN_BRANCH"; then
    crit "$bin: PHP $v is end of life – no upstream fixes (only backports by distribution/Plesk possible)"
    continue
  fi
  fix="${FIXED[$br]}"
  if ver_ge "$v" "$fix"; then
    ok "PHP $v >= $fix – patched"
    continue
  fi

  # upstream version too old -> look for backport in changelog
  hits=""
  if [ -n "$pkg" ] && [[ "$origin" == distribution* ]]; then
    if command -v dpkg-query >/dev/null 2>&1; then
      for cl in /usr/share/doc/"$pkg"/changelog.Debian.gz /usr/share/doc/php"$br"-common/changelog.Debian.gz; do
        [ -r "$cl" ] || continue
        for c in $CVES; do zgrep -qF "$c" "$cl" 2>/dev/null && hits+="$c "; done
        break
      done
    else
      cl=$(rpm -q --changelog "${pkg}" 2>/dev/null)
      for c in $CVES; do grep -qF "$c" <<<"$cl" && hits+="$c "; done
    fi
  fi
  if [ -n "$hits" ]; then
    n=$(wc -w <<<"$hits")
    warn "$bin: upstream $v < $fix, but backport found in package changelog ($n of $(wc -w <<<"$CVES") CVEs): $hits– check completeness with your distributor"
  elif [[ "$origin" == distribution* ]]; then
    crit "$bin: PHP $v < $fix – AFFECTED (no backport found in changelog)"
  else
    crit "$bin: PHP $v < $fix – AFFECTED → install the update (apt update && apt upgrade)"
  fi
done
[ "$FOUND" = 0 ] && ok "No PHP binaries found on the host"

# =============================================================================
hdr "2. Running PHP processes with outdated binary"
# =============================================================================
stale=0
for p in /proc/[0-9]*; do
  exe=$(readlink "$p/exe" 2>/dev/null) || continue
  case "$exe" in
    */php*|*/httpd*|*/apache2*)
      if [[ "$exe" == *"(deleted)"* ]]; then
        crit "PID ${p#/proc/} still runs a deleted/replaced binary: $exe → restart the service"
        stale=1
      fi ;;
  esac
done
# mod_php: libphp in memory, but file replaced?
if grep -lsE 'libphp[0-9.]*\.so \(deleted\)' /proc/[0-9]*/maps >/dev/null 2>&1; then
  crit "Apache still holds an old libphp*.so in memory → restart apache2/httpd"; stale=1
fi
[ "$stale" = 0 ] && ok "No processes with outdated PHP binary"

# =============================================================================
hdr "3. Risky configuration per SAPI"
# =============================================================================
php_ini() { # $1=cli-bin  $2=php.ini|""  $3=scan-dir|""  $4=php-code
  # include stderr: an invalid date.timezone only shows up as a startup warning
  if [ -n "$2" ]; then PHP_INI_SCAN_DIR="$3" timeout 10 "$1" -c "$2" -d display_startup_errors=1 -r "$4" </dev/null 2>&1
  else timeout 10 "$1" -d display_startup_errors=1 -r "$4" </dev/null 2>&1; fi
}
CODE='$k=["session.upload_progress.enabled","session.serialize_handler","fatal_error_backtraces","zend.exception_ignore_args","date.timezone","error_log"];
foreach($k as $x){$v=ini_get($x); echo $x,"=",($v===false?"<n/a>":$v),"\n";}
$tz=ini_get("date.timezone"); echo "tz_valid=",($tz===""||in_array($tz,timezone_identifiers_list(),true))?"1":"0","\n";'

for br in $(printf '%s\n' "${!BRANCH_CLI[@]}" | sort -V); do
  cli="${BRANCH_CLI[$br]}"
  # Debian/Ubuntu layout: /etc/php/X.Y/<sapi>/ ; otherwise only the CLI view
  ctxs=("cli||")
  for s in fpm apache2 cgi; do
    [ -f "/etc/php/$br/$s/php.ini" ] && ctxs+=("$s|/etc/php/$br/$s/php.ini|/etc/php/$br/$s/conf.d")
  done
  for ctx in "${ctxs[@]}"; do
    IFS='|' read -r sapi ini scan <<<"$ctx"
    out ""; out "  ${B}PHP $br / $sapi${N} ${ini:+($ini)}"
    declare -A C=()
    while IFS= read -r line; do
      if [[ "$line" =~ Invalid\ date\.timezone\ value\ \'([^\']*)\' ]]; then
        C[tz_valid]=0; C[date.timezone]="${BASH_REMATCH[1]}"; continue
      fi
      [[ "$line" == *=* ]] || continue
      k="${line%%=*}"; v="${line#*=}"
      [ "$k" = tz_valid ] && [ "${C[tz_valid]-}" = 0 ] && continue
      [ "$k" = date.timezone ] && [ "${C[tz_valid]-}" = 0 ] && continue
      C[$k]="$v"
    done < <(php_ini "$cli" "$ini" "$scan" "$CODE")

    # CVE-2026-115560: session.upload_progress
    if is_on "${C[session.upload_progress.enabled]-1}"; then
      warn "PHP $br/$sapi: session.upload_progress.enabled=On (CVE-2026-115560) → set to Off if not needed"
    else ok "session.upload_progress.enabled=Off"; fi

    # CVE-2026-129474: 8.5 only – fatal_error_backtraces=1 + zend.exception_ignore_args=0
    if [ "$br" = "8.5" ]; then
      if is_on "${C[fatal_error_backtraces]-1}" && ! is_on "${C[zend.exception_ignore_args]-0}"; then
        warn "PHP 8.5/$sapi: fatal_error_backtraces=On AND zend.exception_ignore_args=Off (CVE-2026-129474) → zend.exception_ignore_args=On (as in php.ini-production)"
      else ok "fatal_error_backtraces / zend.exception_ignore_args not critical"; fi
    fi

    # CVE-2026-129496: invalid date.timezone + error log to a file
    if [ "${C[tz_valid]:-1}" = "0" ]; then
      warn "PHP $br/$sapi: invalid date.timezone='${C[date.timezone]}' (Startup-Warning, CVE-2026-129496) ${C[error_log]:+– error_log=${C[error_log]}}"
    else ok "date.timezone valid/empty"; fi
    out "         session.serialize_handler=${C[session.serialize_handler]:-?}"
    unset C
  done
done
[ ${#BRANCH_CLI[@]} -eq 0 ] && [ "$FOUND" = 1 ] && info "No CLI binary found – config checks skipped"

# =============================================================================
hdr "4. PHP-FPM pools"
# =============================================================================
POOLS=$(ls /etc/php/*/fpm/pool.d/*.conf /etc/php-fpm.d/*.conf /etc/opt/remi/*/php-fpm.d/*.conf \
           /opt/plesk/php/*/etc/php-fpm.d/*.conf 2>/dev/null)
if [ -z "$POOLS" ]; then ok "No FPM pool configuration found"
else
  declare -A SER=()
  for f in $POOLS; do
    if grep -qE '^[[:space:]]*catch_workers_output[[:space:]]*=[[:space:]]*(yes|on|1|true)' "$f"; then
      warn "$f: catch_workers_output=yes (CVE-2026-129291, root privileges in FPM master possible) → set to 'no' until updated"
    fi
    if grep -qiE '^[[:space:]]*php(_admin)?_(value|flag)\[session\.upload_progress\.enabled\][[:space:]]*=[[:space:]]*(1|on|yes|true)' "$f"; then
      warn "$f: pool explicitly enables session.upload_progress"
    fi
    s=$(sed -nE 's/^[[:space:]]*php(_admin)?_value\[session\.serialize_handler\][[:space:]]*=[[:space:]]*([a-z_]+).*/\2/p' "$f" | tail -n1)
    SER[${s:-default}]=1
  done
  if [ ${#SER[@]} -gt 1 ]; then
    warn "FPM pools use different session.serialize_handler (${!SER[*]}) – critical with a shared session.save_path (CVE-2026-115560)"
  fi
  info "FPM pools checked: $(wc -w <<<"$POOLS") file(s)"
  ev=$(grep -hsE '^[[:space:]]*events\.mechanism' /etc/php/*/fpm/php-fpm.conf /etc/php-fpm.conf 2>/dev/null | head -n1)
  info "FPM events.mechanism: ${ev:-not set (Linux default: epoll)}"
fi

# =============================================================================
hdr "5. Web server: FastCGI connection reuse (CVE-2026-129289)"
# =============================================================================
hit=0
if [ -d /etc/nginx ]; then
  while read -r l; do [ -n "$l" ] && { warn "nginx: $l → FastCGI keepalive + PHP-FPM = request smuggling risk"; hit=1; }; done \
    < <(grep -RnsE '^[^#]*fastcgi_keep_conn[[:space:]]+on' /etc/nginx 2>/dev/null)
fi
for d in /etc/apache2 /etc/httpd; do
  [ -d "$d" ] || continue
  while read -r l; do [ -n "$l" ] && { warn "Apache: $l → enablereuse with FPM backend = request smuggling risk"; hit=1; }; done \
    < <(grep -RnsiE '^[^#]*enablereuse=on' "$d" 2>/dev/null)
done
[ "$hit" = 0 ] && ok "No fastcgi_keep_conn on / enablereuse=on found"

# =============================================================================
if [ "$DO_DOCKER" = 1 ]; then
hdr "6. Docker containers"
# =============================================================================
  if ! command -v docker >/dev/null 2>&1; then info "docker not installed"
  else
    while read -r id name; do
      [ -n "$id" ] || continue
      v=$(timeout 15 docker exec "$id" sh -c 'command -v php >/dev/null 2>&1 && php -r "echo PHP_VERSION;"' 2>/dev/null)
      [ -n "$v" ] || continue
      v="${v%%-*}"; br="${v%.*}"
      if ver_ge "$br" "8.6"; then ok "Container $name: PHP $v"
      elif ! ver_ge "$br" "$SUPPORTED_MIN_BRANCH"; then crit "Container $name: PHP $v is EOL"
      elif ver_ge "$v" "${FIXED[$br]}"; then ok "Container $name: PHP $v"
      else crit "Container $name: PHP $v < ${FIXED[$br]} – AFFECTED (rebuild/pull the image)"; fi
    done < <(timeout 15 docker ps --format '{{.ID}} {{.Names}}' 2>/dev/null)
    info "Docker check finished (only running containers with 'php' in PATH)"
  fi
fi

# =============================================================================
# Result
# =============================================================================
if [ "$CHECKMK" = 1 ]; then
  # Checkmk local check: put a wrapper into /usr/lib/check_mk_agent/local/ (call with --checkmk)
  case $STATUS in
    0) txt="Not affected by the PHP security release of 2026-11-19" ;;
    1) txt="${#WARN_MSG[@]} warning(s): ${WARN_MSG[0]}" ;;
    2) txt="${#CRIT_MSG[@]} critical: ${CRIT_MSG[0]}" ;;
  esac
  printf '%d "PHP Security 2026-11" crit=%d;warn=%d %s\n' "$STATUS" "${#CRIT_MSG[@]}" "${#WARN_MSG[@]}" "${txt//$'\n'/ }"
  exit 0
fi

hdr "Result"
case $STATUS in
  0) out "  ${G}${B}OK${N} – system not affected." ;;
  1) out "  ${Y}${B}WARNING${N} – PHP patched or backport detected, but ${#WARN_MSG[@]} configuration risk(s)." ;;
  2) out "  ${R}${B}AFFECTED${N} – ${#CRIT_MSG[@]} critical finding(s). Update PHP and restart PHP-FPM/Apache!"
     out "  Ubuntu/Debian:  apt update && apt list --upgradable 2>/dev/null | grep -i php"
     out "  RHEL/Alma:      dnf check-update 'php*'" ;;
esac
exit $STATUS

脚本中的 CVE 编号来自关于此次发布的报道。你的发行商是否修复了所有问题,只有它的安全公告才能可靠地说明,对 Ubuntu 来说就是 Ubuntu Security Notice。

FAQ

我只有虚拟主机。我能做什么?

那里不需要这个脚本,而且你也无法运行它。你可以在主机商的控制面板中或通过 phpinfo() 查看 PHP 版本。更新由主机商安装。请在面板中选择受支持的版本,即 8.2 或更新版本。

我的 Ubuntu 已经安装了所有更新,为什么还报告 CRIT?

Ubuntu 软件包保留旧的版本号,例如 8.3.6。只要 Ubuntu 还没有发布修复,脚本就在变更日志中找不到 CVE 编号,于是报告 CRIT。更新发布后,就会变成带有向后移植提示的 WARN。

这个脚本安全吗?

它只读取版本、配置文件和进程信息。它不写入任何内容,不重启任何东西,也不建立任何网络连接。通过校验和可以确认下载的文件没有被改动。

脚本也会检查 Docker 容器吗?

使用 --docker 时,它会查询所有正在运行的容器中的 PHP 版本。对于受影响的容器,你需要拉取或重新构建镜像;在容器内部更新是不持久的。

参考资料与文档