Topic: Webmail broken after PHP upgrade

- iRedMail version (check /etc/iredmail-release): 1.6.7
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: AlmaLinux 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.

I can no longer get to my mailboxes via webmail. I upgraded my server from 1.6.2 to 1.6.7 today following all steps listed on the website. Along the way, I upgraded PHP and I think that broke something. First got this error:

2024/01/28 16:42:16 [error] 1851#0: *22 connect() failed (111: Connection refused) while connecting to upstream, client:, server: _, request: "GET /status?full&json HTTP/1.1", upstream: "fastcgi://", host: ""

Which got solved by replacing "listen = /run/php-fpm/www.sock" by "listen =" in /etc/php-fpm.d/www.conf.

I now get the following error:

2024/01/28 18:55:24 [error] 1850#0: *15 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client:, server: _, request: "GET /status?full&json HTTP/1.1", upstream: "fastcgi://", host: "

Any hints what to check/do?


Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by xof 2024-02-01 00:18:06)

Re: Webmail broken after PHP upgrade

This is what I am seeing in the php-fpm www-error.log:

[31-Jan-2024 15:45:21 UTC] PHP Warning:  SQLSTATE[HY000] [1045] Access denied for user 'roundcube'@'localhost' (using password: NO) in /opt/www/roundcubemail-1.5.3/program/lib/Roundcube/rcube.php on line 1503

Any idea why the warning says that a password is not used even if the config.inc.php has one configured?

$config['db_dsnw'] = 'mysqli://roundcube:xxxxxxx@';


Re: Webmail broken after PHP upgrade

I also noticed the error from above is always preceded by

[05-Feb-2024 18:45:05 UTC] PHP Warning:  file_put_contents(/opt/www/roundcubemail-1.5.3/logs/errors.log): Failed to open stream: Permission denied in /opt/www/roundcubemail-1.5.3/program/lib/Roundcube/rcube.php on line 1380

which may give away another clue...


Re: Webmail broken after PHP upgrade

Turns out /etc/php-fpm.d/www.conf was re-generated after upgraded RPM packages, the working config file was saved as /etc/php-fpm.d/www.conf.rpmsave, restore it to "www.conf" and restart "php-fpm" service fixes the issue.