Choose PHP version with Nginx PHP-FPM (Ubuntu)

5 posts / 0 new
Last post
#1 Thu, 03/29/2018 - 03:22
kovinet

Choose PHP version with Nginx PHP-FPM (Ubuntu)

On Ubuntu 16.04 I have multiple PHP versions installed. When using fcgid as PHP handler for Nginx there is an option to choose PHP version for each Virutal (sub)server. But after switching to php-fpm it automatically chose php5.6 - creating php-fpm pool config file in /etc/php/5.6/fpm/pool.d/152179214018224.conf.

I would like to select PHP 7.2 for virtual server - is there a way to do this? Or I have to do it manually moving /etc/php/5.6/fpm/pool.d/152179214018224.conf -> /etc/php/7.2/fpm/pool.d/152179214018224.conf?

How can I force Virtualmin to use PHP version selected under Default PHP version in server template? Now it automatically selects PHP 5.6 disregarding this setting...

Mon, 08/20/2018 - 04:05
kpendic

Inside Virtualmin tab and under your server, just go to Server Configuration -> PHP Versions and choose what is the main php version for that domain. You also have posibility to choose per directory alternating version :)

Mon, 08/20/2018 - 04:58
Jfro

IS it not so only one version for using PHP FPM is possible at virtualmin for the moment?

Also your ubunu version is older so maybe don't have right possibilties for now if possible at all? https://www.virtualmin.com/node/58374 https://www.virtualmin.com/node/53833

Mon, 08/20/2018 - 05:40
kpendic

NO, why should you only be able to run only one version of php?

If you do like I described in first answer you should be able to end up with two php wrappers on php if looking in processes tree (something like me, two domains using diff php ver)

Mon, 08/20/2018 - 05:55
Jfro

I mean only one in fpm mode ! So it was with virtualmin. If it stil is you can search the web i suggest or ask virtualmin support. ( if using virtualmin repos and non nginx

edit : https://www.virtualmin.com/comment/771632#comment-771632

ubmitted by JamieCameron on Sat, 02/18/2017 - 02:09 Comment #1

Right now, Virtualmin only supports a single PHP version when using FPM mode - and that will be the version used by the distro-provided FPM package.

...


Submitted by andreychek on Fri, 04/21/2017 - 19:43 Comment #6

Sorry not yet, it might be some time before we're able to do that. There's still some FPM issues we're working through in the current release, and a number of neat new features for the upcoming release we're working on as well.

Also, note that we don't officially support third party repos due to problems we've seen with them.

However, one of the things we're going to look into is doing this through the SCL repo -- and that same feature could be used for folks using REMI (even if that's not a repo we officially support).

....


Submitted by JamieCameron on Wed, 03/07/2018 - 06:15 Comment #8

The current state is that only one PHP-FPM version is supported at a time, and that isn't necessarily the default PHP install on the system - it's just whichever one has the FPM packages installed.

....
also


Submitted by JamieCameron on Thu, 04/12/2018 - 01:55 Comment #13

You could just delete the /etc/php/*/fpm directories for the versions you don't want.

https://www.virtualmin.com/node/56747

https://www.virtualmin.com/node/55788

Submitted by JamieCameron on Wed, 07/04/2018 - 20:48 Comment #14

Right, multiple FPM version support is still in the works.
Topic locked