Blank Page when using php 5.6, 7.1, 7.2, 7.3

Discussion in 'HOWTO-Related Questions' started by scorpious, Nov 20, 2018.

  1. scorpious

    scorpious Member

    Tutorial: How to install PHP 7.x as PHP-FPM & FastCGI for ISPConfig 3.1 with apt on Debian 8 and 9

    Debian version 9.6 64bit

    Tested with a secure login system
    Php version 7.0 working ok, can login and register

    I get a blank page when changing to Php Version 5.6, 7.1, 7.2, 7.3

    Error log
    [fcgid:warn] [pid 13210] [client xx.xx.xx.xxx:49881] mod_fcgid: stderr: PHP Fatal error: Class 'mysqli' not found in /var/www/clients/client1/web1/web/includes/db_connect.php on line 22
    [fcgid:warn] [pid 13486] [client xx.xx.xx.xxx:49921] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/clients/client1/web1/web/includes/db_connect.php:22
    [fcgid:warn] [pid 13486] [client xx.xx.xx.xxx:49921] mod_fcgid: stderr: Stack trace:
    [fcgid:warn] [pid 13486] [client xx.xx.xx.xxx:49921] mod_fcgid: stderr: #0 /var/www/clients/client1/web1/web/index.php(18): include_once()
    [fcgid:warn] [pid 13486] [client xx.xx.xx.xxx:49921] mod_fcgid: stderr: #1 {main}
    [fcgid:warn] [pid 13486] [client xx.xx.xx.xxx:49921] mod_fcgid: stderr: thrown in /var/www/clients/client1/web1/web/includes/db_connect.php on line 22
    [fcgid:warn] [pid 13992] [client xx.xx.xx.xxx:49953] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/clients/client1/web1/web/includes/db_connect.php:22
    [fcgid:warn] [pid 13992] [client xx.xx.xx.xxx:49953] mod_fcgid: stderr: Stack trace:
    [fcgid:warn] [pid 13992] [client xx.xx.xx.xxx:49953] mod_fcgid: stderr: #0 /var/www/clients/client1/web1/web/index.php(18): include_once()
    [fcgid:warn] [pid 13992] [client xx.xx.xx.xxx:49953] mod_fcgid: stderr: #1 {main}
    [fcgid:warn] [pid 13992] [client xx.xx.xx.xxx:49953] mod_fcgid: stderr: thrown in /var/www/clients/client1/web1/web/includes/db_connect.php on line 22
    [fcgid:warn] [pid 14156] [client xx.xx.xx.xxx:49978] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/clients/client1/web1/web/includes/db_connect.php:22
    [fcgid:warn] [pid 14156] [client xx.xx.xx.xxx:49978] mod_fcgid: stderr: Stack trace:
    [fcgid:warn] [pid 14156] [client xx.xx.xx.xxx:49978] mod_fcgid: stderr: #0 /var/www/clients/client1/web1/web/index.php(18): include_once()
    [fcgid:warn] [pid 14156] [client xx.xx.xx.xxx:49978] mod_fcgid: stderr: #1 {main}
    [fcgid:warn] [pid 14156] [client xx.xx.xx.xxx:49978] mod_fcgid: stderr: thrown in /var/www/clients/client1/web1/web/includes/db_connect.php on line 22

    [email protected]:/home/server# sudo phpenmod mysqli
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.3/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.3/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.3/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.2/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.2/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.2/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.1/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.1/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/7.1/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/5.6/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/5.6/mods-available
    WARNING: Module mysqli ini file doesn't exist under /etc/php/5.6/mods-available

    When I view mods-available, this is what I see
    [email protected]:/etc/php/5.6/mods-available# ls
    apcu.ini exif.ini gettext.ini imagick.ini memcache.ini pdo.ini readline.ini sysvmsg.ini tokenizer.ini
    calendar.ini fileinfo.ini iconv.ini json.ini msgpack.ini phar.ini shmop.ini sysvsem.ini
    ctype.ini ftp.ini igbinary.ini memcached.ini opcache.ini posix.ini sockets.ini sysvshm.ini

    [email protected]:/etc/php/7.3/mods-available# ls
    apcu_bc.ini calendar.ini exif.ini ftp.ini iconv.ini imagick.ini msgpack.ini pdo.ini posix.ini shmop.ini sysvmsg.ini sysvshm.ini
    apcu.ini ctype.ini fileinfo.ini gettext.ini igbinary.ini json.ini opcache.ini phar.ini readline.ini sockets.ini sysvsem.ini tokenizer.ini

    [email protected]:/etc/php/7.0/mods-available# ls
    apcu_bc.ini curl.ini gd.ini imap.ini memcached.ini opcache.ini posix.ini simplexml.ini sysvsem.ini xml.ini zip.ini
    apcu.ini dom.ini gettext.ini intl.ini memcache.ini pdo.ini pspell.ini soap.ini sysvshm.ini xmlreader.ini
    bz2.ini exif.ini iconv.ini json.ini msgpack.ini pdo_mysql.ini readline.ini sockets.ini tidy.ini xmlrpc.ini
    calendar.ini fileinfo.ini igbinary.ini mbstring.ini mysqli.ini pdo_sqlite.ini recode.ini sqlite3.ini tokenizer.ini xmlwriter.ini
    ctype.ini ftp.ini imagick.ini mcrypt.ini mysqlnd.ini phar.ini shmop.ini sysvmsg.ini wddx.ini xsl.ini

    How can I install the missing ini files or what do I need to do to get the different Php versions working.
    Any Advise

    Cheers Scorp
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Read also the comments of that Tutorial, especially the one by Jesse Norell.
    You have not installed all the necessary PHP modules. Install the modules for each extra PHP version you use.
     
  3. scorpious

    scorpious Member

    Hi Taleman
    After reading the post by Jesse Norell this is what I have done, now I can select any php version and the sites are working.
    From the Commandline I did the following:
    apt install php5.6-cli php5.6-common php5.6-curl php5.6-gd php5.6-json php5.6-mbstring php5.6-mysql php5.6-xml
    apt install php7.1-cli php7.1-common php7.1-curl php7.1-gd php7.1-json php7.1-mbstring php7.1-mysql php7.1-xml
    apt install php7.2-cli php7.2-common php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-mysql php7.2-xml
    apt install php7.3-cli php7.3-common php7.3-curl php7.3-gd php7.3-json php7.3-mbstring php7.3-mysql php7.3-xml
    service php5.6-fpm restart
    service php7.1-fpm restart
    service php7.2-fpm restart
    service php7.3-fpm restart
    And then service apache2 restart
    Is there anything else I should do or I have misssed
    Cheers
    Scorp
     

Share This Page