Virtualmin is not ready for Ubuntu Server 16.04 LTS

WARNING: Virtualmin is not ready for Ubuntu Server 16.04 LTS

I set up in Virtual Machine (VMware 12) this combination Ubuntu Server x64 16.04 LTS and latest Virtualmin. Steps I've done:

1) Installed the operating system from scratch, giving only SSH feature at the end 2) I installed Virtualmin using its installation script 3) I did Post-installation Wizard as usual then checked if configuration is ready for and it was 4) I created a Virtual Server then a file in its root called phpinfo.php

Accessing the file in browser is not running PHP at all, you get Save As page for saving your script.

Virtualmin is installing from Ubuntu repository these packages:

Server version: Apache/2.4.18 (Ubuntu) Server built: 2016-04-15T18:00:57

PHP 7.0.4-7ubuntu2.1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper

Before reporting this I installed as a basic user this combination for 4 TIMES to be sure there are issues with PHP7. If you enable the default site 000-default.conf and place a phpinfo.php into its root PHP7 is working.

Please warn asap your users not installing this combination until there is a fix for it.

Status: 
Active

Comments

Howdy -- we unfortunately haven't run into the problems you're describing above, and there's a lot of folks who are successfully using Virtualmin on Ubuntu 16.04.

We'll continue to do testing though to see if we can determine why that's occurring in your case.

Are you installing Ubuntu yourself, or are you using an image provided by an ISP or provider?

Also, make sure that you're using the most recent version of the installer, as a number of issues have been fixed in newer installer versions.

I am installing Ubuntu using the ISO file from their website. It is a VMware installation so I can do everything I want.

I just installed latest CentOS 6 & 7, Fedora, Debian 7 & 8, Ubuntu Server 14 using the same installation method which is a basic one. None of them are having issues with Virtualmin. I have to admit PHP version is 5.6 in all cases, except 5.5 in Debian Wheezy.

Please revise how a virtual server is using PHP 7. In my opinion there are issues. PHP 7 is functioning with default Apache configuration, but not with a virtual server.

I did a test the same installation but using Ubuntu 14.04 LTS. By default it installs PHP 5.5.9. I created a virtual server and php files works as expected. As webserver Ubuntu 14.04 LTS has the same version as Ubuntu 16.04, Apache 2.4.7. So, I removed PHP 7 from Ubuntu 16.04 and replaced it with PHP 5.5 and surprise, it is working.

There is one conclusion PHP7 has a wrong configuration for working properly in Ubuntu 16.04. Please warn everybody not installing this combination until you confirm and solve this issue.

Well, as mentioned earlier, there are a lot of folks successfully using Ubuntu 16.04 and PHP7. Some folks also use PHP7 with CentOS.

And it's been working properly in our testing.

However, we'll be doing some testing to try and reproduce any issues you're experiencing.

With all due your respect please install my combination and reproduce this issue. Even those folks are running successfully I guarantee that is a custom installation not one from the default installation script which should go just fine.

Finally if their configurations are working what shall I bother reporting? Probably I am a lonely case negligible. Sorry for saying this but an issue cannot be solved with others statements.

I managed to make this working, editing /etc/apache2/mods-available/php7.0.conf and commenting the following lines:

SetHandler application/x-httpd-php

and

SetHandler application/x-httpd-php-source

The final file content is bellow:

<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
    # SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
    # SetHandler application/x-httpd-php-source
    # Deny access to raw php sources by default
    # To re-enable it's recommended to enable access to the files
    # only in specific virtual host or directory
    Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
    Require all denied
</FilesMatch>
   
# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
<IfModule mod_userdir.c>
    <Directory /home/*/public_html>
        php_admin_flag engine Off
    </Directory>
</IfModule>

Restarting apache2 service made all things working and no more issue for the moment. I could create a few virtual server and ran phpinfo files in every of them.

I see what could cause that in Virtualmin GPL.

I'd be curious if that works properly for you now, if you were to re-download the GPL installer and re-attempt the installation.

Also, when that issue occurs for you, does going into System Settings -> Re-Check Config detect a problem with the PHP config file?

Virtualmin is installing just fine. Re-Check Config is not showing any issue. The problem was coming from PHP7 configuration module loaded by Apache. It is happening in Ubuntu 14.04 too. If this change is not made automatically it should be done manually. Everyone using this combination must know this modification. If they don't every virtual server running php files will give the download file option instead of running the file. I am evaluating how this can be achieved not editing php7.0.conf but editing virtual server configuration in sites-available.

Have you tried it again though since I posted the comment above? (being sure to re-download the install.sh script)

yes. then I posted my message.

Okay, it shouldn't be necessary to make any changes to that config file, that should be done automatically. I verified that the newest version of the install.sh script does indeed handle that on PHP7.

If you're saying you're still seeing an issue with that, even using the most recent installer, I'll look deeper into it.

But it should not be necessary to manually comment anything out in order for PHP to work.

In my case after using install.sh that file hadn't those lines commented. In Debian with php 5.6 these lines are commented and everything is working as expected. This is happening because of Apache configuration or PHP 7. I don't mind checking that file and commenting the lines after installation.

unborn's picture
Submitted by unborn on Tue, 06/21/2016 - 04:29 Pro Licensee

HI there.. on canonicals advice everyone should wait with server upgrades when ubuntu 16.04.1 is out. It is not recommended to upgrade your server to 16.04 yet as there are some issues as I was told when chatted to them. Even standard desktop edition have its own issues which makes system usable for more or less basic things. But that was 3 days after 16.04 came out and things could have changed and perhaps ubuntu 16.04.1 is maybe out or those basic issues was fixed. I do not know as I stop using ubuntu on my desktop completely. I actually never used ubuntu on real srv but it was giving me some issues running in virtualbox while testing it to see if that is right distro for my real srv.

I would say ubuntu 16.04 is not ready for virtualmin as it is not stable. On another hand php7 is not yet stable release officially as well.. does php5.+ not working for you?

I would recommend try server on debian jessie currently I think its 8.5 as it just works out of the box or go back to 14.04 if you must use ubuntu and wait for updated release.

In my case it is just a test environment for becoming familiar with issues in different Linux distributions. I agree Ubuntu 16.04 is still fresh for the moment. I am fan of Debian 7 and 8 distributions which both created me no trouble in my installation over years.