I have a pair of servers built on Ubuntu 18.04 many years ago and incrementally upgraded to 24.04. I occasionally have an issue on the slave where the exec line of /var/www/php-fcgi-scripts/<something>/.php-fcgi-starter is missing an executable name so site does not work. Usually I fix this by copying the file over from the master and then it works again. But today I decided that it's time to investigate the root cause and fix it properly. It looks like whenever I have added PHP versions in the past, I was supposed to create the PHP version entries for each server from the master management interface. I am attempting to correct this now but I am only offered the master server as an option when adding, so cannot create entries for the slave. I can see both servers in Server Services and both servers are Web servers. Both servers are in Server Config. No obvious differences with web configuration there. Both servers are present in IP Addresses, but the slave server name is missing [IP address is correct]. Not sure where else to look.
Did you maybe configure one server as a mirror of the other one? In this case, you just add the PHP version on the master of that mirror as the mirror (as the name implies) mirrors the exact same settings, so it adds the same PHP entry in its database.
"Mirror" is a good description here, both servers are supposed to be identical. So explicit PHP version entries per-server are not necessary in "mirror" mode? But how do I know if that is how I set it up? Unfortunately, trying to remember what I did in 2019 is asking the impossible The servers have been generally fine over the years, only issue is that occasionally Unison gets stuck or MySQL replication breaks but they're simple enough to fix.
Please check under System > server services if the second server has the first one set under "is mirror of server".
Yes it does. So the issue is not about configuring the additional versions per-server. What else would explain why .php-fcgi-starter is not created properly?
Any other ideas? If I make a trivial change, I see it says it re-writes the file, but no errors emitted by the writing process: Code: Tue Jan 21 05:58:02 PM UTC 2025 PHP Warning: Undefined variable $custom_fastcgi_php_ini_dir in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 Tue Jan 21 05:58:02 PM UTC 2025 PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 Tue Jan 21 05:58:02 PM UTC 2025 PHP Warning: Undefined variable $custom_fastcgi_php_ini_dir in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 Tue Jan 21 05:58:02 PM UTC 2025 21.01.2025-17:58 - DEBUG [system.inc:2436] - safe_exec cmd: chattr -i '/var/www/php-fcgi-scripts/web55/.php-fcgi-starter' - return code: 0 Tue Jan 21 05:58:02 PM UTC 2025 21.01.2025-17:58 - DEBUG [apache2 plugin.inc:1602] - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web55/.php-fcgi-starter Tue Jan 21 05:58:02 PM UTC 2025 21.01.2025-17:58 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/php-fcgi-scripts/web55/.php-fcgi-starter' - return code: 0 But perhaps that Undefined variable $custom_fastcgi_php_ini_dir is significant?
Still having this issue. Even if I fix it and then chattr +i /var/www/php-fcgi-scripts/web55/.php-fcgi-starter it will be overwritten later.
They are most definitely not. Otherwise you wouldn't have this problem. Have you compared /usr/local/ispconfig/server/conf/php-fcgi-starter.master on both servers? Or maybe you have your own custom version in /usr/local/ispconfig/server/conf-custom? I expect you'll find differences. If not here then somewhere else on your servers.
Identical. They are mostly the same with a few 'empty.dir' files in there. The two servers have a /usr/local/ispconfig/server/conf-custom/vhost.conf.master-2024-11-<slightly different times> file in there, but those two files are identical except the name. How can I debug , or manually trigger, the .php-fcgi-starter generation process?
See read before posting post, chapter 5: https://forum.howtoforge.com/threads/please-read-before-posting.58408/
Output of server.sh: Code: # /usr/local/ispconfig/server/server.sh 14.03.2025-13:38 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'. 14.03.2025-13:38 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock finished server.php. root@erebus:~# /usr/local/ispconfig/server/server.sh 14.03.2025-13:41 - DEBUG [plugins.inc:155] - Calling function 'check_phpini_changes' from plugin 'webserver_plugin' raised by action 'server_plugins_loaded'. 14.03.2025-13:41 - DEBUG [server:184] - Found 1 changes, starting update process. 14.03.2025-13:41 - DEBUG [modules.inc:177] - 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_format_web`,`backup_format_db`,`backup_encrypt`,`backup_password`,`backup_excludes`,`active`,`traffic_quota_lock`,`proxy_directives`,`last_quota_notification`,`rewrite_rules`,`added_date`,`added_by`,`directive_snippets_id`,`enable_pagespeed`,`http_port`,`https_port`,`folder_directive_snippets`,`log_retention`,`proxy_protocol`,`server_php_id`,`jailkit_chroot_app_sections`,`jailkit_chroot_app_programs`,`delete_unused_jailkit`,`last_jailkit_update`,`last_jailkit_hash`,`disable_symlinknotowner`) VALUES ('55','1','2','riud','ru','',3,'*','','example.com','vhost','0','name','/var/www/clients/client1/web55','','web55','client1','-1','-1','n','n','y','1','1','www','fast-cgi','n','y','n','','','','n','y','y','n','','','','','AF','example.com','','','-----BEGIN CERTIFICATE-----\r\n [snip this bit] -----END CERTIFICATE-----\r\n','','',NULL,'awstats','All','','','y','n','ondemand','10','2','1','5','10','0','/var/www/clients/client1/web55/web:/var/www/clients/client1/web55/private:/var/www/clients/client1/web55/tmp:/var/www/example.com/web:/srv/www/example.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom','','daily','7','default','gzip','n','','web/wp-content/cache','y','n','',NULL,'','2024-12-06','admin','0','n','80','443',NULL,'10','n','7','','','n','2025-03-14','force_update1741210502','y') 14.03.2025-13:41 - DEBUG [plugins.inc:118] - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'. 14.03.2025-13:41 - DEBUG [plugins.inc:118] - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'. 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: chattr -i '/var/www/clients/client1/web55' - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/clients/client1/web55' - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: df -T '/var/www/clients/client1/web55'|awk 'END{print $2,$NF}' - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: which 'setquota' 2> /dev/null - return code: 0 setquota: Error getting quota information to update. 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: setquota -u 'web55' '0' '0' 0 0 -a &> /dev/null - return code: 0 setquota: Error getting quota information to update. 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: setquota -T -u 'web55' 604800 604800 -a &> /dev/null - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/clients/client1/web55' - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:1441] - Add server alias: example.org 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: which 'apache2ctl' 2> /dev/null - return code: 0 PHP Warning: Undefined variable $custom_fastcgi_php_ini_dir in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 PHP Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 PHP Warning: Undefined variable $custom_fastcgi_php_ini_dir in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 1569 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: chattr -i '/var/www/php-fcgi-scripts/web55/.php-fcgi-starter' - return code: 0 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:1602] - Creating fastcgi starter script: /var/www/php-fcgi-scripts/web55/.php-fcgi-starter 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: chattr +i '/var/www/php-fcgi-scripts/web55/.php-fcgi-starter' - return code: 0 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:1831] - Enable SSL for: example.com 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:1892] - Writing the vhost file: /etc/apache2/sites-available/example.com.vhost 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:2010] - Apache status is: running 14.03.2025-13:41 - DEBUG [services.inc:56] - Calling function 'restartHttpd' from module 'web_module'. 14.03.2025-13:41 - DEBUG [system.inc:2089] - Trying to use Systemd to restart service 14.03.2025-13:41 - DEBUG [system.inc:2436] - safe_exec cmd: systemctl is-enabled 'apache2' 2>&1 - return code: 0 14.03.2025-13:41 - DEBUG [web module.inc:246] - Restarting httpd: systemctl restart apache2.service 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:2013] - Apache restart return value is: 0 14.03.2025-13:41 - DEBUG [apache2 plugin.inc:2024] - Apache online status after restart is: running 14.03.2025-13:41 - DEBUG [plugins.inc:118] - Calling function 'incronUpdate' from plugin 'z_php_fpm_incron_reload_plugin' raised by event 'web_domain_update'. 14.03.2025-13:41 - DEBUG [z php fpm incron reload plugin.inc:49] - Document root and PHP version unchanged. Not updating incron configuration. 14.03.2025-13:41 - DEBUG [modules.inc:205] - Processed datalog_id 1719 14.03.2025-13:41 - DEBUG [server:224] - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock finished server.php. Resulting config file: Code: # cat /var/www/php-fcgi-scripts/web55/.php-fcgi-starter #!/bin/sh PHPRC="/" export PHPRC PHP_DOCUMENT_ROOT="/var/www/clients/client1/web55" export PHP_DOCUMENT_ROOT # The variable PHP_FCGI_CHILDREN is onyl useful for lighty or nginx as apache # mod_fcgi will control the number of childs themself and never use the additional processes. # PHP_FCGI_CHILDREN=8 # export PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS=5000 export PHP_FCGI_MAX_REQUESTS export TMP=/var/www/clients/client1/web55/tmp export TMPDIR=/var/www/clients/client1/web55/tmp export TEMP=/var/www/clients/client1/web55/tmp exec \ -d open_basedir="/var/www/clients/client1/web55/web:/var/www/clients/client1/web55/private:/var/www/clients/client1/web55/tmp:/var/www/example.com/web:/srv/www/example.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom" \ -d upload_tmp_dir=/var/www/clients/client1/web55/tmp \ -d session.save_path=/var/www/clients/client1/web55/tmp \ -d sendmail_path="/usr/sbin/sendmail -t -i -f [email protected]" \ $1