php-fpm socket/config not removed on change of php version
short description
When changing from one version of php-fpm to another, the corresponding config of the website is not removed. This always happens from one "direction" to another, but not the other way around.
I've posted a similar issue three months ago in another thread - regarding a different server and in context to a servers default php setting. I don't remembers hitting this issue when not changing the servers php default setting, as well as a websites php version - however I don't recall changing the php default on that server... Please see #5333 (comment 68059) for reference as well.
correct behaviour
php-fpm config should be removed and the daemon should be reloaded.
environment
Server OS: ubuntu
Server OS version: bionic / 18.04.3 LTS
ISPConfig version: 3.1.15 (checked changelogs of p1 and p2 but couldn't see any relevant fixes)
log entries
From php5.6 -> 7.3
This is where the error ouccurs! There should be a line "Removed PHP-FPM config file: /etc/php/5.6/fpm/pool.d/web3363.conf", as well as a reload of the daemon itself.
08.11.2019-10:32 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
08.11.2019-10:32 - DEBUG - Found 1 changes, starting update process.
08.11.2019-10:32 - DEBUG - Replicated from master: REPLACE INTO `web_domain` (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`ipv6_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`web_folder`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`python`,`perl`,`redirect_type`,`redirect_path`,`seo_redirect`,`rewrite_to_https`,`ssl`,`ssl_letsencrypt`,`ssl_letsencrypt_exclude`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_key`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`nginx_directives`,`php_fpm_use_socket`,`php_fpm_chroot`,`pm`,`pm_max_children`,`pm_start_servers`,`pm_min_spare_servers`,`pm_max_spare_servers`,`pm_process_idle_timeout`,`pm_max_requests`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`backup_excludes`,`active`,`traffic_quota_lock`,`fastcgi_php_version`,`proxy_directives`,`enable_spdy`,`last_quota_notification`,`rewrite_rules`,`added_date`,`added_by`,`directive_snippets_id`,`enable_pagespeed`,`http_port`,`https_port`,`log_retention`,`folder_directive_snippets`) VALUES ('3363','526','525','riud','ru','','31','*','','domain.tld','vhost','0','name','/var/www/clients/client524/web3363','','web3363','client524','1000','100000','n','n','y','0','1','none','php-fpm','n','n','n',NULL,NULL,NULL,'n','n','n','n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$6$rounds=5000$48b2e56734a9d55b$XNfG0T8n/Y7ZQA.7NbzVFTJ8DInMBGGGwoKApbZQmjnSM9ytK2OUdYCbnp8dZBjcrz24mvw0j2hy9FqojTcXp.','awstats','All','','','y','n','dynamic','10','2','1','5','10','0','/var/www/clients/client524/web3363/web:/var/www/clients/client524/web3363/private:/var/www/clients/client524/web3363/tmp:/var/www/domain.tld/web:/srv/www/domain.tld/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom','\r\nmemory_limit = 256M\r\npost_max_size = 64M\r\nupload_max_filesize = 64M\r\nmax_input_time = -1\r\nmax_execution_time = 180\r\nmax_input_vars = 1580\r\n','none','1','','y','n','','','n',NULL,NULL,'2019-11-08','113548','0','n','80','443','10',NULL)
08.11.2019-10:32 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
08.11.2019-10:32 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: df -T '/var/www/clients/client524/web3363'|awk 'END{print $2,$NF}' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'setquota' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: setquota -u 'web3363' '1024000' '1025024' 0 0 -a &> /dev/null - return code: 0
setquota: Not setting block grace time on /dev/zd16p1 because softlimit is not exceeded.
setquota: Not setting inode grace time on /dev/zd16p1 because softlimit is not exceeded.
08.11.2019-10:32 - DEBUG - safe_exec cmd: setquota -T -u 'web3363' 604800 604800 -a &> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/domain.tld.vhost
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - Writing the PHP-FPM config file: /etc/php/7.3/fpm/pool.d/web3363.conf
08.11.2019-10:32 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'.
08.11.2019-10:32 - DEBUG - Restarting php-fpm: systemctl reload php7.3-fpm.service
08.11.2019-10:32 - DEBUG - Apache status is: running
08.11.2019-10:32 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
08.11.2019-10:32 - DEBUG - Restarting httpd: systemctl restart apache2.service
08.11.2019-10:32 - DEBUG - Apache restart return value is: 0
08.11.2019-10:32 - DEBUG - Apache online status after restart is: running
08.11.2019-10:32 - DEBUG - Processed datalog_id 30661
08.11.2019-10:32 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
finished.
From php7.3 -> 5.6
All good here...
08.11.2019-10:32 - DEBUG - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'.
08.11.2019-10:32 - DEBUG - Found 1 changes, starting update process.
08.11.2019-10:32 - DEBUG - Replicated from master: REPLACE INTO `web_domain` (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`ipv6_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`web_folder`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`python`,`perl`,`redirect_type`,`redirect_path`,`seo_redirect`,`rewrite_to_https`,`ssl`,`ssl_letsencrypt`,`ssl_letsencrypt_exclude`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_key`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`nginx_directives`,`php_fpm_use_socket`,`php_fpm_chroot`,`pm`,`pm_max_children`,`pm_start_servers`,`pm_min_spare_servers`,`pm_max_spare_servers`,`pm_process_idle_timeout`,`pm_max_requests`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`backup_excludes`,`active`,`traffic_quota_lock`,`fastcgi_php_version`,`proxy_directives`,`enable_spdy`,`last_quota_notification`,`rewrite_rules`,`added_date`,`added_by`,`directive_snippets_id`,`enable_pagespeed`,`http_port`,`https_port`,`log_retention`,`folder_directive_snippets`) VALUES ('3363','526','525','riud','ru','','31','*','','domain.tld','vhost','0','name','/var/www/clients/client524/web3363','','web3363','client524','1000','100000','n','n','y','0','1','none','php-fpm','n','n','n',NULL,NULL,NULL,'n','n','n','n',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'$6$rounds=5000$48b2e56734a9d55b$XNfG0T8n/Y7ZQA.7NbzVFTJ8DInMBGGGwoKApbZQmjnSM9ytK2OUdYCbnp8dZBjcrz24mvw0j2hy9FqojTcXp.','awstats','All','','','y','n','dynamic','10','2','1','5','10','0','/var/www/clients/client524/web3363/web:/var/www/clients/client524/web3363/private:/var/www/clients/client524/web3363/tmp:/var/www/domain.tld/web:/srv/www/domain.tld/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom','\r\nmemory_limit = 256M\r\npost_max_size = 64M\r\nupload_max_filesize = 64M\r\nmax_input_time = -1\r\nmax_execution_time = 180\r\nmax_input_vars = 1580\r\n','none','1','','y','n','php5.6:/etc/init.d/php5.6-fpm:/etc/php/5.6/fpm/:/etc/php/5.6/fpm/pool.d','','n',NULL,NULL,'2019-11-08','113548','0','n','80','443','10',NULL)
08.11.2019-10:32 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
08.11.2019-10:32 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr -i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: df -T '/var/www/clients/client524/web3363'|awk 'END{print $2,$NF}' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'setquota' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: setquota -u 'web3363' '1024000' '1025024' 0 0 -a &> /dev/null - return code: 0
setquota: Not setting block grace time on /dev/zd16p1 because softlimit is not exceeded.
setquota: Not setting inode grace time on /dev/zd16p1 because softlimit is not exceeded.
08.11.2019-10:32 - DEBUG - safe_exec cmd: setquota -T -u 'web3363' 604800 604800 -a &> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: chattr +i '/var/www/clients/client524/web3363' - return code: 0
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/domain.tld.vhost
08.11.2019-10:32 - DEBUG - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0
08.11.2019-10:32 - DEBUG - Writing the PHP-FPM config file: /etc/php/5.6/fpm/pool.d/web3363.conf
08.11.2019-10:32 - DEBUG - Removed PHP-FPM config file: /etc/php/7.3/fpm/pool.d/web3363.conf
08.11.2019-10:32 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'.
08.11.2019-10:32 - DEBUG - Restarting php-fpm: systemctl reload php7.3-fpm.service
08.11.2019-10:32 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'.
08.11.2019-10:32 - DEBUG - Restarting php-fpm: systemctl reload php5.6-fpm.service
08.11.2019-10:32 - DEBUG - Apache status is: running
08.11.2019-10:32 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
08.11.2019-10:32 - DEBUG - Restarting httpd: systemctl restart apache2.service
08.11.2019-10:32 - DEBUG - Apache restart return value is: 0
08.11.2019-10:32 - DEBUG - Apache online status after restart is: running
08.11.2019-10:32 - DEBUG - Processed datalog_id 30660
08.11.2019-10:32 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
finished.