• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Webmail (horde or roundcube) shows error 500

NetVicious

New Pleskian
Hi!

I started with the server on Ubuntu 14.04 LTS with Plesk 11. I upgraded Plesk to 12 and later to Onyx.

After the Plesk upgrades I upgraded the Ubuntu to 16.04 LTS.

All works perfectly but I'm stuck with the webmail.

I tried with Horde and RoundCube, I read a lot of Plesk KB issues but I don't find the solution.

The problem seems to be related with PHP handlers, but as you can see I can't create a new handler.

I have installed the ubuntu PHP 7.0 and the additional php plesk packages 5.6, 7.0 and 7.1

==> apache2/error.log <==
[Fri Feb 10 12:31:25.733873 2017] [fcgid:warn] [pid 29347:tid 140159907505920] (104)Connection reset by peer: [client X.X.X.X:58792] mod_fcgid: error reading data from FastCGI server
[Fri Feb 10 12:31:25.733969 2017] [core:error] [pid 29347:tid 140159907505920] [client X.X.X.X:58792] End of script output before headers: index.php

X:~# /usr/local/psa/admin/sbin/php_handlers_control --list
Code:
                id:  display name:  version:    type:                         cgi-bin:                    cli-bin:                        php.ini:  system:         service:                           pool.d:
    plesk-php70-fpm         7.0.15    7.0.15      fpm  /opt/plesk/php/7.0/sbin/php-fpm  /opt/plesk/php/7.0/bin/php  /opt/plesk/php/7.0/etc/php.ini        *  plesk-php70-fpm  /opt/plesk/php/7.0/etc/php-fpm.d
    plesk-php56-cgi         5.6.30    5.6.30      cgi   /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini        *                                                 
                fpm         7.0.13    7.0.13      fpm             /usr/sbin/php-fpm7.0                /usr/bin/php        /etc/php/7.0/fpm/php.ini        *       php7.0-fpm          /etc/php/7.0/fpm/pool.d/
plesk-php71-fastcgi          7.1.1     7.1.1  fastcgi   /opt/plesk/php/7.1/bin/php-cgi  /opt/plesk/php/7.1/bin/php  /opt/plesk/php/7.1/etc/php.ini        *                                                 
    plesk-php70-cgi         7.0.15    7.0.15      cgi   /opt/plesk/php/7.0/bin/php-cgi  /opt/plesk/php/7.0/bin/php  /opt/plesk/php/7.0/etc/php.ini        *                                                 
    plesk-php71-cgi          7.1.1     7.1.1      cgi   /opt/plesk/php/7.1/bin/php-cgi  /opt/plesk/php/7.1/bin/php  /opt/plesk/php/7.1/etc/php.ini        *                                                 
    plesk-php56-fpm         5.6.30    5.6.30      fpm  /opt/plesk/php/5.6/sbin/php-fpm  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini        *  plesk-php56-fpm  /opt/plesk/php/5.6/etc/php-fpm.d
    plesk-php71-fpm          7.1.1     7.1.1      fpm  /opt/plesk/php/7.1/sbin/php-fpm  /opt/plesk/php/7.1/bin/php  /opt/plesk/php/7.1/etc/php.ini        *  plesk-php71-fpm  /opt/plesk/php/7.1/etc/php-fpm.d
plesk-php70-fastcgi         7.0.15    7.0.15  fastcgi   /opt/plesk/php/7.0/bin/php-cgi  /opt/plesk/php/7.0/bin/php  /opt/plesk/php/7.0/etc/php.ini        *                                                 
plesk-php56-fastcgi         5.6.30    5.6.30  fastcgi   /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini        *


X:~# plesk db "select section,name from ServiceNodeEnvironment where section='phphandlers';"
Code:
+-------------+---------------------+
| section     | name                |
+-------------+---------------------+
| phphandlers | fpm                 |
| phphandlers | plesk-php56-cgi     |
| phphandlers | plesk-php56-fastcgi |
| phphandlers | plesk-php56-fpm     |
| phphandlers | plesk-php70-cgi     |
| phphandlers | plesk-php70-fastcgi |
| phphandlers | plesk-php70-fpm     |
| phphandlers | plesk-php71-cgi     |
| phphandlers | plesk-php71-fastcgi |
| phphandlers | plesk-php71-fpm     |
| phphandlers | synced              |
+-------------+---------------------+

X:~# /usr/local/psa/admin/sbin/php_handlers_control --reread
Error adding handler from /etc/psa/php_versions.d/php-cgi.conf: Handler with id = `cgi' already exists
Error adding handler from /etc/psa/php_versions.d/php-module.conf: Handler with id = `module' already exists
Error adding handler from /etc/psa/php_versions.d/php5-fpm.conf: Handler with id = `fpm' already exists
Error adding handler from /etc/psa/php_versions.d/php-fastcgi.conf: Handler with id = `fastcgi' already exists
[Warning] removing handler `' (module) as corresponding /usr/bin/php5-cgi doesn't exist
[Warning] removing handler `' (cgi) as corresponding /usr/bin/php5-cgi doesn't exist
[Warning] removing handler `' (fastcgi) as corresponding /usr/bin/php5-cgi doesn't exist

X:~# /usr/local/psa/bin/php_handler --add -displayname 7.0.13 -path /usr/bin/php-cgi -phpini /etc/php/7.0/cli/php.ini -clipath /usr/bin/php -type fastcgi -id fastcgi
The PHP handler "fastcgi" is not found.
 
Last edited:
Hello,

It seems you missed some entries regarding system php handler. Do you have package psa-php-configurator installed ?
 
Hello,

The fastcgi and cgi handlers should be registered automatically, when psa-php-configurator installed. Could you show the contents of file /etc/psa/php_versions.d/php-fastcgi.conf? The output should be:
Code:
~# cat /etc/psa/php_versions.d/php-fastcgi.conf
id=fastcgi
path=/usr/bin/php-cgi
clipath=/usr/bin/php
phpini=/etc/php/7.0/cgi/php.ini
displayname=$version
type=fastcgi

And what entry with id fastcgi in /etc/psa/php_versions.json ? Should be
Code:
{
        "id":"fastcgi",
        "path":"/usr/bin/php-cgi",
        "clipath":"/usr/bin/php",
        "phpini":"/etc/php/7.0/cgi/php.ini",
        "version":"7.0.13",
        "displayname":"%24version",
        "type":"fastcgi",
        "system":true
},
 
Last edited:
Hi mizar.
Here you have:
/etc/psa/php_versions.d/php-fastcgi.conf
Code:
id=fastcgi
path=/usr/bin/php-cgi
clipath=/usr/bin/php
phpini=/etc/php/7.0/cgi/php.ini
displayname=$version
type=fastcgi

As you can see I don't have fastcgi ID.

/etc/psa/php_versions.json
Code:
{"php":[
{
        "id":"plesk-php70-fpm",
        "path":"/opt/plesk/php/7.0/sbin/php-fpm",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.15",
        "displayname":"%24version",
        "type":"fpm",
        "system":true,
        "service":"plesk-php70-fpm",
        "poold":"/opt/plesk/php/7.0/etc/php-fpm.d"
},
{
        "id":"plesk-php56-cgi",
        "path":"/opt/plesk/php/5.6/bin/php-cgi",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.30",
        "displayname":"%24version",
        "type":"cgi",
        "system":true
},
{
        "id":"fpm",
        "path":"/usr/sbin/php-fpm7.0",
        "clipath":"/usr/bin/php",
        "phpini":"/etc/php/7.0/fpm/php.ini",
        "version":"7.0.13",
        "displayname":"%24version",
        "type":"fpm",
        "system":true,
        "service":"php7.0-fpm",
        "poold":"/etc/php/7.0/fpm/pool.d/"
},
{
        "id":"plesk-php71-fastcgi",
        "path":"/opt/plesk/php/7.1/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.1",
        "displayname":"%24version",
        "type":"fastcgi",
        "system":true
},
{
        "id":"plesk-php70-cgi",
        "path":"/opt/plesk/php/7.0/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.15",
        "displayname":"%24version",
        "type":"cgi",
        "system":true
},
{
        "id":"plesk-php71-cgi",
        "path":"/opt/plesk/php/7.1/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.1",
        "displayname":"%24version",
        "type":"cgi",
        "system":true
},
{
        "id":"plesk-php56-fpm",
        "path":"/opt/plesk/php/5.6/sbin/php-fpm",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.30",
        "displayname":"%24version",
        "type":"fpm",
        "system":true,
        "service":"plesk-php56-fpm",
        "poold":"/opt/plesk/php/5.6/etc/php-fpm.d"
},
{
        "id":"plesk-php71-fpm",
        "path":"/opt/plesk/php/7.1/sbin/php-fpm",
        "clipath":"/opt/plesk/php/7.1/bin/php",
        "phpini":"/opt/plesk/php/7.1/etc/php.ini",
        "version":"7.1.1",
        "displayname":"%24version",
        "type":"fpm",
        "system":true,
        "service":"plesk-php71-fpm",
        "poold":"/opt/plesk/php/7.1/etc/php-fpm.d"
},
{
        "id":"plesk-php70-fastcgi",
        "path":"/opt/plesk/php/7.0/bin/php-cgi",
        "clipath":"/opt/plesk/php/7.0/bin/php",
        "phpini":"/opt/plesk/php/7.0/etc/php.ini",
        "version":"7.0.15",
        "displayname":"%24version",
        "type":"fastcgi",
        "system":true
},
{
        "id":"plesk-php56-fastcgi",
        "path":"/opt/plesk/php/5.6/bin/php-cgi",
        "clipath":"/opt/plesk/php/5.6/bin/php",
        "phpini":"/opt/plesk/php/5.6/etc/php.ini",
        "version":"5.6.30",
        "displayname":"%24version",
        "type":"fastcgi",
        "system":true
}
]}
 
Hi Mizar,

Finally I fixed the problem using the drastic way.

Instead of uninstalling only the psa-php-configurator I tried uninstalling psa-php-configurator and all of it's dependencies.
apt-get remove --purge psa-php-configurator

Due to dependiencies it uninstalled these packages too: psa-horde psa-imp psa-ingo psa-kronolith psa-mnemo psa-passwd psa-php-configurator psa-turba

Downloaded the psa-php-configurator from here (you need the installer for your exact distribution version):
http://autoinstall.plesk.com/PSA_17.0.17/dist-deb-Ubuntu-16.04-x86_64/opt/php/

Installed another time:
Code:
root@X:~# dpkg -i psa-php-configurator_1.7.0-ubuntu16.04.build1700161026.19_amd64.deb
Selecting previously unselected package psa-php-configurator.
(Reading database ... 211363 files and directories currently installed.)
Preparing to unpack psa-php-configurator_1.7.0-ubuntu16.04.build1700161026.19_amd64.deb ...
Unpacking psa-php-configurator (1.7.0-ubuntu16.04.build1700161026.19) ...
Setting up psa-php-configurator (1.7.0-ubuntu16.04.build1700161026.19) ...
Module php7.0 already disabled
Failed to execute operation: No such file or directory
update-rc.d: error: initscript does not exist: /etc/init.d/php-fpm
Moving Zend extensions from php.ini to conf.d/zend_extensions_psa.ini and disabling custom ionCube if any... Removing php.ini backup files... done
Moving Zend extensions from php.ini to conf.d/zend_extensions_psa.ini and disabling custom ionCube if any... Removing php.ini backup files... done
Moving Zend extensions from php.ini to conf.d/zend_extensions_psa.ini and disabling custom ionCube if any... Removing php.ini backup files... done
Moving Zend extensions from php.ini to conf.d/zend_extensions_psa.ini and disabling custom ionCube if any... Removing php.ini backup files... done
Trying to register the ionCube loader... No ionCube loader found for php 7.0. skipping

And installed another time the previously uninstalled packages due to the dependencies of psa-php-configurator

During this reinstallation I saw some errors reported and logged to /var/log/plesk/install/plesk_17.0.17_installation.log

I see lots of warnings regarding the PHP version of horde (no problem for me, I will use roundcube ;-)
warning: horde/Horde_Cli requires PHP (version >= 5.3.0, version <= 6.0.0alpha1, excluded versions: 6.0.0alpha1), installed version is 7.0.13-0ubuntu0.16.04.1

Some errors related to not installed/activated modules for horde (no problem)
ERROR: could not chdir to /usr/share/psa-pear/pear/temp/horde_lz4

And other horde problems with non-enabled modules:

Fatal Error:
Calendar is not activated.
In /usr/share/psa-pear/pear/php/Horde/Registry.php on line 340

Fatal Error:
Notes is not activated.
In /usr/share/psa-pear/pear/php/Horde/Registry.php on line 340

Fatal Error:
Address Book is not activated.
In /usr/share/psa-pear/pear/php/Horde/Registry.php on line 340


Now all seems to work.
Thx for your time.
 
Last edited:
Back
Top