Upgrade 22.04 -> 24.04 fails: Fatal error "Class Database\DBConnection not found" (script keyhelp_ubuntu_upgrade_22_to_2

Have you discovered a bug? Tell us about it.
Post Reply
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

Post by luis140594 »

Server operating system + version
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.
User avatar
Alexander
Keyweb AG
Posts: 4890
Joined: Wed 20. Jan 2016, 02:23

Re: Upgrade 22.04 -> 24.04 fails: Fatal error "Class Database\DBConnection not found" (script keyhelp_ubuntu_upgrade_22_

Post by Alexander »

Hello
luis140594 wrote: Tue 23. Jun 2026, 00:12 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)
25.1 is not the latest Version for Ubutu 22.04.
The latest version, which needs to be installed in order to perform the update without issues is 26.0.


luis140594 wrote: Tue 23. Jun 2026, 00:12 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).
This sound a bit like you have not performed step 4 of the official guide when upgrading from Ubuntu 22 to 24.
https://www.keyweb.de/en/keyhelp/develo ... -ubuntu-22

luis140594 wrote: Tue 23. Jun 2026, 00:12Does 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?
Like above, yes, you need KeyHelp 26.0 first.

So revert to the clean Ubuntu 22.04 state you had before attempting the upgrade and perform the command to update KeyHelp first.

Code: Select all

keyhelp run panel-update ; 
You need to perform "keyhelp run panel-update" multiple times, as it only installs one update at a time (KeyHelp version 25.1 -> 25-2 -> 25-3 -> 26.0) until it states, that there are no more updates found and you are up-to-date.
Mit freundlichen Grüßen / Best regards
Alexander Mahr

**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Post Reply