A PHP version bumps from 8.1 to 8.3 on a cPanel server, and within minutes users report “Login failed” on Roundcube. Mail itself is fine; IMAP and SMTP work. Roundcube is broken because it relies on PHP extensions and configuration that the upgrade changed, removed, or stopped enabling by default. The fix is mechanical once you know what changed; the trap is assuming Roundcube itself is broken when the actual cause is the PHP environment.
What’s happening
Roundcube needs several PHP extensions: imap (or the modern IMAP userspace stub), mbstring, intl, pdo_mysql, gd or imagick, xml, zip, and OpenSSL bindings. Some are bundled, some are loaded via .ini, and a PHP upgrade can drop the bindings or change defaults. On cPanel-managed PHP via EA4, the upgrade installs new PHP packages but doesn’t always re-enable every extension that was active in the previous version.
How to verify
From the cPanel host, check which PHP version is active for Roundcube and what extensions are loaded:
php -v
php -m
ea-php83-cli -m | grep -i imap
Then look at the Roundcube log:
tail /usr/local/cpanel/base/3rdparty/roundcube/logs/errors.log
Common errors: “IMAP extension not enabled,” “Class ‘rcube_imap’ not found,” “Could not connect to IMAP.”
The fix
-
Verify the IMAP extension is loaded. WHM > Software > EA4 > PHP Extensions, ensure
ea-phpXX-php-imapis installed for the active PHP version. Or via CLI:yum install ea-php83-php-imap /usr/local/cpanel/scripts/restartsrv_apache_php_fpm -
Confirm
mbstring,intl,xml, andgdare present and enabled. EA4 usually pulls these as dependencies, but a manual PHP rebuild can drop one. -
Check
display_errorsin php.ini is off in production butlog_errorsis on, pointing at a writable log. Roundcube errors are useless if PHP isn’t logging them. -
Restart the relevant services:
/usr/local/cpanel/scripts/restartsrv_apache_php_fpm /usr/local/cpanel/scripts/restartsrv_cpsrvd -
Test login with a known good account and watch the Roundcube error log in real time. If login still fails with all extensions in place, check IMAP itself — Roundcube can’t log in if Dovecot is down or the user is locked out.
When the PHP fleet across cPanel servers needs to upgrade without losing webmail, Stack Harbor handles the dependency map and the post-upgrade verification under cPanel/WHM management.