I have IPSConfig3 running on a Debian 8.11 system. I updated ISPConfig a couple weeks ago and ran into some issues with some IMAP accounts I am hosting on the server, but I was able to fix that. However, when I try to log int to he control panel, I just get a blank white page and the following error in my Apache error.log file: Code: mod_fcgid: stderr: PHP Fatal error: Call to undefined function mysqli_init() in /usr/local/ispconfig/interface/lib/classes/db_mysql.inc.php on line 83 I have php5-mysql installed and have verified that the mysqli module is loaded by running: Code: php -r 'phpinfo();' | grep -i mysqli I have another ISPConifig3 server that I upgraded att he same time, and it is running fine, though it is on a Debian 10.1 server. I am not averse to doing a OS upgrade of the Debian 8 to 10, but there is no guarantee that will the issue, and I would rather fix it without going throught he upgrade if possible, since I plan on retiring this server soon. Any insight or suggestions appreciated. Thank!
root@l-host01:~# php --version PHP 5.6.40-0+deb8u12 (cli) (built: Jun 28 2020 09:37:30) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with XCache v3.2.0, Copyright (c) 2005-2014, by mOo with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo
What about '/usr/bin/php-cgi -v' ? And what is in /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter?
Code: root@l-host01:~# /usr/bin/php-cgi -v PHP 5.6.40-0+deb8u12 (cgi-fcgi) (built: Jun 28 2020 09:31:03) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with XCache v3.2.0, Copyright (c) 2005-2014, by mOo with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies with XCache Optimizer v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Coverager v3.2.0, Copyright (c) 2005-2014, by mOo in /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter? I have: Code: #!/bin/sh PHPRC=/etc/php5/cgi/ export PHPRC export PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_CHILDREN=1 exec /usr/bin/php-cgi \ -d disable_classes= \ -d disable_functions= \ -d magic_quotes_gpc=off \ -d open_basedir= \ -d session.save_path=/usr/local/ispconfig/interface/temp
Here is what I get: Code: root@phrase:~# /usr/bin/php-cgi -r 'phpinfo();' | grep -i mysqli Error in argument 1, char 2: option not found r If I run it without the '-r', it just returns me to the next line. If I run the command on my other ISPConfig3 server, which isn't having this problem, the same thing happens. I did run this command earlier yesterday when i was initially doing some troubleshooting: /usr/bin/php -r 'phpinfo();' | grep -i mysqli and this was the result: Code: root@l-host01:~# /usr/bin/php -r 'phpinfo();' | grep -i mysqli /etc/php5/cli/conf.d/20-mysqli.ini, mysqli MysqlI Support => enabled MYSQLI_SOCKET => /var/run/mysqld/mysqld.sock mysqli.allow_local_infile => On => On mysqli.allow_persistent => On => On mysqli.default_host => no value => no value mysqli.default_port => 3306 => 3306 mysqli.default_pw => no value => no value mysqli.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock mysqli.default_user => no value => no value mysqli.max_links => Unlimited => Unlimited mysqli.max_persistent => Unlimited => Unlimited mysqli.reconnect => Off => Off mysqli.rollback_on_cached_plink => Off => Off
OK, I ran that. Here is the result: Code: root@l-host01:~# /usr/bin/php-cgi -i | grep -i mysqli /etc/php5/cgi/conf.d/20-mysqli.ini, <h2><a name="module_mysqli">mysqli</a></h2> <tr class="h"><th>MysqlI Support</th><th>enabled</th></tr> <tr><td class="e">MYSQLI_SOCKET </td><td class="v">/var/run/mysqld/mysqld.sock </td></tr> <tr><td class="e">mysqli.allow_local_infile</td><td class="v">On</td><td class="v">On</td></tr> <tr><td class="e">mysqli.allow_persistent</td><td class="v">On</td><td class="v">On</td></tr> <tr><td class="e">mysqli.default_host</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr> <tr><td class="e">mysqli.default_port</td><td class="v">3306</td><td class="v">3306</td></tr> <tr><td class="e">mysqli.default_pw</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr> <tr><td class="e">mysqli.default_socket</td><td class="v">/var/run/mysqld/mysqld.sock</td><td class="v">/var/run/mysqld/mysqld.sock</td></tr> <tr><td class="e">mysqli.default_user</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr> <tr><td class="e">mysqli.max_links</td><td class="v">Unlimited</td><td class="v">Unlimited</td></tr> <tr><td class="e">mysqli.max_persistent</td><td class="v">Unlimited</td><td class="v">Unlimited</td></tr> <tr><td class="e">mysqli.reconnect</td><td class="v">Off</td><td class="v">Off</td></tr> <tr><td class="e">mysqli.rollback_on_cached_plink</td><td class="v">Off</td><td class="v">Off</td></tr> <tr><td class="e">MySQLi </td><td class="v">Zak Greant, Georg Richter, Andrey Hristov, Ulf Wendel </td></tr> It looks like it is loaded?
Agreed. Maybe check file permissions on the php mysql module (eg. maybe root can read it, but the user php-cgi runs as cannot)? Or simply reinstall some packages, eg. something like Code: apt-get install --reinstall $(dpkg --list | grep php5 | grep ^i | awk '{print $2}') That's just guessing; the next step for specific troubleshooting I'd take is changing your .php-fcgi-starter to run php-cgi under strace and write output to a file. @till may have some other ideas?
Not really sure how or why, but this is now fixed. I decided to try an upgrade of the Debian 8 -> Debian 9, and after I booted in to it, I could load the ISPConfig login page, but the mail services on it seemed to be broken (I couldn't connect to the IMAP service on it). Fortunately, the server is a VM and I had taken a snapshot before I did the upgrade, so I was able to revert back. After I booted back into the "old" system, the ISPConfig login page was still able to load and I could of course login, etc. Thanks for your help and suggestions, however!
After a dist upgrade, you must install the missing packages by going through the steps of the perfect server guide that matched the new OS version and finally, run an ISPConfig update with reconfigure services = yes.