Hi. I am using ISPConfig 3.2 and Ubuntu 18.04, and the task queue stopped right after including PHP 8.0 as an extra version of php-fpm and activating it on a site. I have reviewed the instructions at <I can't include a link, but they are instructions for debugging task queue issues that I found on this forum> and when running the script manually I get the following warnings and error: Code: PHP Warning: Undefined array key "admin_mail" in /usr/local/ispconfig/server/server.php on line 97 PHP Warning: Undefined array key "php_fpm_incron_reload" in /usr/local/ispconfig/server/plugins-available/z_php_fpm_incron_reload_plugin.inc.php on line 109 PHP Warning: Undefined array key "CA_path" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 269 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "csr" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1314 PHP Warning: Undefined array key "website_autoalias" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1428 PHP Warning: Undefined array key "vhost_proxy_protocol_enabled" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1815 PHP Warning: Undefined array key "vhost_proxy_protocol_enabled" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1839 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, bool given in /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344) : eval()'d code:77 Stack trace: #0 /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344): eval() #1 /usr/local/ispconfig/server/lib/classes/tpl.inc.php(788): tpl->_parse() #2 /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php(3473): tpl->grab() #3 /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php(2007): apache2_plugin->php_fpm_pool_update() #4 /usr/local/ispconfig/server/lib/classes/plugins.inc.php(120): apache2_plugin->update() #5 /usr/local/ispconfig/server/mods-available/web_module.inc.php(137): plugins->raiseEvent() #6 /usr/local/ispconfig/server/lib/classes/modules.inc.php(302): web_module->process() #7 /usr/local/ispconfig/server/lib/classes/modules.inc.php(235): modules->raiseTableHook() #8 /usr/local/ispconfig/server/server.php(180): modules->processDatalog() #9 {main} thrown in /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344) : eval()'d code on line 77 Any ideas what may be causing it and how to fix it? Thanks.
My guess is your default php was changed to php8.0 when you installed it. Do check and if confirmed, do revert your CLI to default php7.2 for Ubuntu 18.04. I did write some script with cron job to check and restore default php which you can use at: https://www.howtoforge.com/community/threads/monitor-os-default-php-and-restore-if-changed.83288/
You can do this manually aswell: Code: update-alternatives --config php update-alternatives --config php-cgi Select the default PHP version for your OS
Cool, selected php7.4 and after that I did sudo service apache2 restart and everything got running again
I get into a similar error after using php8.1 as the default php CLI. I've solved setting back php 7.4 (by the way, I'm using Debian Stable). I report it because in my undertanding is a bug or something to solve once Debian Testing go to Stable, and php 8.x become the default. Here you are my logs: /var/www/econau.org/web$ tail ../log/error.log [Wed Mar 22 09:41:38.193753 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: PDOException: SQLSTATE[HY000] [1044] Access denied for user 'c4econau'@'localhost' to database 'c4drupal' in /var/www/clients/client4/web5/web/vendor/symfony/dependency-injection/ContainerBuilder.php on line 1041 #0 /var/www/clients/client4/web5/web/web/core/modules/mysql/src/Driver/Database/mysql/Connection.php(165): PDO->__construct(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193781 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #1 /var/www/clients/client4/web5/web/web/core/lib/Drupal/Core/Database/Database.php(445): Drupal\\mysql\\Driver\\Database\\mysql\\Connection:pen(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193795 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #2 /var/www/clients/client4/web5/web/web/core/lib/Drupal/Core/Database/Database.php(188): Drupal\\Core\\Database\\Database:penConnection(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193799 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #3 /var/www/clients/client4/web5/web/vendor/symfony/dependency-injection/ContainerBuilder.php(1041): Drupal\\Core\\Database\\Database::getConnection(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193802 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #4 /var/www/clients/client4/web5/web/vendor/symfony/dependency-injection/ContainerBuilder.php(568): Symfony\\Component\\DependencyInjection\\ContainerBuilder->createService(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193806 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #5 /var/www/clients/client4/web5/web/vendor/symfony/dependency-injection/ContainerBuilder.php(513): Symfony\\Component\\DependencyInjection\\ContainerBuilder->doGet(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193809 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #6 /var/www/clients/client4/web5/web/web/core/lib/Drupal/Core/DrupalKernel.php(720): Symfony\\Component\\DependencyInjection\\ContainerBuilder->get(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193813 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #7 /var/www/clients/client4/web5/web/web/core/lib/Drupal/Core/Update/UpdateKernel.php(82): Drupal\\Core\\DrupalKernel->handleException(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193816 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #8 /var/www/clients/client4/web5/web/web/update.php(27): Drupal\\Core\\Update\\UpdateKernel->handle(), referer: https://www.econau.org/admin/modules [Wed Mar 22 09:41:38.193819 2023] [fcgid:warn] [pid 624366:tid 140718750123776] [client 213.195.124.141:45436] mod_fcgid: stderr: #9 {main}, referer: https://www.econau.org/admin/modules Després he esborrat l'usuari problemàtic i he recarregat la BBDD copia: /var/www/econau.org/web$ sudo /usr/local/ispconfig/server/server.sh 22.03.2023-10:01 - WARNING - There is already a lockfile set, but no process running with this pid (791595). Continuing. PHP Warning: Undefined array key "admin_mail" in /usr/local/ispconfig/server/server.php on line 97 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "csr" in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1286 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Undefined array key "template" in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Warning: Trying to access array offset on value of type null in /usr/local/ispconfig/server/lib/classes/tpl_ini.inc.php on line 92 PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344) : eval()'d code:621 Stack trace: #0 /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344): eval() #1 /usr/local/ispconfig/server/lib/classes/tpl.inc.php(788): tpl->_parse() #2 /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php(1874): tpl->grab() #3 /usr/local/ispconfig/server/lib/classes/plugins.inc.php(120): apache2_plugin->update() #4 /usr/local/ispconfig/server/mods-available/web_module.inc.php(141): plugins->raiseEvent() #5 /usr/local/ispconfig/server/lib/classes/modules.inc.php(302): web_module->process() #6 /usr/local/ispconfig/server/lib/classes/modules.inc.php(235): modules->raiseTableHook() #7 /usr/local/ispconfig/server/server.php(180): modules->processDatalog() #8 {main} thrown in /usr/local/ispconfig/server/lib/classes/tpl.inc.php(1344) : eval()'d code on line 621 <Directory /var/www/econau.org> AllowOverride None Require all denied </Directory> <VirtualHost *:80> DocumentRoot /var/www/econau.org/web ServerName econau.org ServerAlias www.econau.org ServerAdmin [email protected] ErrorLog /var/log/ispconfig/httpd/econau.org/error.log Alias /error/ "/var/www/econau.org/web/error/" ErrorDocument 400 /error/400.html ErrorDocument 401 /error/401.html ErrorDocument 403 /error/403.html ErrorDocument 404 /error/404.html ErrorDocument 405 /error/405.html ErrorDocument 500 /error/500.html ErrorDocument 502 /error/502.html ErrorDocument 503 /error/503.html <Directory /var/www/econau.org/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +SymlinksIfOwnerMatch AllowOverride All Require all granted </Directory> <Directory /var/www/clients/client4/web5/web> # Clear PHP settings of this website <FilesMatch ".+\.ph(p[345]?|t|tml)$"> SetHandler None </FilesMatch> Options +SymlinksIfOwnerMatch AllowOverride All Require all granted </Directory> # suexec enabled <IfModule mod_suexec.c> SuexecUserGroup web5 client4 </IfModule> # php as fast-cgi enabled # For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html <IfModule mod_fcgid.c> FcgidIdleTimeout 300 FcgidProcessLifeTime 3600 # FcgidMaxProcesses 1000 FcgidMaxRequestsPerProcess 5000 FcgidMinProcessesPerClass 0 FcgidMaxProcessesPerClass 10 FcgidConnectTimeout 3 FcgidIOTimeout 600 FcgidBusyTimeout 3600 FcgidMaxRequestLen 1073741824 </IfModule> <Directory /var/www/econau.org/web> <FilesMatch "\.php[345]?$"> SetHandler fcgid-script </FilesMatch> FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php3 FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php4 FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php5 Options +ExecCGI AllowOverride All Require all granted </Directory> <Directory /var/www/clients/client4/web5/web> <FilesMatch "\.php[345]?$"> SetHandler fcgid-script </FilesMatch> FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php3 FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php4 FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php5 Options +ExecCGI AllowOverride All Require all granted </Directory> RewriteEngine on RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ RewriteRule ^ - [END]
Debian default php is not php8 so reverting that back to php7 is right but I do not know which Debian you are using so hopefully you get the right one for your default php. For web sites, first check whether you add those php8 correctly in Additional Php Versions. Then check if all the added php status whether they are running properly or otherwise. Restart them if they are not. Then check the website again. You can monitor them via monit which can auto restart them if they are not running.
I'm using Debian Stable, Bullseye, 11, so default php is 7.4. But I changed the default PHP CLI version to avoid typing lots and lots of times: /usr/bin/php8.1 /usr/local/bin/composer update xxx/xxx Yeah. I have no problems with apache php thanks to the wonderful ISPConfig feature to choose one of the available php versions. I'm not using monit today. But I use the ISPConfig feature to restart some services if they go down, like mysql, apache... (I discover this nice feaure months ago, from the UI)
I've seen php 8.0 and 8.1 support is added in 3.2.9: https://www.ispconfig.org/blog/ispconfig-3-2-9-released/ Using latest version right now, if I get any issue I'll post it ;-) Thanks a lot