Submitted by LeGiangAnh on Mon, 10/02/2017 - 00:42 Pro Licensee
Hi team,
I see that you already supported PHP7. However, in Virtualmin interface (I use pro version), the PHP settings still use PHP5. When will you support PHP7 for the interface?
Thanks, Anh
Files:
Status:
Active
Comments
Submitted by yngens on Mon, 10/02/2017 - 22:59 Comment #1
Anh,
It is not up to Virtualmin team, but upstream operating system vendors to start officially supporting PHP 7. Currently PHP7 on Virtualmin is installed out of additional repositories. And it is PHP 5.x that is officially supported by both Debian and Fedora-based systems like Ubuntu (LTS), RHEL, CentOS, etc. Virtualmin is just an interface to operating system running on your server (and it is a good one, because it is not as intrusive as other control panels), so you should take this question to your operating system's vendor.
Submitted by andreychek on Mon, 10/02/2017 - 09:14 Comment #2
Howdy -- Virtualmin does already support PHP 7 actually, that's been supported for a few years now.
Also, Ubuntu 16.04 comes with PHP 7 by default.
What we may need to do there is verify what packages you have installed, and what Virtualmin is seeing.
If you go into System Settings -> Re-Check Config, can you paste in the output you're seeing there?
Also, what output does this command generate:
dpkg -l 'php*'
Submitted by LeGiangAnh on Mon, 10/02/2017 - 22:38 Pro Licensee Comment #3
Here it is:
The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
Your system has 27.48 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB.
Mail server Postfix is installed and configured.
Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.
Apache is installed.
The following PHP versions are available : 7.0.22 (/usr/bin/php5-cgi), 7.0.22 (/usr/bin/php7.0)
Webalizer is installed.
Apache is configured to host SSL websites.
MySQL is installed and running.
ProFTPD is installed.
Logrotate is installed.
SpamAssassin and Procmail are installed and configured for use.
ClamAV is installed and assumed to be running.
The System and Server Status module is installed and checking on schedule.
Plugin AWstats reporting is installed OK.
Plugin Mailman is installed OK.
Plugin Protected web directories is installed OK.
Using network interface eth0 for virtual IPs.
Default IPv4 address for virtual servers is 10.0.0.4.
Default IP address is set to 10.0.0.4, but the detected external address is actually 13.76.41.14. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page.
Quotas are not enabled on the filesystem /home which contains home directories under /home and email files under /home. Quota editing has been disabled.
Warning - the name service caching daemon (NSCD) is running on your system. This may prevent Virtualmin from properly creating new Unix users and groups.
All commands needed to create and restore backups are installed.
Resource limits are supported and configured correctly.
The selected package management and update systems are installed OK.
.. your system is ready for use by Virtualmin.
root@JWeb:~# dpkg -l 'php*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
un php-amqp <none> <none> (no description available)
un php-apcu <none> <none> (no description available)
un php-apcu-bc <none> <none> (no description available)
un php-ast <none> <none> (no description available)
un php-bcmath <none> <none> (no description available)
un php-calendar <none> <none> (no description available)
un php-cgi <none> <none> (no description available)
ii php-cli 1:7.0+35ubun all command-line interpreter for the
ii php-common 1:35ubuntu6 all Common files for PHP packages
un php-console-ge <none> <none> (no description available)
un php-ctype <none> <none> (no description available)
ii php-curl 1:7.0+35ubun all CURL module for PHP [default]
un php-dom <none> <none> (no description available)
un php-exif <none> <none> (no description available)
un php-fileinfo <none> <none> (no description available)
un php-ftp <none> <none> (no description available)
ii php-gd 1:7.0+35ubun all GD module for PHP [default]
un php-geoip <none> <none> (no description available)
ii php-gettext 1.0.11-2buil all read gettext MO files directly, w
un php-gmagick <none> <none> (no description available)
un php-iconv <none> <none> (no description available)
un php-igbinary <none> <none> (no description available)
un php-imagick <none> <none> (no description available)
un php-json <none> <none> (no description available)
un php-league-oau <none> <none> (no description available)
un php-league-oau <none> <none> (no description available)
ii php-mbstring 1:7.0+35ubun all MBSTRING module for PHP [default]
ii php-mcrypt 1:7.0+35ubun all libmcrypt module for PHP [default
un php-memcache <none> <none> (no description available)
un php-memcached <none> <none> (no description available)
un php-mongodb <none> <none> (no description available)
un php-msgpack <none> <none> (no description available)
ii php-mysql 1:7.0+35ubun all MySQL module for PHP [default]
un php-mysqli <none> <none> (no description available)
un php-mysqlnd <none> <none> (no description available)
un php-opcache <none> <none> (no description available)
un php-pdo <none> <none> (no description available)
un php-pdo-mysql <none> <none> (no description available)
ii php-pear 1:1.10.1+sub all PEAR Base System
un php-pear-front <none> <none> (no description available)
un php-pear-front <none> <none> (no description available)
un php-phar <none> <none> (no description available)
un php-posix <none> <none> (no description available)
un php-radius <none> <none> (no description available)
un php-readline <none> <none> (no description available)
un php-redis <none> <none> (no description available)
un php-rrd <none> <none> (no description available)
un php-shmop <none> <none> (no description available)
un php-simplexml <none> <none> (no description available)
un php-smbclient <none> <none> (no description available)
un php-sockets <none> <none> (no description available)
un php-ssh2 <none> <none> (no description available)
un php-structures <none> <none> (no description available)
un php-sysvmsg <none> <none> (no description available)
un php-sysvsem <none> <none> (no description available)
un php-sysvshm <none> <none> (no description available)
un php-tokenizer <none> <none> (no description available)
un php-uploadprog <none> <none> (no description available)
un php-uuid <none> <none> (no description available)
un php-wddx <none> <none> (no description available)
un php-xdebug <none> <none> (no description available)
ii php-xml 1:7.0+35ubun all DOM, SimpleXML, WDDX, XML, and XS
un php-xml-util <none> <none> (no description available)
un php-xmlreader <none> <none> (no description available)
un php-xmlwriter <none> <none> (no description available)
un php-xsl <none> <none> (no description available)
un php-zip <none> <none> (no description available)
un php-zmq <none> <none> (no description available)
rc php5-cgi 5.5.9+dfsg-1 amd64 server-side, HTML-embedded script
rc php5-cli 5.5.9+dfsg-1 amd64 command-line interpreter for the
un php5-common <none> <none> (no description available)
rc php5-curl 5.5.9+dfsg-1 amd64 CURL module for php5
un php5-dev <none> <none> (no description available)
un php5-fpm <none> <none> (no description available)
rc php5-gd 5.5.9+dfsg-1 amd64 GD module for php5
rc php5-json 1.3.2-2build amd64 JSON module for php5
rc php5-mcrypt 5.4.6-0ubunt amd64 MCrypt module for php5
rc php5-mysql 5.5.9+dfsg-1 amd64 MySQL module for php5
un php5-mysqli <none> <none> (no description available)
un php5-mysqlnd <none> <none> (no description available)
rc php5-readline 5.5.9+dfsg-1 amd64 Readline module for php5
un php5.6-common <none> <none> (no description available)
un php5.6-json <none> <none> (no description available)
ii php7.0-bcmath 7.0.22-0ubun amd64 Bcmath module for PHP
un php7.0-calenda <none> <none> (no description available)
ii php7.0-cgi 7.0.22-0ubun amd64 server-side, HTML-embedded script
ii php7.0-cli 7.0.22-0ubun amd64 command-line interpreter for the
ii php7.0-common 7.0.22-0ubun amd64 documentation, examples and commo
un php7.0-ctype <none> <none> (no description available)
ii php7.0-curl 7.0.22-0ubun amd64 CURL module for PHP
un php7.0-dom <none> <none> (no description available)
un php7.0-exif <none> <none> (no description available)
un php7.0-fileinf <none> <none> (no description available)
un php7.0-ftp <none> <none> (no description available)
ii php7.0-gd 7.0.22-0ubun amd64 GD module for PHP
un php7.0-gettext <none> <none> (no description available)
un php7.0-iconv <none> <none> (no description available)
ii php7.0-json 7.0.22-0ubun amd64 JSON module for PHP
ii php7.0-mbstrin 7.0.22-0ubun amd64 MBSTRING module for PHP
ii php7.0-mcrypt 7.0.22-0ubun amd64 libmcrypt module for PHP
ii php7.0-mysql 7.0.22-0ubun amd64 MySQL module for PHP
un php7.0-mysqli <none> <none> (no description available)
un php7.0-mysqlnd <none> <none> (no description available)
ii php7.0-opcache 7.0.22-0ubun amd64 Zend OpCache module for PHP
un php7.0-pdo <none> <none> (no description available)
un php7.0-pdo-mys <none> <none> (no description available)
un php7.0-phar <none> <none> (no description available)
un php7.0-posix <none> <none> (no description available)
ii php7.0-readlin 7.0.22-0ubun amd64 readline module for PHP
un php7.0-shmop <none> <none> (no description available)
un php7.0-simplex <none> <none> (no description available)
un php7.0-sockets <none> <none> (no description available)
un php7.0-sysvmsg <none> <none> (no description available)
un php7.0-sysvsem <none> <none> (no description available)
un php7.0-sysvshm <none> <none> (no description available)
un php7.0-tokeniz <none> <none> (no description available)
un php7.0-wddx <none> <none> (no description available)
ii php7.0-xml 7.0.22-0ubun amd64 DOM, SimpleXML, WDDX, XML, and XS
un php7.0-xmlread <none> <none> (no description available)
un php7.0-xmlwrit <none> <none> (no description available)
un php7.0-xsl <none> <none> (no description available)
ii php7.0-zip 7.0.22-0ubun amd64 Zip module for PHP
un phpapi-2012121 <none> <none> (no description available)
un phpapi-2015101 <none> <none> (no description available)
root@JWeb:~#
Submitted by yngens on Mon, 10/02/2017 - 23:05 Comment #4
Your system shows PHP 7 is there installed successfully, which Eric (andreychek) was doubting. However, according to your question
you seem to be wanting it to be the main or only version on the system. And that's why I tried to explain that the PHP 5 is the main officially supported version on operating system level and that Virtualmin is just a user interface layer over the operating system.
Submitted by yngens on Mon, 10/02/2017 - 23:07 Comment #5
And if you want for your domains (virtual servers) to automatically choose PHP 7 instead of PHP 5 then you have to specifically set that in the System Settings > Virtual Server Templates > template > PHP options > Default PHP version > PHP 7 or Highest available.
Submitted by andreychek on Tue, 10/03/2017 - 08:46 Comment #6
Okay that is indeed pretty odd! On my system here, which has a PHP5 and PHP7 version, there is indeed an option to configure PHP5 and PHP7 in the Services menu, but according to your screenshot above that option isn't appearing for you.
@yngens, it doesn't appear that they even have PHP5 installed. Also note that their distro, Ubuntu 16.04, comes with PHP 7 by default, it doesn't provide PHP5.
It may be time to ask Jamie about this one :-)
Jamie, they appear to have PHP7 installed, but when looking in the "Services" menu, there's only an option there for "PHP 5 Configuration".
How does Virtualmin go about deciding when to provide an option for "PHP 7 Configuration"?
Submitted by andreychek on Tue, 10/03/2017 - 08:50 Comment #7
Jamie, I'm not sure if this is contributing to the issue, but I'll mention it --
According to the Re-Check Config output, there is a program Virtualmin detected in /usr/bin named "php5-cgi", but it's technically a version of PHP7 despite it's name.
Submitted by LeGiangAnh on Tue, 10/03/2017 - 11:40 Pro Licensee Comment #8
Hi guys,
Just to add more info. I recently upgraded my OS from Ubuntu 14 to 16.
@yngens I cannot find that setting: https://www.screencast.com/t/4mSttBPX
Thanks, Anh
Submitted by andreychek on Tue, 10/03/2017 - 12:03 Comment #9
Yeah that could have something to do with it.
Jamie, after upgrading from a distro with PHP5 to a distro with PHP7, is it possible that there's a config file that needs to be updated in order for Services -> PHP 7 Configuration to be displayed, rather than the PHP 5 Configuration option?
Submitted by JamieCameron on Tue, 10/03/2017 - 23:25 Comment #10
You may need to re-save the PHP mode for the domain for that to show up, as it only appears after the PHP 7 .ini files have been created.