Skip to content

Commit 5e0aed0

Browse files
committed
Installer Fixes
1 parent a9a3843 commit 5e0aed0

3 files changed

Lines changed: 92 additions & 64 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,22 @@ Changes are organized by date, with the most recent changes listed first.
66

77
## 2026-07-01
88

9+
### NGINX SESSION CACHE KEY FIX
10+
11+
- Moved the `$es_session` FastCGI cache key from global `nginx.conf` scope into `php-fpm.conf`, matching the WooCommerce window-shopping pattern where the session variable is defined and used in the PHP location.
12+
- Keeps WooCommerce session cache-key salting intact while avoiding nginx startup failures from an undefined global `$es_session` variable.
13+
914
### 🐛 MARIADB ROOT AUTH INSTALL FIX
1015

1116
- Replaced the MariaDB root authentication bootstrap command with `unix_socket OR mysql_native_password`, matching MariaDB's default multi-plugin root auth model and avoiding failures when the `ed25519` plugin is not installed.
1217
- Removed the direct root `mysql.global_priv` rewrite from `mariadb-install.sh` so local `sudo mariadb` socket automation remains available after the admin password is set.
1318
- Added a CI guard to prevent reintroducing unsupported root `ed25519` auth or direct root privilege-table rewrites in the MariaDB installer.
1419

20+
### 🐛 PHP PACKAGE INSTALL FIX
21+
22+
- Fixed PHP package helper output so `mapfile` receives one package per array item instead of one whitespace-delimited package string, resolving apt failures like `Unable to locate package php8.5 php8.5-bcmath ...`.
23+
- Added a focused CI test for PHP package list helpers, including PHP 8.5 opcache handling and whitespace-free array entries.
24+
1525
## 2026-04-29
1626

1727
### ⚡ NGINX: EARLY HINTS PASS-THROUGH SUPPORT

scripts/functions/shared/enginescript-common.sh

Lines changed: 78 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -645,80 +645,98 @@ function set_php_permissions() {
645645

646646

647647
# ----------------------------------------------------------------
648-
# Check if all required EngineScript installation components are completed
649-
# Returns 0 if all components are installed, exits with error if incomplete
648+
# Check if all required EngineScript installation steps are completed
649+
# Returns 0 if all installation steps are marked complete, returns 1 if incomplete
650650
function check_installation_completion() {
651651
local install_log="/etc/enginescript/install-state.conf"
652-
local missing_components=()
653-
local quiet_mode="${1:-false}" # Optional parameter for quiet mode
654-
655-
# Source the install log if it exists
652+
local install_options="/home/EngineScript/enginescript-install-options.txt"
653+
local missing_steps=()
654+
local install_log_found="false"
655+
local quiet_mode="${1:-false}" # Optional parameter to suppress success output
656+
657+
if [[ -f "$install_options" ]]; then
658+
# shellcheck disable=SC1090
659+
source "$install_options" 2>/dev/null || true
660+
fi
661+
662+
# Keep this in the same order as the run_install_step calls in enginescript-install.sh.
663+
local installation_steps=(
664+
"REPOS|Install Repositories"
665+
"REMOVES|Remove Preinstalled Software"
666+
"BLOCK|Block Unwanted Packages"
667+
"UBUNTU_PRO|Ubuntu Pro Setup"
668+
"DEPENDS|Install Dependencies"
669+
"CRON|Cron"
670+
"ACME|ACME.sh"
671+
"GCC|GCC"
672+
"OPENSSL|OpenSSL"
673+
"SWAP|Swap"
674+
"KERNEL_TWEAKS|Kernel Tweaks"
675+
"THP|Transparent Huge Pages"
676+
"KSM|Kernel Samepage Merging"
677+
"SFL|Raising System File Limits"
678+
"NTP|NTP"
679+
)
680+
681+
if [[ "${INSTALL_DIGITALOCEAN_REMOTE_CONSOLE:-0}" = "1" ]]; then
682+
installation_steps+=("DO_CONSOLE|DigitalOcean Remote Console")
683+
fi
684+
685+
installation_steps+=(
686+
"PCRE|PCRE"
687+
"ZLIB|zlib"
688+
"LIBURING|liburing"
689+
"UFW|UFW"
690+
"MARIADB|MariaDB"
691+
"PHP|PHP"
692+
"REDIS|Redis"
693+
"NGINX|Nginx"
694+
"TOOLS|Tools"
695+
)
696+
697+
# Source the install log if it exists. If it does not exist, every step is incomplete.
656698
if [[ -f "$install_log" ]]; then
699+
# shellcheck disable=SC1090
657700
source "$install_log" 2>/dev/null || true
658-
else
659-
if [[ "$quiet_mode" != "true" ]]; then
660-
echo "ERROR: Installation log not found at $install_log"
661-
echo "This indicates EngineScript installation was never started or completed."
662-
echo "Please run the full installation script first."
663-
fi
664-
return 1
701+
install_log_found="true"
665702
fi
666-
667-
# Define all required installation components
668-
local required_components=(
669-
"REPOS"
670-
"REMOVES"
671-
"BLOCK"
672-
"UBUNTU_PRO"
673-
"DEPENDS"
674-
"CRON"
675-
"ACME"
676-
"GCC"
677-
"OPENSSL"
678-
"SWAP"
679-
"KERNEL_TWEAKS"
680-
"THP"
681-
"KSM"
682-
"SFL"
683-
"NTP"
684-
"PCRE"
685-
"ZLIB"
686-
"LIBURING"
687-
"UFW"
688-
"MARIADB"
689-
"PHP"
690-
"REDIS"
691-
"NGINX"
692-
"TOOLS"
693-
)
694-
695-
# Check each required component
696-
for component in "${required_components[@]}"; do
697-
local var_name="$component"
703+
704+
# Check each installation step for its completion marker.
705+
local step_definition
706+
for step_definition in "${installation_steps[@]}"; do
707+
local var_name="${step_definition%%|*}"
708+
local step_name="${step_definition#*|}"
698709
local var_value="${!var_name:-0}"
699-
700-
if [[ "$var_value" != "1" ]]; then
701-
missing_components+=(
702-
"$component"
703-
)
710+
711+
if [[ "$install_log_found" != "true" || "$var_value" != "1" ]]; then
712+
missing_steps+=("${var_name}|${step_name}")
704713
fi
705714
done
706-
715+
707716
# Return results based on mode
708-
if [[ ${#missing_components[@]} -eq 0 ]]; then
717+
if [[ ${#missing_steps[@]} -eq 0 ]]; then
709718
if [[ "$quiet_mode" != "true" ]]; then
710-
echo "✅ SUCCESS: All EngineScript components are installed and completed."
719+
echo "✅ SUCCESS: All EngineScript installation steps are marked complete."
711720
fi
712721
return 0
713722
else
714-
if [[ "$quiet_mode" != "true" ]]; then
723+
if [[ "$install_log_found" != "true" ]]; then
724+
echo "ERROR: Installation log not found at $install_log"
725+
echo "This indicates EngineScript installation was never started or completed."
726+
else
715727
echo "❌ ERROR: EngineScript installation is incomplete."
716-
echo "❌ The following components are missing or failed to complete:"
717-
echo ""
718-
for component in "${missing_components[@]}"; do
719-
echo " - $component"
720-
done
721-
echo ""
728+
fi
729+
730+
echo "❌ The following installation steps are not marked complete:"
731+
echo ""
732+
for step_definition in "${missing_steps[@]}"; do
733+
local var_name="${step_definition%%|*}"
734+
local step_name="${step_definition#*|}"
735+
echo " - ${var_name}: ${step_name}"
736+
done
737+
echo ""
738+
739+
if [[ "$quiet_mode" != "true" ]]; then
722740
echo "RESOLUTION:"
723741
echo "1. Run the full EngineScript installation script to complete setup"
724742
echo "2. Check /var/log/EngineScript/install-error-log.log for specific errors"

scripts/install/enginescript-install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ run_install_step "NGINX" "/usr/local/bin/enginescript/scripts/install/nginx/ngin
251251
# Tools
252252
run_install_step "TOOLS" "/usr/local/bin/enginescript/scripts/install/tools/tools-install.sh" "Tools"
253253

254+
# Cleanup
255+
/usr/local/bin/enginescript/scripts/functions/php-clean.sh
256+
/usr/local/bin/enginescript/scripts/functions/enginescript-cleanup.sh
257+
254258
# --------------------------------------------------------
255259
# Final Installation Completion Verification
256260
echo ""
@@ -285,10 +289,6 @@ fi
285289
echo "============================================================="
286290
echo ""
287291

288-
# Cleanup
289-
/usr/local/bin/enginescript/scripts/functions/php-clean.sh
290-
/usr/local/bin/enginescript/scripts/functions/enginescript-cleanup.sh
291-
292292
# Server Reboot
293293
clear
294294

0 commit comments

Comments
 (0)