HOWTO Install PHP 7.1, 7.2 and 5.6 as PHP-FPM & FastCGI for ISPConfig 3 on Debian 9

Discussion in 'Installation/Configuration' started by tanaka141, Nov 22, 2019.

  1. tanaka141

    tanaka141 New Member

    Hi all,
    I wrote this thread because i have a big problem at this moment. My ISPConfig have a job queue of 63 tasks to do, but it is freezed for 3 days ATM.

    I used the HOWTO : (https://www.howtoforge.com/tutorial/how-to-install-php-5.6-and-7.1-on-debian-9-stretch/) and followed all tasks to have PHP 7.3 available for 2 sites i had in my own (not professionnal sites).

    Theses errors are showed at the begin of the log when i start the command :
    /usr/local/ispconfig/server/server.sh
    I have also stopped ./server in the crontab.

    The log is :
    22.11.2019-12:01 - WARNING - There is already a lockfile set, but no process running with this pid (17678). Continuing.


    PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:523
    Stack trace:
    #0 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(183): db->escape('%:/opt/php-7.2/...')
    #1 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(301): db->_build_query_string('SELECT * FROM w...', '%:/opt/php-7.2/...')
    #2 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(340): db->_query('SELECT * FROM w...', '%:/opt/php-7.2/...')
    #3 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(389): db->query('SELECT * FROM w...', '%:/opt/php-7.2/...')
    #4 /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php(194): db->queryAllRecords('SELECT * FROM w...', '%:/opt/php-7.2/...')
    #5 /usr/local/ispconfig/server/lib/classes/plugins.inc.php(156): apache2_plugin->php_ini_changed('php_ini_changed', Array)
    #6 /usr/local/ispconfig/server/plugins-available/webserver_plugin.inc.php(154): plugins->raiseAction('php_ini_changed', Array)
    #7 /usr/local/isp in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 523

    I think there is something in mb_detect_encoding(), but i can't find any solutions.

    I have done also the "htf_report.txt", but i think this is only usefull to correct the errors for next :
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 9.11 (stretch)

    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.1.15p2


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 7.2.24-1+0~20191026.31+debian9~1.gbpbbacde

    ##### PORT CHECK #####


    ##### MAIL SERVER CHECK #####


    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Apache 2 (PID 989)
    [INFO] I found the following mail server(s):
    Postfix (PID 1091)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 481)
    [INFO] I found the following imap server(s):
    Dovecot (PID 481)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 1214)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [anywhere]:21 (1214/pure-ftpd)
    ***.***.***.***:53 (416/named)
    [localhost]:53 (416/named)
    [anywhere]:22 (504/sshd)
    [anywhere]:25 (1091/master)
    [localhost]:953 (416/named)
    [anywhere]:993 (481/dovecot)
    [anywhere]:995 (481/dovecot)
    [localhost]:8998 (415/php-fpm:)
    [localhost]:10023 (680/postgrey)
    [localhost]:10024 (1256/amavisd-new)
    [localhost]:10025 (1091/master)
    [localhost]:10026 (1256/amavisd-new)
    [localhost]:10027 (1091/master)
    [anywhere]:587 (1091/master)
    [localhost]:11211 (424/memcached)
    [anywhere]:110 (481/dovecot)
    [anywhere]:143 (481/dovecot)
    [anywhere]:465 (1091/master)
    *:*:*:*::*:21 (1214/pure-ftpd)
    *:*:*:*::*:53 (416/named)
    *:*:*:*::*:22 (504/sshd)
    *:*:*:*::*:25 (1091/master)
    *:*:*:*::*:953 (416/named)
    *:*:*:*::*:443 (989/apache2)
    *:*:*:*::*:993 (481/dovecot)
    *:*:*:*::*:995 (481/dovecot)
    *:*:*:*::*:10023 (680/postgrey)
    *:*:*:*::*:10024 (1256/amavisd-new)
    *:*:*:*::*:10026 (1256/amavisd-new)
    *:*:*:*::*:3306 (626/mysqld)
    *:*:*:*::*:587 (1091/master)
    [localhost]10 (481/dovecot)
    [localhost]43 (481/dovecot)
    *:*:*:*::*:80 (989/apache2)
    *:*:*:*::*:8080 (989/apache2)
    *:*:*:*::*:465 (1091/master)
    *:*:*:*::*:8081 (989/apache2)




    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    f2b-postfix-sasl tcp -- [anywhere]/0 [anywhere]/0 multiport dports 25
    f2b-dovecot tcp -- [anywhere]/0 [anywhere]/0 multiport dports 110,995,143,993,587,465,4190
    f2b-pure-ftpd tcp -- [anywhere]/0 [anywhere]/0 multiport dports 21
    f2b-sshd tcp -- [anywhere]/0 [anywhere]/0 multiport dports 22

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain f2b-dovecot (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-postfix-sasl (1 references)
    target prot opt source destination
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-pure-ftpd (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain f2b-sshd (1 references)
    target prot opt source destination
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    REJECT all -- ***.***.***.*** [anywhere]/0 reject-with icmp-port-unreachable
    RETURN all -- [anywhere]/0 [anywhere]/0
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you accidentially replaced the main PHP version of your operating system with an additional PHP version that you compiled in /opt/ folder and thats the reasonfor your problem. Please run the command:

    which php

    and post the result.
     
  3. tanaka141

    tanaka141 New Member

    Arghhh !
    I did something but only installing by the apt-get system, with command
    apt install php7.2 php7.2-common php7.2-cli php7.2-mysql php7.2-xml php7.2-curl
    then i think i must remove it, and use php7.0....................................

    /usr/bin/php

    Till
    Good job for all you made in ISPConfig
     
  4. tanaka141

    tanaka141 New Member

    the result with : php -v

    is :

    PHP 7.2.24-1+0~20191026.31+debian9~1.gbpbbacde (cli) (built: Oct 26 2019 14:18:28) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.24-1+0~20191026.31+debian9~1.gbpbbacde, Copyright (c) 1999-2018, by Zend Technologies
     
  5. tanaka141

    tanaka141 New Member

    then, when i move backward to the PHP7.0 the server
    All return to the normal status, grrrrr

    TILL,
    TY for all you do here

    I am under the ground (en fran├žais, je suis une grosse merde)
     
  6. ahrasis

    ahrasis Well-Known Member

  7. tanaka141

    tanaka141 New Member

    TY,
    I had just removed the PHP7.2, and the system turn with PHP7.0

    All things returning normal

    This thread can be closed, if this is possible
     
  8. ahrasis

    ahrasis Well-Known Member

Share This Page