Quasi blank page on fresh install Debian with multiple PHP
short description
After installation on a brand new server with multiple PHP version (including PHP8.0) the panel page are almost blank
correct behaviour
Regular page
environment
Server OS: Debian 10 Server OS version: buster ISPConfig version: 3.2.2 Webserver: Apache 2.4 + php-fcgid7.2
The apache log displays this error line: [Thu Feb 18 01:25:11.056656 2021] [fcgid:warn] [pid 10006:tid 140460665042688] [client **********:46276] mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/classes/tpl.inc.php(1369) : eval()'d code on line 116, referer: https://**************:8080/index.php
The underlying error is an exception related to Countable expect array value bool given during the eval line 116 of evaluation of /usr/local/ispconfig/interface/web/themes/default/templates/main.tpl.htm
The error occurs has the system try using PHP8.0 to run the code phpinfo() exhibit the code is run thru PHP8 despite the apache settings request PHP7.2
workaround
Ensure you use the proper default PHP engine for ISPConfig. To do so update your alternatives
update-alternatives --set php /usr/bin/php7.2
update-alternatives --set php-cgi /usr/bin/php-cgi7.2
update-alternatives --set php-cgi-bin /usr/lib/cgi-bin/php7.2
update-alternatives --set php-fpm.sock /run/php/php7.2-fpm.sock
service apache2 restart
log entries
mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/classes/tpl.inc.php(1369) : eval()'d