Roundcube 1.5.0 upgrade: Internal Server Error

Solution 1:

In case using Control-WebPanel [CWP], just run these tow commands in ssh:

/scripts/update_cwp
/scripts/mail_roundcube_update

In case you install Roundcube manually, this problem will happen if you upgrade to Roundcube 1.5 version and PHP intl extension not installed and activated, so:

  1. Check the PHP version which your Roundcube run on it, to know it edit index.php which located in Roundcube path, and add this line on header of file:

echo phpinfo();

Then save file, and open url of Roundcube in browser, you will see all information about version of PHP which used by Roundcube Including php.ini path, (do not forget delete line after that).

2- Enable PHP intl Extension, the exact steps for that depends on your PHP version, many questions on Stackoverflow explain how to do that, like: how can I enable PHP Extension intl?

Solution 2:

I also performed the upgrade using the complete version from the official source and I found the following error in my journal:

Oct 20 21:39:21 [hostname] roundcube[1258]: PHP Fatal error:  Uncaught Error: Class 'Spoofchecker' not found in /var/www/webmail/program/lib/Roundcube/rcube_spoofchecker.php:50
                                        Stack trace:
                                        #0 /var/www/webmail/program/actions/mail/index.php(1400): rcube_spoofchecker::check('gmail.com')
                                        #1 /var/www/webmail/program/actions/mail/index.php(523): rcmail_action_mail_index::address_string('[removed]...', 3, false, NULL, 'utf-8')
                                        #2 /var/www/webmail/program/actions/mail/list.php(123): rcmail_action_mail_index::js_message_list(Array, false, Array)
                                        #3 /var/www/webmail/program/include/rcmail.php(275): rcmail_action_mail_list->run(Array)
                                        #4 /var/www/webmail/index.php(283): rcmail->action_handler()
                                        #5 {main}
                                          thrown in /var/www/webmail/program/lib/Roundcube/rcube_spoofchecker.php on line 50

The relevant part is:

Class 'Spoofchecker' not found

This closed issue report Uncaught Error: Class 'Spoofchecker' not found #8127 suggested that the package php-intl is now a new requirement. This forum post gives more details:

According to https://bugs.php.net/bug.php?id=63790 the Spoofchecker is only available when PHP intl extension is built with ICU >= 4.2. So, I suspect your build does not have it, but it is required.

So it depends on your system, if php-intl needs to be installed. On newer systems, it is not necessary.

Installing php-intl depending on your system: Fedora/CentOS/RedHat/etc.:

dnf install php-intl

Debian/Ubuntu:

apt install php-intl

Don't forget to restart your webserver.