How to enable php 7.2 ?

13 posts / 0 new
Last post
#1 Wed, 01/02/2019 - 15:51

How to enable php 7.2 ?


As a newbies, I'm lost!

At start, I had PHP 5.6.x Then I installed PHP 7.1 and PHP 7.2

My server is used to run a simple wordpress site.

I wonder if I could set PHP 7.2 for this virtualserver. I tried System Settings -> Server Templates -> Default -> PHP Option with no effect and it still into 5.6 version online If I can set php to 7.2, next part will to update mysql

Any advice ?

Thanks Regards

Operating system Debian Linux 8.11 Perl version 5.020002 Path to Perl /usr/bin/perl BIND version 9.9 Postfix version 2.11.3 Mail injection command /usr/lib/sendmail -t Apache version 2.4.10 PHP versions 5.6.39, 7.1.25, 7.2.13 Webalizer version 2.23-08 Logrotate version 3.8.7 MySQL version 5.5.62-0+deb8u1 ProFTPD version 1.35 SpamAssassin version 3.4.2 ClamAV version 0.100.2

Wed, 01/09/2019 - 10:55

anyone ?

Tue, 01/15/2019 - 06:56

Under the virtual server you want to upgrade, have you tried changing the PHP version under "Server Configuration > PHP Versions"?

Mon, 02/11/2019 - 04:46 (Reply to #3)

Hi node77; Yes, I can choose between php 5.6 or 7.2 but when I choose 7.2 and save, my website still detect 5.6. :(

Mon, 02/11/2019 - 06:59


Mon, 02/11/2019 - 09:21

it was with FCGId , switch to FPM into server template as no effect after restart apache: always in 5.6

If it can help,here is /etc/apache2/sites-available/

SuexecUserGroup "#1000" "#1000" ServerName






DocumentRoot /home/mydomain/public_html

ErrorLog /var/log/virtualmin/mydomain.com_error_log

CustomLog /var/log/virtualmin/mydomain.com_access_log combined

ScriptAlias /cgi-bin/ /home/mydomain/cgi-bin/

ScriptAlias /awstats/ /home/mydomain/cgi-bin/

DirectoryIndex index.html index.htm index.php index.php4 index.php5

Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI

allow from all

AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

Require all granted

AddType application/x-httpd-php .php

AddHandler fcgid-script .php

AddHandler fcgid-script .php5

AddHandler fcgid-script .php7.1

AddHandler fcgid-script .php7.2

FCGIWrapper /home/mydomain/fcgi-bin/php7.2.fcgi .php

FCGIWrapper /home/mydomain/fcgi-bin/php5.fcgi .php5

FCGIWrapper /home/mydomain/fcgi-bin/php7.1.fcgi .php7.1

FCGIWrapper /home/mydomain/fcgi-bin/php7.2.fcgi .php7.2

allow from all

AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch

Require all granted

RewriteEngine on

RewriteCond %{HTTP_HOST}

RewriteRule ^(.*) [R]

RewriteCond %{HTTP_HOST}

RewriteRule ^(.*) [R]

RemoveHandler .php

RemoveHandler .php5

RemoveHandler .php7.1

RemoveHandler .php7.2

php_admin_value engine Off

FcgidMaxRequestLen 1073741824

Alias /dav /home/mydomain/public_html

Alias /pipermail /var/lib/mailman/archives/public

DAV on

AuthType Basic

AuthName ""

AuthUserFile /home/mydomain/etc/dav.digest.passwd

Require valid-user

ForceType text/plain

Satisfy All

RemoveHandler .php

RemoveHandler .php5

RewriteEngine off

AuthName " statistics"

AuthType Basic

AuthUserFile /home/mydomain/.awstats-htpasswd

require valid-user

RedirectMatch /cgi-bin/mailman/([^/.])(.cgi)?(.)$1.cgi$3

RedirectMatch /mailman/([^/.])(.cgi)?(.)$1.cgi$3

php_value memory_limit 512M

IPCCommTimeout 31

Mon, 02/11/2019 - 10:01

Sorry i can't help you but with those info someone else?

( we use remi , centos and that is not supported)

Mon, 02/11/2019 - 10:21

If you go to "Server Config > Website Options" - what is the "PHP script execution mode" set to? If it's FPM then changing the PHP version under "Server Config > PHP Versions" will have no effect, because VM only seems to support one version of PHP-FPM (which by default is version 5.6).

If you want PHP 7 then you'll have to change the "PHP script execution mode" to 'FCGId' and then you can switch to another version of PHP in "PHP Versions".

Mon, 02/11/2019 - 16:03

"Server Config > Website Options" - "PHP script execution mode" is FCGId and in template server to

Thu, 05/23/2019 - 06:23

I just installed php 7.2. and I have a similar problem. I noticed that virtualmin does not create configuration in /home/domainname/etc/ does not have php7.2/php.ini

does anyone know how to improve it? I also added a new domain but also this data is not created. easily creates the php5 directory at /home/.../etc/php5/...

virtualmin when switching from php 5.6 to php 7.2 correctly changes the link to the configuration directory that is not created.

Wed, 06/05/2019 - 11:57 (Reply to #10)
Wed, 06/05/2019 - 12:29

We do have instructions for installing PHP 7.2 on CentOS here:

After installing it, you'd also need to go into System Settings and click Re-Check Configuration, which will generate the new php.ini files.


Wed, 06/05/2019 - 15:10

Eric, I see CentOS and Ubuntu mentioned in the above link, is there a PHP 7.1 option for Debian 9.9 servers?