Fix WordPress manager 500: define DB_HOST, lazy-load MySQL provDb

- Core.php: add DB_HOST constant (was undefined, causing fatal error on any
  WordPress manager page load in PHP 8)
- WordPressManager: make provDb lazy (only connects to MySQL when actually
  needed for install/clone/delete — not on list/info which only use SQLite)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-10 03:17:35 +00:00
parent 8f32c973cb
commit 57949214de
2 changed files with 20 additions and 14 deletions
+1
View File
@@ -14,6 +14,7 @@ if (!$_cfg) {
}
define('DB_PATH', $_cfg['database']['path'] ?? '/var/lib/novacpx/panel.db');
define('DB_HOST', $_cfg['database']['host'] ?? 'localhost');
define('DB_WP_USER', $_cfg['database']['wp_user'] ?? '');
define('DB_WP_PASS', $_cfg['database']['wp_pass'] ?? '');
define('SECRET_KEY', $_cfg['panel']['secret'] ?? '');