PHP FCGI is broken after reboot

My VPS is running on Debian 8.

After a fresh installation of Virtualmin, I can create a new server with phpinfo file, and see that everything is working. phpinfo reports that it is running PHP 7.1 via FCGI.

After rebooting the server, creating a new server results in PHP no longer working. Trying to restart /etc/init.d/php-fcgi-example-com results in the following error:

Failed to restart php-fcgi-example-com.service: Unit php-fcgi-example-com.service failed to load: No such file or directory.


Here is the init script for php-fcgi-example-com: #!/bin/sh ### BEGIN INIT INFO # Provides: php-fcgi-example-com # Required-Start: $network $syslog # Required-Stop: $network # Default-Start: 2 3 5 # Default-Stop: # Description: Start Nginx PHP fcgi server for example.com ### END INIT INFO

case “$1” in
‘start’)
su example.com -c PHPRC=/home/example.com/etc/php7.1\ PHP_FCGI_CHILDREN=4\ /usr/bin/php-loop.pl\ /usr/bin/php-cgi7.1\ -b\ /var/php-nginx/15083006821116.sock/socket\ >>/home/example.com/logs/php.log\ 2>&1\ </dev/null\ &\ echo\ $!\ >/var/php-nginx/15083006821116.php.pid
RETVAL=$?
;;
‘stop’)
su example.com -c kill\ `cat\ /var/php-nginx/15083006821116.php.pid` ; sleep 1
RETVAL=$?
;;
‘restart’)
$0 stop ; $0 start
RETVAL=$?
;;
*)
echo “Usage: $0 { start | stop }”
RETVAL=1
;;
esac
exit $RETVAL



If I go to Server Configuration > Website Options > PHP script execution mode > FPM, PHP works again but PHP Version 5.6.30.

Could you please look into what is causing the PHP FCGI scripts to no longer work after a reboot?

edit: deleted revision.

edit: deleted revision.