PHP-FPM switcher "Address already in use"

Hi, I just noticed that multiple versions of PHP-FPM are now supported :) So, I gave it a go using php70, but got the following error...

ERROR: unable to bind listening socket for address '': Address already in use (98)

Looking at the running processes, it looks as though php-fpm is already running, but that's php56, not php70.

If I stop php-fpm and then reapply the changes to the virtual server, then it works, and the new running process is the php70 version.

So, i'm guessing VM is failing to create a new process for the different version of php-fpm, or at least stop the currently running version.

Works fine if only one version of php-fpm is needed on the server, but I suspect it will cause issues if multiple versions are required, which kinda defeats the object of the new feature?



This can happen because the default FPM port for both versions is 9000, which means that they clash when started. The trick is the edit the file /etc/php-fpm.d/www.conf and change port 9000 to something else, then reboot or restart both FPM versions.

We'll see if something can be done in Virtualmin to fix this automatically.