Upgrading from PHP 5.3 to PHP 5.5 (Nginx configuration)

I run Centos 6.4 with Nginx via webmin module and PHP 5.3.
The nginx module uses FastCGI as default.

I would like to upgrade to PHP 5.5 with PHP-FPM as processing.

How can i do this without breaking anything?

Howdy,

Well, the supported way to use Nginx with Virtualmin is to use FCGID… though if I recall correctly there are some who said they did manage to get things working with PHP-FPM.

I was about to say that there wasn’t a way to upgrade to PHP 5.5, but that may not be entirely correct! I was reviewing these instructions here for setting up multiple PHP versions:

https://www.virtualmin.com/documentation/web/multiplephp

And it seems that the repository recently added PHP 5.5 as one of the options.

So, you could follow those instructions, but use this 5.5 repository rather than the 5.4 one described above:

http://people.redhat.com/rcollet/php55/

Okay so i have two versions of PHP now installed. How do i switch an existing Nginx virtual account to use PHP 5.5 now? What steps do i need to do?

Tnx

I don’t have Nginx on any of my test systems, though I was hoping that the instructions for moving it to use a different PHP version would be similar as the instructions for Apache.

Are you saying that you’re not seeing any options described in the documentation for switching to one of the alternate PHP versions?

Specifically, the place I’d start is in Server Configuration -> PHP Versions.

-Eric

No unfortunately i didnt find any option that would switch between two versions. Google didnt help either.

Going to “PHP Versions” i get this: “Website options cannot be edited, as no Apache virtual host for arcadena.com port 80 was found!”

Apache is turned off and i use Nginx on port 80 instead since Nginx is so much faster.

Okay, unfortunately, it sounds like you discovered a difference in the support of Apache and Nginx then. It sounds as if there isn’t support for changing PHP versions using Nginx.

I’ll talk to Jamie about adding that feature, but that’ll take some time to add in.

-Eric

Ok so i have to ask, what exactly would happen if i completely replaced PHP 5.3 with PHP 5.5 doing the YUM upgrade or similar command?

Howdy,

Well, the only way to do that would be to use a third party repository… and doing that isn’t something we recommend :slight_smile:

Some folks do it, and are able to make it work, but there’s often some sort of problem associated with doing that.

That said, most of the problems we’re familiar with are related to PHP on systems running Apache, I’m not sure what to expect with Nginx :slight_smile:

There’s some thoughts on that issue here in the section “Why does PHP / ProFTPd no longer work after performing updates? (I’m using CentOS, and enabled third party repositories)”:

https://www.virtualmin.com/documentation/system/faq