I setup my mail on hestiacp and followed the normal instructions. However, when I try to access the link webmail.mydomain.com, I receive an HTTP 500 error message.
I checked the Apache and PHP logs and found issues related to the pdo_mysql extension in PHP.
Apache Log:
PHP Warning: PHP Startup: Unable to load dynamic library ‘pdo_mysql.so’ (tried: /usr/lib/php/20230831/pdo_mysql.so (/usr/lib/php/20230831/pdo_mysql.so: undefined symbol: mysqlnd_get_client_info), /usr/lib/php/20230831/pdo_mysql.so.so (/usr/lib/php/20230831/pdo_mysql.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I don’t know if the webmail problem is related to that or something else. Every service is running, including exim4.
Environment:
Proxy Server: nginx
Web Server: apache2
PHP 8.2.21
Has anyone faced a similar issue and resolved it or can anyone provide guidance on how to fix this problem?
I fixed the http 500 error by uninstalling every php version I had, excecpt php8.2-fpm.
However, now when I access webmail.domain.com, I see the php file instead of the login access… So for some reason my server isn’t processing the file. Any help?
The main problem here is that you are not using mpm_event but mpm_prefork and I don’t know whether it is the result of installing/uninstalling php versions manually or you came from and old Hestia version but you have two options.
1.- Add php module to Apache.
2.- Disable mpm prefork and enable mpm_event (I’ve several posts here in the forum talking about how to fix it).
Now, when I access webmail.domain.com I get the following:
"Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request."
I checked apache errors and got the following:
[Tue Jul 23 11:23:14.125799 2024] [proxy:error] [pid 124188:tid 140238567487040] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (127.0.0.1:9000) failed
[Tue Jul 23 11:23:14.125855 2024] [proxy_fcgi:error] [pid 124188:tid 140238567487040] [client 168.182.239.27:0] AH01079: failed to make connection to backend: 127.0.0.1
[Tue Jul 23 11:28:27.359523 2024] [mpm_event:notice] [pid 124186:tid 140239231084416] AH00492: caught SIGWINCH, shutting down gracefully
[Tue Jul 23 11:28:27.460551 2024] [suexec:notice] [pid 126051:tid 140294292723584] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Jul 23 11:28:27.478664 2024] [core:notice] [pid 126052:tid 140294292723584] AH00094: Command line: ‘/usr/sbin/apache2’
That log doesn’t show any error, try to use the webmail and once you get the error, check again the apache error log, nginx error log and also the scpecific for your domain.
/var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 234; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/roundcube/logs/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1380; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1503’
dpkg -l | grep -i roundcube
ls -l /usr/share/roundcube
ii roundcube 1.5.0+dfsg.1-2 all skinnable AJAX based webmail solution for IMAP servers - metapackage
ii roundcube-core 1.5.0+dfsg.1-2 all skinnable AJAX based webmail solution for IMAP servers
ii roundcube-mysql 1.5.0+dfsg.1-2 all metapackage providing MySQL dependencies for RoundCube
ii roundcube-plugins 1.5.0+dfsg.1-2 all skinnable AJAX based webmail solution for IMAP servers - plugins
total 52
drwxr-xr-x 7 www-data www-data 4096 May 21 16:54 SQL
drwxr-xr-x 2 www-data www-data 4096 May 21 16:54 bin
-rw-r–r-- 1 www-data www-data 1054 Oct 23 2021 composer.json
-rw-r–r-- 1 www-data www-data 4004 Oct 23 2021 config.inc.php.sample
-rw-r–r-- 1 www-data www-data 11413 Oct 17 2021 index.php
drwxr-xr-x 36 www-data www-data 4096 May 21 16:54 plugins
drwxr-xr-x 8 www-data www-data 4096 May 21 16:54 program
drwxr-xr-x 5 www-data www-data 4096 May 21 16:54 skins
You must remove that roundcube and install it the Hestia’s way.
Execute all the commands as root:
sudo su -
Remove roundcube:
apt remove roundcube
Delete db, db user, one file in roundcube installation (Hestia script v-add-sys-roundcube will remove all later) and /usr/share/roundcube/:
mysql -uroot -e 'DROP DATABASE IF EXISTS roundcube'
mysql -uroot -e 'DROP USER 'roundcube'@'localhost''
rm /var/lib/roundcube/index.php
rm -rf /usr/share/roundcube