Upgrade 22.04 -> 24.04 fails: Fatal error "Class Database\DBConnection not found" (script keyhelp_ubuntu_upgrade_22_to_2
-
luis140594
- Posts: 1
- Joined: Tue 23. Jun 2026, 00:03
Upgrade 22.04 -> 24.04 fails: Fatal error "Class Database\DBConnection not found" (script keyhelp_ubuntu_upgrade_22_to_2
Ubuntu 22.04.5 LTS (Jammy Jellyfish), kernel 6.8.0-1057-aws (Amazon Lightsail / EC2)
KeyHelp version + build number
25.1, Build 3433 (already updated to the latest available build via Toolbox -> Maintenance tasks -> Update control panel, before attempting the OS upgrade)
Problem description / error messages
Running the official upgrade_operating_system.sh script to move from Ubuntu 22.04 to 24.04 consistently fails at the "Run upgrade script..." step with:
Fatal error: Uncaught Error: Class "Database\DBConnection" not found in /root/keyhelp_ubuntu_upgrade_22_to_24.php:91
Stack trace:
#0 {main}
thrown in /root/keyhelp_ubuntu_upgrade_22_to_24.php on line 91
Steps to reproduce
1. Server was on Ubuntu 20.04.6 LTS, KeyHelp 25.0 Build 3398.
2. Successfully upgraded 20.04 -> 22.04 using the official script (some manual fixes were needed for ionCube loader activation for PHP 8.1, missing php8.1-mysql extension, and missing libssl1.1 affecting the panel's own PHP-FPM binary - all resolved on our side, panel and website fully operational afterwards on 22.04).
3. Attempted 22.04 -> 24.04 using:
wget --no-check-certificate https://install.keyhelp.de/scripts/upgr ... _system.sh -O upgrade_operating_system.sh && bash upgrade_operating_system.sh
4. Script fails immediately after "Run upgrade script..." with the Fatal error above.
5. Updated KeyHelp panel itself via keyhelp-toolbox -> option 9 (Start maintenance tasks) -> option 3 (Update control panel), going from Build 3398 to Build 3433.
6. Re-ran the exact same upgrade command. Same fatal error, identical line number.
7. Downloaded a fresh copy of the script directly (https://install.keyhelp.de/scripts/keyh ... o_24_php81) and compared md5sum against the one downloaded by the bash script: identical hash (b0036958cc035ad0678ff72c9a21f161), ruling out a corrupted/incomplete download.
Troubleshooting already performed (please don't suggest re-checking these)
- ionCube Loader: confirmed active and loading correctly for PHP 8.1 CLI (php -r "var_dump(extension_loaded('ionCube Loader'));" returns bool(true)).
- keyhelp version runs without error and returns the correct build info.
- No leftover continue-state files found (find / -name ".continue_upgrade_*" returns empty), so the script is correctly choosing the "22_to_24" script branch, not an old "20_to_22" continuation.
- Searched the entire KeyHelp installation for any file defining "class DBConnection" under namespace Database: only DatabaseConnection.php, DatabaseAutoLogin.php and DatabaseServer.php exist under /home/keyhelp/www/keyhelp/core/Database/ - no DBConnection.php file exists anywhere on the system (old one only exists, unnamespaced, under core-old/pending/DBConnection.php, which appears to be legacy code unrelated to this script).
- Confirmed the downloaded upgrade script is correct and uncorrupted (matching md5sum on a fresh download).
Question
Does the keyhelp_ubuntu_upgrade_22_to_24_php81 script require a newer KeyHelp build than 3433 (the latest currently served by the panel-update maintenance task) that includes a Database\DBConnection class not yet present in our installation? Or is there a different requirement we're missing to run this script successfully?
Happy to provide additional logs/output if needed.