mirror setup : server.php no action

Discussion in 'General' started by electronico_nc, Mar 5, 2019.

  1. Hello everyone,
    2 * Ubuntu 18.04.1, ISPConfig 3.1.13, MariaDB master/master replication
    (just little background : a user broke SQL replication by sending wrong SQL commands -> replication fixed)
    There has been an OS upograde from PHP 7.1.2 to 7.1.3.
    Now IspConfig Job Queue is not treated.
    Result (after disable cronjob and manual run of /usr/local/ispconfig/server/server.sh is :
    Code:
    05.03.2019-04:43 - WARNING - There is already a lockfile set, but no process running with this pid (9749). Continuing.
    PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:78
    Stack trace:
    #0 /usr/local/ispconfig/server/lib/app.inc.php(46): db->__construct()
    #1 /usr/local/ispconfig/server/lib/app.inc.php(208): app->__construct()
    #2 /usr/local/ispconfig/server/server.php(51): require('/usr/local/ispc...')
    #3 {main}
      thrown in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_init() in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php:78
    Stack trace:
    #0 /usr/local/ispconfig/server/lib/app.inc.php(46): db->__construct()
    #1 /usr/local/ispconfig/server/lib/app.inc.php(208): app->__construct()
    #2 /usr/local/ispconfig/security/check.php(32): require('/usr/local/ispc...')
    #3 {main}
      thrown in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    All websites are running as before.
    I don't know if this can be relative but : while setting up the mirror cluster, I renamed default PHP version from 'default' to '7.2'
    Additionnal 5.6 (ondrej) has been installed too.
    Thanks in advance for your thoughts !
    PS : I wanted to upgrade to 3.1.13p1, I'm not sure it's a good thought ...
    Code:
    mysql --version
    mysql  Ver 15.1 Distrib 10.1.38-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    Code:
    php --version
    PHP 7.3.2-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb  8 2019 15:43:57) ( NTS )
    Code:
    ls -lha /etc/alternatives/ph*
    lrwxrwxrwx 1 root root 16 mars   5 08:25 /etc/alternatives/phar -> /usr/bin/phar7.3
    lrwxrwxrwx 1 root root 32 mars   5 08:25 /etc/alternatives/phar.1.gz -> /usr/share/man/man1/phar7.3.1.gz
    lrwxrwxrwx 1 root root 21 mars   5 08:25 /etc/alternatives/phar.phar -> /usr/bin/phar.phar7.3
    lrwxrwxrwx 1 root root 37 mars   5 08:25 /etc/alternatives/phar.phar.1.gz -> /usr/share/man/man1/phar.phar7.3.1.gz
    lrwxrwxrwx 1 root root 15 mars   5 08:25 /etc/alternatives/php -> /usr/bin/php7.3
    lrwxrwxrwx 1 root root 31 mars   5 08:25 /etc/alternatives/php.1.gz -> /usr/share/man/man1/php7.3.1.gz
    lrwxrwxrwx 1 root root 19 sept.  5 16:38 /etc/alternatives/php-cgi -> /usr/bin/php-cgi7.2
    lrwxrwxrwx 1 root root 35 sept.  5 16:38 /etc/alternatives/php-cgi.1.gz -> /usr/share/man/man1/php-cgi7.2.1.gz
    lrwxrwxrwx 1 root root 23 sept.  5 16:38 /etc/alternatives/php-cgi-bin -> /usr/lib/cgi-bin/php7.2
     
    Last edited: Mar 5, 2019
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you installed PHP 7.3 without MySQL support as system PHP. The system php version should not be changed, you may install additional PHP versions to be used in the websites though. To fix that, set the system PHP version back to the one that belongs to Ubuntu 18.04 (which is PHP 7.2) using update-alternatives command.

    update-alternatives --config php
    update-alternatives --config php-cgi

    and you probably want to install mysql support in PHP 7.3 too in case you want to use PHP 7.3 in websites, as almost all cms systems require mysql support in php.
     
    electronico_nc likes this.
  3. Thanks Till,
    This solved the server.php problem.
    But, as I installed these servers directly with Ubuntu 18.04.1 defaut PHP was well 7.2.
    So the apt upgrade as only upgraded php and not php-cgi, and not mysql support for php7.3.
    That seems a bit strange.
    here is /var/log/apt/history.log:

    Start-Date: 2019-03-05 08:23:36
    Commandline: apt upgrade
    Install: php7.3-xml:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-readline:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-json:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-common:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-opcache:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-bz2:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-cli:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), php7.3-soap:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic), libpcre2-8-0:amd64 (10.31-3+ubuntu18.04.1+deb.sury.org+1, automatic), libapache2-mod-php7.3:amd64 (7.3.2-3+ubuntu18.04.1+deb.sury.org+1, automatic)
    Upgrade: landscape-common:amd64 (18.01-0ubuntu3.2, 18.01-0ubuntu3.3), php-xml:amd64 (2:7.2+69+ubuntu18.04.1+deb.sury.org+1, 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3), php5.6-xmlrpc:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), libapache2-mod-php:amd64 (2:7.2+69+ubuntu18.04.1+deb.sury.org+1, 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3), php-common:amd64 (2:69+ubuntu18.04.1+deb.sury.org+1, 2:69+ubuntu18.04.1+deb.sury.org+2+php7.3), php5.6:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-xml:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-xsl:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-pspell:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-recode:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-tidy:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), initramfs-tools-bin:amd64 (0.130ubuntu3.6, 0.130ubuntu3.7), php5.6-json:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-readline:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-curl:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-common:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-imap:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-intl:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-gd:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php-bz2:amd64 (2:7.2+69+ubuntu18.04.1+deb.sury.org+1, 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3), php5.6-mbstring:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-mysql:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-mcrypt:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-snmp:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php-soap:amd64 (2:7.2+69+ubuntu18.04.1+deb.sury.org+1, 2:7.3+69+ubuntu18.04.1+deb.sury.org+2+php7.3), php5.6-cgi:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-cli:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-fpm:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-sqlite3:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), libapache2-mod-php5.6:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), php5.6-opcache:amd64 (5.6.40-1+ubuntu18.04.1+deb.sury.org+1, 5.6.40-1+ubuntu18.04.1+deb.sury.org+2+will+reach+end+of+life+in+april+2019), initramfs-tools-core:amd64 (0.130ubuntu3.6, 0.130ubuntu3.7), initramfs-tools:amd64 (0.130ubuntu3.6, 0.130ubuntu3.7)
    End-Date: 2019-03-05 08:26:32

    PHP has been installed through :

    apt-get -y install apache2 apache2-doc apache2-utils libapache2-mod-php php7.2 php7.2-common php7.2-gd php7.2-mysql php7.2-imap phpmyadmin php7.2-cli php7.2-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick libruby libapache2-mod-python php7.2-curl php7.2-intl php7.2-pspell php7.2-recode php7.2-sqlite3 php7.2-tidy php7.2-xmlrpc php7.2-xsl memcached php-memcache php-imagick php-gettext php7.2-zip php7.2-mbstring php-soap php7.2-soap
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You installed additional PHP packages from sury and the sury repository is the one where the PHP 7.3 is from, it's not from Ubuntu.
     
    electronico_nc likes this.
  5. Thanks again,
    I didn't notice the sury source at first read.
    I'll try to remove sury php 7.2 tomorrow and re-install Ubuntu package.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no need to remove the sury packages, just ensure that you select php 7.2 as default php with the update-alternatives command and that the PHP 7.2 contains mysql support.
     

Share This Page