Fix SCRIPT_DIR variable collision preventing PHP optimizer from running
CRITICAL BUG FIX: - PHP optimizer failed with 'php-config-manager.sh not found' error - Root cause: Multiple sourced libraries redefining SCRIPT_DIR variable - Sourcing chain: php-optimizer → php-detector → system-detect + user-manager - Each library was overwriting parent's SCRIPT_DIR causing /lib/lib/ double paths CHANGES: - php-optimizer.sh: Renamed SCRIPT_DIR → PHP_TOOLKIT_DIR (unique variable) - user-manager.sh: Renamed SCRIPT_DIR → _LIB_SRCDIR to avoid collision - php-optimizer.sh: Fixed detect_system() → initialize_system_detection() - Removed 2>/dev/null error suppression to see actual errors during debug RESULT: - Script now loads all libraries successfully - Menu displays correctly with all 9 options - System detection runs properly - Ready for testing Files modified: - lib/user-manager.sh (3 lines) - modules/performance/php-optimizer.sh (10 lines)
This commit is contained in:
+3
-3
@@ -7,9 +7,9 @@
|
||||
|
||||
# Source dependencies
|
||||
if [ -z "$TOOLKIT_BASE_DIR" ]; then
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/common-functions.sh"
|
||||
source "$SCRIPT_DIR/system-detect.sh"
|
||||
_LIB_SRCDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$_LIB_SRCDIR/common-functions.sh"
|
||||
source "$_LIB_SRCDIR/system-detect.sh"
|
||||
fi
|
||||
|
||||
# Initialize temp session directory if not set
|
||||
|
||||
Reference in New Issue
Block a user