7a68086bf1
Level 1: max_children optimization (previously done) Level 2: max_children + memory_limit optimization - Calculates optimal memory_limit per domain based on traffic - Finds and modifies php.ini files safely - Validates changes before applying - Auto-rollback on errors Level 3: Advanced - max_children + memory_limit + pm.max_requests - Includes all Level 2 features - Adds pm.max_requests for memory leak prevention - Recycles processes based on traffic patterns - Comprehensive per-domain optimization Level 4: OPcache Optimization - Detects OPcache status per domain - Enables OPcache on disabled domains - Sets optimal memory_consumption based on traffic - Validates PHP syntax after changes Level 5: Everything - Comprehensive Optimization - Runs all optimizations in unified flow - Shows progress for each step - Provides detailed summary of changes - Single point to optimize entire server Helper Functions Added: - calculate_optimal_memory_limit() - memory per domain - find_php_ini_files() - locate ini files to modify - modify_php_ini_setting() - safe ini modification - validate_php_ini() - syntax validation - calculate_optimal_max_requests() - process recycling - is_opcache_enabled() - OPcache status check - enable_opcache() - enable OPcache - calculate_optimal_opcache_memory() - Opcache sizing - rollback_php_ini() - rollback on error All levels include: - Backup before modifying - Validation after changes - Automatic rollback on failure - Progress display - Summary report