Roundcube error after update 1.10.1

Good morning, after the update, now when I open Roundcube I get this message: Please configure your HTTP server to point to the /public_html directory (with fallback to /public_html/index.php). What should I do?

Good morning,

for i in $(v-list-users plain | cut -f1); do echo "Rebuilding mail domains for user $i"; v-rebuild-mail-domains "$i" yes; done
systemctl restart nginx apache2

There is an open topic for this issue:

my solution:

nginx and Apache vhosts were already correctly pointing to /var/lib/roundcube/public_html, so that wasn’t the issue.

Checking Apache’s error log directly (tail -f /var/log/apache2/error.log) showed the real error:

PHP Fatal error:  Uncaught Error: Call to undefined function array_last() in /var/lib/roundcube/program/include/rcmail_output_html.php:319

Root cause:
Roundcube 1.7 requires symfony/polyfill-php85 (provides array_last()), but the automated update process only updated composer.json, not vendor/composer install/update never actually ran (or failed silently), so the vendor directory was out of sync with the new composer.json/composer.lock requirements.

Fix:

  1. Get a fresh Composer 2.x binary (an old bundled composer.phar, e.g. from the carddav plugin, is Composer 1.x and can’t resolve the new lock file):

bash

curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
php /tmp/composer-setup.php --install-dir=/tmp --filename=composer.phar
  1. Composer needs a writable HOME for hestiamail (often /home/hestiamail doesn’t exist / isn’t writable):

bash

mkdir -p /tmp/composer-home
chown hestiamail:hestiamail /tmp/composer-home
  1. The shipped composer.json required phpunit/phpunit ^4.8.36 || ^5.7.21, which is blocked by a security advisory (PKSA-z3gr-8qht-p93v). It’s dev-only (not installed in production with --no-dev), so bump it:

bash

sudo -u hestiamail HOME=/tmp/composer-home php /tmp/composer.phar require --dev "phpunit/phpunit:^9" --no-update --working-dir=/var/lib/roundcube
  1. Run the actual update (this rebuilds composer.lock and pulls the missing packages, including symfony/polyfill-php85):

bash

sudo -u hestiamail HOME=/tmp/composer-home php /tmp/composer.phar update --no-dev --optimize-autoloader --working-dir=/var/lib/roundcube
  1. Restart PHP/Apache if needed. Webmail loads correctly after this.

    for i in $(v-list-users plain | cut -f1); do echo “Rebuilding mail domains for user $i”; v-rebuild-mail-domains “$i” yes; done
    systemctl restart nginx apache2

Note: This may need to be repeated on every install where Hestia’s Roundcube 1.7 update didn’t run composer install/update as part of the upgrade script — worth checking if this can be added to Hestia’s own upgrade routine.

The command used by v-add-sys-roundcube should install that vendor package:

"$PHP_CLI" "$ENABLE_PHP_FUNCTIONS" "$COMPOSER_ROOT_USER_BIN" --working-dir="$RC_INSTALL_DIR" update --no-dev --no-interaction --optimize-autoloader

If that command failed, you should have a received a warning message asking to execute the command manually to check the exact error.