Many PHP options not shown in "Website Options"

After a long time without viewing my webmin/virtualmin control panel, and upgrading to webmin 1.860 and virtualmin 6.02, I have noticed I am missing many options on the Virtualmin > Server Configuration > Website Options.

The only option show under “Website and PHP options” is “Default website for IP address?”
I was specifically looking to change the PHP script execution mode.

I have tracked down the file that produces this page: /usr/share/webmin/virtual-server/edit_phpmode.cgi
I have noticed the variable ‘$p’ is empty, while most options only get shown if ‘$p’ is equal to ‘web’
So I edit this file, manually set $p equal to ‘web’ near the top of the file and all the options show up as expected.

What’s wrong?

Same for me. My configuration in Centos 6.9 64bit with virtualmin 6.02 gpl. On Centos edit_phpmode.cgi is located in /usr/libexec/webmin/virtual-server

Il I add
$p = &domain_has_website($d);
into /usr/libexec/webmin/virtual-server/edit_phpmode.cgi after $d declaration all works fine

same for me. 3 VPS, one in ubuntu 16, the other two in ubuntu 14. After VM6.02 update, the options for choosing CGI/FCGI/FPM, execution time and website root just disappeared.
Checked the edit_phpmode.cgi file but just don’thave the skills to see what’s wrong.
Apparently, it should fetch wether it’s a domain or an alias and then present the options accordingly. In my case it just presents two of the options “# Default website for its IP” and “# Show PHP information”, regardless it’s a “server” a “sub-server”, and, if it’s an “alias server”, just a tab saying “website and php options”, without any extra information.

EDIT: found the solution here:

add “+$p = &domain_has_website($d);” on line 14

Everything working now



Having just upgraded to Webmin 1.870 with Virtualmin 6.02 and Usermin 1.721 installed on Ubuntu 16.04.3 I went to change the phpmode in a virtual domain’s Server Configuration/Website Options and found this was missing. I edited the /usr/share/webmin/virtual-server/edit_phpmode.cgi file and added the missing line but the option still isn’t coming up in the control panel. Just a few weeks ago it worked and now it doesn’t…

Since it isn’t working, how can I manually edit a file (and which file) within a given domain to switch the options until this gets fixed?

I have the same problem. Like you; and I have a site down because it marks me an error, in the execution mode; how did you solve it; Can you help me?
Before finding this thread, I had put a case on this link

Already add the lost line and nothing. It still does not work.
My configuration is as follows

  • Webmin 1.870
  • Usermin version 1.720
  • Virtualmin version 6.02
  • Operating system CentOS Linux 7.4.1708
  • Perl version 5.016003
  • Path to Perl / usr / bin / perl
  • Apache version 2.4.6
  • PHP versions 5.6.25, 7.0.10
  • ClamAV version 0.99.2

I haven’t solved it - seems to be a bug resulting from the fix of another bug and I don’t have the skills or time to track it down. Glad you’ve put it in the bug tracking system.

This has happened for me too…

Adding “+$p = &domain_has_website($d);” on line 14 worked for me on CentOS 6+


Thank you this worked on ubuntu 16

Same here on Debian 9, I was pulling my hair because I was sure I had done this just one or two weeks ago … so I went to other vps’s, same … with debian 6/7/8.
On debian9: /usr/share/webmin/virtual-server/edit_phpmode.cgi

The above modification allow us to switch to php-fpm but there must be others problems, because if I look at “Services/PHP-FMP Configuration/Ressource limits” I cannot see anymore the specific settings I had for existing domains eveything is set to “default” and all values are empty (IIRC they were filled at least with default values for server). If I do save a different value, it seems to be set but I do not seem to be able to apply those values, even after rebooting Apache, for ex. upload_max_filesize stays to 2M even thought it shows 16M in the above settings.

I too have this with Ubuntu 16.04 + 1.870 + 6.02 Pro - only just noticed this as an issue - will try editing line 14 in “edit_phpmode.cgi” and report back

Thank you so much

I had the issue, I upgraded webmin-virtualmin
it seems resolved in the latest version