changing php versions for virtual sub server causes php to enter failed state - virtualmin is changing php fpm config file group name to wrong value

This issue has still not been resolved and has been hanging around for too long...its time to damnwell fix it!

To reproduce...

open virtual sub server and change php-version

virtualmin is cocking up the php-fpm configuration file to contain incorrect group name...see below

This is the "incorrect" /etc/php/5.6/fpm/pool.d/123455678.conf

[157424598826235]
user = domain.com
group = domain
listen = 8014
pm = ondemand
pm.max_children = 20
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/domain.com/tmp
php_admin_value[session.save_path] = /home/domain.com/tmp
php_value[max_execution_time] = 180


this is the "correct" file to match primary Virtual Server

user = domain.com
group = domain.com
listen = 8014
pm = ondemand
pm.max_children = 20
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/domain.com/tmp
php_admin_value[session.save_path] = /home/domain.com/tmp
php_value[max_execution_time] = 180

Can someone please fix this is virtualmin...every time i change php versions i never know when it going to takeout websites...its hopeless.

Its intolerable that customers change php versions, their website shits itself, and they then ring up or email saying "the server is f%$ked"!!!

Status: 
Active

Comments

Title: php could not restart because it exited with error code and enterred failed state » changing php versions for virtual sub server causes php to enter failed state - virtualmin is changing php fpm config file group name is changed to wrong value
Title: changing php versions for virtual sub server causes php to enter failed state - virtualmin is changing php fpm config file group name is changed to wrong value » changing php versions for virtual sub server causes php to enter failed state - virtualmin is changing php fpm config file group name to wrong value
Assigned: Unassigned »

Howdy -- thanks for contacting us!

I'm passing this along to Jamie for review.

We're not seeing that everywhere, so Jamie may have some followup questions for you so he can track down what might be causing it in your case.

However, if it's causing disruption on your server, my suggestion would be to temporarily disable PHP-FPM as a PHP Execution Mode until we're able to nail down the cause.

The fix to prevent this is to edit /etc/webmin/virtual-server/domains/157424598826235 and change the line ugroup=domain to ugroup=domain.com

I am guessing that this domain was renamed at some point in the past, but due to a Virtualmin bug the group in that file wasn't updated properly.

Off the top of my head, I don't recall if the domain is an imported one or been renamed. Although I do recall it has also happened on new subdomains I have created in virtualmin as well. However, should that make any difference? I don't control either the import or renaming functions hardcoded in virtualmin. The whole reason we use control panel is so that they do this stuff for us saving time and expertise.

Thanks for all the info!

It looks like Jamie found the cause of the bug, so after the next Virtualmin version folks shouldn't run into that issue any longer.