how to I update the "second" php version on my server?

Hi, I followed your instructions to add a second version of php 5.5 to my centos 6.7 server running VM because a virtual host needed php 5.5. It worked fine.

Now the question is, how do I make updates and changes to that php version? When I run yum update on the server command line it seems to want to apply updates only to the baseline php version which is 5.3.

Also, and more important for me now, is I need to install the mcrypt libraries into the 5.5 version, but running "yum install php-mcrypt*" only tries to reinstall mcrypt into the 5.3 version?

My pressing need is to install mcrypt into the 5.5 version. How do I do this?

Thank you

Status: 
Active

Comments

Is this support request going to get any love?

Sorry somehow I missed this yesterday.

Are you using CentOS? If so, which CentOS version are you using?

Okay, just wanted to be sure (and now that I look again, I see you provided that information in your initial post as well).

As for your first question -- the documentation for installing multiple PHP versions sets up a new yum repository for that additional PHP version. So as they add updates, performing the usual system updates on your server will apply those updates.

As for your second question -- unfortunately, it doesn't appear that the mcrypt module is included as a part of that repository.

You can review the available packages here:

https://www.softwarecollections.org/repos/rhscl/php55/epel-6-x86_64/php5...

The EPEL repo sometimes has packages such as that, but I didn't an mcrypt package for PHP 5.5.

Would it be possible to use PHP 5.3, which does have a mcrypt module, for this particular app?

I have a temporary workaround for this using 5.3.3 and mcrypt, but my application Magento requires 5.5 or later and mcrypt is an essential module.

I found these instructions for updating php to 5.6 using another repos.

http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html

How can I apply these instructions to only the second installation of php? I think if I follow these instructions it will try to update the core version of php instead.

One of the reason we like the SCL repository, is that it's designed to only add new software, not replace existing software versions.

The repository has to be designed to work that way though.

While we haven't tested the one you're looking at, chances are that it will replace your existing PHP version, not add a new one. There isn't a way to change that, it's all about how the packages are built.

You could try it on a test server though to see if it works the way you need. Just be careful with third party repositories though, some alter the PHP config in a way that can break things. And we'd definitely recommend not installing packages that you don't need from it... just install the packages you require.