roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.89k stars 1.64k forks source link

PHP Error with Nextcloud through Hestia #8784

Closed Starcr0ss closed 1 year ago

Starcr0ss commented 1 year ago

Hello, I have been struggling to get the webmail part of my server to work. I do have a working Nextcloud server. But regarding the webmail/Roundcube part of the server, I keep getting the 500 error that says

Oops... something went wrong! An internal error has occurred. Your request cannot be processed at this time. For administrators: Please check the application and/or server error logs for more information.

Checking /var/log/roundcube/errors.log I see the following:

[15-Nov-2022 11:03:26 America/New_York] PHP Warning:  Uninitialized string offset 0 in /var/lib/roundcube/program/lib/Roundcube/rcube_utils.php on line 1308
[15-Nov-2022 11:12:09 America/New_York] PHP Warning:  Uninitialized string offset 0 in /var/lib/roundcube/program/lib/Roundcube/rcube_utils.php on line 1308

Looking at line 1308 on the "rcube_utils.php" file, I see the following block of code

            if ($arg[0] == '-') {
                $key = preg_replace('/^-+/', '', $arg);
                $sp  = strpos($arg, '=');

How do I fix this error?

My server uses the Oracle Free Tier services, ARM processors, Ubuntu Server 22.04 LTS, Roundcube 1.6.0, Hestia 1.6.11

alecpl commented 1 year ago

These are warnings, they do not cause a 500 error. There must be something else in the log. That line of code is not used when accessing Roundcube with a web browser, i.e. irrelevant.

Starcr0ss commented 1 year ago

There must be something else in the log.

In which log location? Because the 2 lines of warnings I showed are the only things in /var/log/roundcube/errors.log. Where else should I be looking?

alecpl commented 1 year ago

Delete errors.log file and try again. If there will be no error in this file, look in http server log.

Starcr0ss commented 1 year ago

Delete errors.log file and try again. If there will be no error in this file, look in http server log.

Hm... I see the following in /var/log/apache2/error.log [Tue Nov 15 11:10:39.381653 2022] [php:error] [pid 8162] [client 192.152.243.165:0] PHP Fatal error: Uncaught Error: Call to undefined function mb_internal_encoding() in /var/lib/roundcube/program/lib/Roundcube/bootstrap.php:86\nStack trace:\n#0 /var/lib/roundcube/program/include/iniset.php(78): require_once()\n#1 /var/lib/roundcube/index.php(40): require_once('...')\n#2 {main}\n thrown in /var/lib/roundcube/program/lib/Roundcube/bootstrap.php on line 86 This is repeated several times in the log and seems to be the most relevant to this issue.

alecpl commented 1 year ago

It means you have no mbstring extension for PHP installed.