Ubuntu 16.04 and php_admin_value engine Off php 7


Just installed new Ubuntu 16.04 server and Virtualmin. Migrated vhost from previous server.

When launching the sites instead of the website a download form shows. I’m running FCGI and to get it working need to comment php_admin_value engine Off under all vhosts.

Is it secure? Is the vhost run for the owner only? How to fix it


I have edited:

sudo pico /etc/apache2/mods-available/php7.0.conf

and commented out:
SetHandler application/x-httpd-php

and it worked

I’m not sure it is the right way


That’s actually something the installer does now… we overlooked that earlier.

The next version of Virtualmin should detect if that isn’t commented out and notify the admin in that case.

So yes that’s an excellent find and a good solution :slight_smile:


Hello Eric or anyone else who can answer this. It wasn’t super clear to me what to do here. I’m experiencing the same issue. Has this not been incorporated into the new Virtualmin automatic stuff yet because it seems I shouldn’t be getting this error with ???

  • Do I delete the line php_admin_value engine Off
  • Do I delete the line AddType application/x-httpd-php .php

MY SYSTEM: I am migrating away from old CentOS 6 and CentOS 7 Virtualmin servers to an Ubuntu 16 Virtualmin server.

I am having this problem too. I am on Ubuntu 16.04 but am using php5.6 rather than 7 at this time.

I am finding that every single virtualhost I create has

php_admin_value engine Off

in it. How do I change the default so that it doesn’t do this? I have scoured the virtual host templates looking for it and can’t find it.

Please help.

Your problem is almost certainly different than the one that initially started this thread; I’d recommend starting a new topic where you explain what problem you’re trying to solve.

It’s not clear to me what problem you’re having or why you’re wanting to remove random lines from config files. :wink:

Virtualmin won’t add those lines if mod_php is disabled in your Apache configuration. It has to add them if mod_php is enabled. So, make sure Apache isn’t loading mod_php, and make sure Virtualmin knows that (you should see the mod_php execution option disappear from the Server Configuration->Website Options->PHP script execution mode).

Indeed that is the case, I found that by searching the forum last night after I posted the comment. I now have mod_php disabled, but without it I get a 500 Internal Server error. I’ve posted a new topic here: