What version of php comes with RHEL 7

Latest response

I was required by our IT department to use RHEL 7 on a new WebServer.
We are going to use php and mariadb.
I have an application that I want to run PHP PRO and it requires PHP 5.5.

Can I update to php 5.6 on RHEL 7 safely.

Will the following work?
https://access.redhat.com/solutions/2705621

Please advise. Our server is not live yet so I have not registered RHEL 7

Thank You,
Craig

Responses

Hi,

RHEL 7 comes with PHP 5.4.16 from the rhel-7-server-rpms repo. But you could follow the steps from the KB 2705621 to get PHP 5.6 from the Red Hat Software Collections. You could get PHP 7.0 from there, too.

Best regards, Joerg

Thanks for the lines! This will help a lot with 9ur development. We can use PHP PDO.

jumping on the post, can you go php 5.4>7 or do I need to update to php 5.6 then to 7 I cannot seem to find anywhere that clarifies thanks

Hi, Have a look at:

With the information provided in both articles you should be able to run PHP 7 in RHEL 7.

Thanks for the line. I definitely want to make the jump to PHP & . I am running it on Gentoo. I tried to add the repo with no luck. "subscription-manager repos --enable rhel-server-rhscl-7-rpms" Error: 'rhel-server-rhscl-7-rpms' does not match a valid repository ID

I'll read through the dock. Could you throw me a bone on how to include the proper repo.

This is all I have from

yum.repos.d]# ls -l total 52 -rw-r--r--. 1 root root 191 Apr 1 2015 dell-preinstall.repo -rw-r--r-- 1 root root 46396 Mar 15 09:08 redhat.repo [root@tritechsc yum.repos.d]#

Hello - I'm new to linux overall. I install RHEL 7.3 onto my server as well as webmin. All appears to function correctly, just need to config the web server - php, mysql, etc. (Note: While I am new to Linux, I have windows server and mac server experience)

But along with my initial installation of RHEL 7.3 - I installed php 5.4 group package. I found this page and successfully installed php 5.6 (I think) following the instructions on KB 2705621.

Should I have uninstalled php 5.4 first and then installed php 5.6? I did not do an update - I followed the instructions within KB 2705621 and got no errors nor warnings. But before I proceed - I wanted to ask.

Hi, I have just installed php 7 from redhat collections my original version was 5.4 redhat support advised I did not need to do anything about the previous version. Although if you used redhat collections you will need to make it permanent by following https://access.redhat.com/solutions/527703

I tried to install php7 with no luck. I can not find the right repository. How did you install it?

These are the only repos I have: dell-preinstall.repo redhat.repo

Thanks:

Hi Craig I used the command above,

subscription-manager repos --enable rhel-server-rhscl-7-rpms

worked fine for me, Is your system checking in ok to subscription manager with a valid subscription? I didn't get any errors although I did do all security updates first and went to RedHat 7.3 (from 7.2) but I doubt that makes a difference. Regards Emma

sorry Craig, just read an older post your system has to be registered to subscription manager in order to enable the repo ;-)

"Is your system checking in ok to subscription manager with a valid subscription?"
I registered my system via command line.

How do I do this?: "sorry Craig, just read an older post your system has to be registered to subscription manager in order to enable the repo ;-)"

I followed this: https://access.redhat.com/solutions/253273 I registered my system following the above link.
I can install packages and updated my system with a yum update;

I might need to do a bit more to get the php7 repo.

Thanks for the help and for being patient.

My last Redhat machine was an ES4 server.

Thanks! - glad you mentioned the part about making it permanent. Would have never thought that the optional software collections I enabled as part of the installation process would have been temporary. Thanks for the heads up. Is this a must-do every time?

Follow KB 2705621 and then KB 727703

No problem :-) I believe so, its a work around anything installed via RHSC will need to follow these steps as it will be lost at change of user or log out.

couldn't get this at all>

I managed to upgrade php fro 5.6 using software collections. Below are my notes :

https://www.redhat.com/wapps/try/RHSCL to request access to rhscl software.

To identify available subscription pools for Red Hat Enterprise Linux Server use the command: subscription-manager list --available | grep -A8 "Red Hat Enterprise Linux"

                 Red Hat Enterprise Linux Server
                 dotNET on RHEL (for RHEL Server)
                 Red Hat Software Collections Beta (for RHEL Server)

SKU: RH0156864F3RN Contract: 10325192 Pool ID: lkdjfljsdlffjlasdjflkasdflkfaf Provides Management: Yes Available: 1 Suggested: 1

subscription-manager subscribe --pool=

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.