PHPVER does not select the PHP version: say so, warn in DEV mode
The PHP version is the image tag (cac:phpNN); PHPVER was only a leftover default. README/CLAUDE.md now state that, that cac:latest is PHP 8.5 today (not 8.3), and fix the stale PHP_VER build arg name. In DEV mode only, entrypoint.sh and entrypoint-fpm.sh warn loudly at start if an explicitly set PHPVER does not match the image's PHP (new scripts/dev-mode.sh, sourced in DEV only). PROD is untouched. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
This commit is contained in:
1 parent
ce9fd87183
commit
7d6a007ef9
5 files changed
+28
-168
No files matched your search
@@ -1,5 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# PHPVER does not select anything at runtime: the PHP version is the image tag
|
||||
# (cac:php83, cac:php85, ...). Remember what the caller asked for so DEV mode
|
||||
# can warn on a mismatch (dev-mode.sh); the default below is unchanged.
|
||||
PHPVER_REQUESTED="$PHPVER"
|
||||
if [ -z "$PHPVER" ]; then
|
||||
PHPVER="83";
|
||||
fi
|
||||
@@ -37,6 +41,12 @@ if [ -f /etc/httpd/conf.d/ssl.conf ]; then
|
||||
mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.bak
|
||||
fi
|
||||
|
||||
# DEV only: PHP overrides + optional Xdebug must be in place before php-fpm starts.
|
||||
if [[ $environment == 'DEV' ]]; then
|
||||
source /scripts/dev-mode.sh
|
||||
dev_check_phpver "$PHPVER_REQUESTED"
|
||||
fi
|
||||
|
||||
# httpd and php-fpm open their logs under /home/$user/logs as root: last
|
||||
# fail-closed check immediately before they start (safe-paths.sh).
|
||||
require_safe_logs /home/$user/logs/apache /home/$user/logs/php-fpm
|
||||
|
||||
Reference in new issue
Block a user