ispconfig php-fpm not working

Discussion in 'Installation/Configuration' started by Amin El-Zein, Aug 2, 2017.

  1. Amin El-Zein

    Amin El-Zein New Member

    Hello,
    I have installed ispconfig 3.1.6 on Ubuntu 17.4 I have php ver 5.6 and 7.0 and 7.1 and all fpm service status is ok
    also everything is work fine include fastcgi except the php fpm when I enable the sites give me error 503 I tried to check the log:
    apache log:
    [Tue Aug 01 20:33:59.998466 2017] [suexec:notice] [pid 21792] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
    [Tue Aug 01 20:34:00.014070 2017] [auth_digest:notice] [pid 21794] AH01757: generating secret for digest authentication ...
    [Tue Aug 01 20:34:00.014804 2017] [:notice] [pid 21796] FastCGI: process manager initialized (pid 21796)
    [Tue Aug 01 20:34:00.053069 2017] [mpm_prefork:notice] [pid 21794] AH00163: Apache/2.4.25 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.9 OpenSSL/1.0.2g configured -- resuming normal operations
    [Tue Aug 01 20:34:00.053089 2017] [core:notice] [pid 21794] AH00094: Command line: '/usr/sbin/apache2'

    the php7.0-fpm.log is empty
    the ispconfig/httpd/sitename:/error.log:
    [Tue Aug 01 20:32:43.821497 2017] [proxy:error] [pid 21368] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web3.sock (*) failed
    [Tue Aug 01 20:32:43.821569 2017] [proxy_fcgi:error] [pid 21368] [client client ip:23650] AH01079: failed to make connection to backend: httpd-UDS
    [Tue Aug 01 20:32:47.461478 2017] [proxy:error] [pid 21393] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web3.sock (*) failed
    [Tue Aug 01 20:32:47.461536 2017] [proxy_fcgi:error] [pid 21393] [client client ip:50306] AH01079: failed to make connection to backend: httpd-UDS
    [Tue Aug 01 20:36:13.761784 2017] [proxy:error] [pid 22152] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/lib/php5-fpm/web3.sock (*) failed
    [Tue Aug 01 20:36:13.761862 2017] [proxy_fcgi:error] [pid 22152] [client client ip:55728] AH01079: failed to make connection to backend: httpd-UDS

    ispconfig corn log:
    Tue Aug 1 20:38:01 EDT 2017 PHP Warning: Declaration of db::query($sQuery = '') should be compatible with mysqli::query($query, $resultmode = NULL) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 961
    Tue Aug 1 20:38:01 EDT 2017 PHP Stack trace:
    Tue Aug 1 20:38:01 EDT 2017 PHP 1. {main}() /usr/local/ispconfig/security/check.php:0
    Tue Aug 1 20:38:01 EDT 2017 PHP 2. require() /usr/local/ispconfig/security/check.php:32
    Tue Aug 1 20:38:01 EDT 2017 PHP 3. app->__construct() /usr/local/ispconfig/server/lib/app.inc.php:208
    Tue Aug 1 20:38:01 EDT 2017 PHP 4. app->load() /usr/local/ispconfig/server/lib/app.inc.php:45

    when I open apache2/site-enabled/mysitename/ I see that this:
    <IfModule mod_fastcgi.c>
    <Directory /var/www/clients/client0/web3/cgi-bin>
    Require all granted
    </Directory>
    <Directory /var/www/test.aminelzeintrading.com/web>
    <FilesMatch "\.php[345]?$">
    SetHandler php5-fcgi
    </FilesMatch>
    </Directory>
    <Directory /var/www/clients/client0/web3/web>
    <FilesMatch "\.php[345]?$">
    SetHandler php5-fcgi
    </FilesMatch>
    </Directory>
    Action php5-fcgi /php5-fcgi virtual
    Alias /php5-fcgi /var/www/clients/client0/web3/cgi-bin/php5-fcgi-*-80-test.aminelzeintrading.com
    FastCgiExternalServer /var/www/clients/client0/web3/cgi-bin/php5-fcgi-*-80-test.aminelzeintrading.com -idle-timeout 300 -socket /var/lib/php5-fpm/web3.sock -pass-header Authorization
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
    #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web3.sock|fcgi://localhost//var/www/clients/client0/web3/web/$1
    <Directory /var/www/clients/client0/web3/web>
    <FilesMatch "\.php[345]?$">
    SetHandler "proxy:unix:/var/lib/php5-fpm/web3.sock|fcgi://localhost"
    </FilesMatch>
    </Directory>
    </IfModule>

    but I enabled fpm version 7 !
    so where is the problem ! I spent two days on this and I didn't find any solution !
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The vhost config is fine, the socket paths always contain the number 5, no matter which PHP version you use. So this is no indication if the vhost is using PHP 5 or php 7.

    My guess is that you accidentally enabled PHP 7.1 as system PHP instead of keeping the standard php 7.0.

    run the command:

    php --version

    the result must be php 7.0. If it returns 7.1, then you enabled a wrong main php version which is incompatble with ISPConfig. You can use PHP 7.1 for websites in ISPConfig, but not for ISPConfig itself.
     
  3. Amin El-Zein

    Amin El-Zein New Member

    hello, it was 7.0.1 now it's
    PHP 7.0.21-1~ubuntu17.04.1+deb.sury.org+1 (cli) (built: Jul 6 2017 09:11:36) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.21-1~ubuntu17.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
    the errors are same.
     
  4. Amin El-Zein

    Amin El-Zein New Member

    please note that I am follow this article for installation:
    but when I excute this command a2enmod actions proxy_fcgi alias I get this error
    Module actions already enabled
    ERROR: Module proxy_fcgi alias does not exist!
    thanks.
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I create an issue in relation to Warning: Declaration of db::query($sQuery = '') should be compatible with mysqli::query($query, $resultmode = NULL) with a suggested fix in ISPC git.
     
  6. tyzenker

    tyzenker Member HowtoForge Supporter

    I just ran an update, and it automatically upgraded my PHP from 7.0 to 7.1.
    When I run /user/local/ispconfig/server/server.sh, I get the following warning:
    "Declaration of db::query($sQuery = '') should be compatible with mysqli::query($query, $resultmode = NULL) in /usr/local/ispconfig/server/lib/classes/db)mysql.inc.php on line 961".

    What can I do to fix this?

    Is ISPConfig still uncompatible with PHP 7.1 ?
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    The mysqli errors were fixed six months ago. I think what you need to do is to install all php7.1 files like you installed php7.0 as upgrading default php to 7.1 won't install all its required files.
     

Share This Page