How To Install Php 5 On Centos

Active1 year, 11 months ago
  1. Install Php5 Centos 7
  2. How To Install Php On Ubuntu
  3. How To Install Php Centos
  4. How To Install Php 5 On Centos Download
  5. How To Install Php On Centos
  6. How To Install Centos 6.9

LAMP stack is a group of open source software used to get web servers up and running. The acronym stands for Linux, Apache, MySQL, and PHP. Since the server is already running CentOS, the linux part is taken care of. Here is how to install the rest. The steps in this tutorial require the user on the. PHP 7 is a huge revolution in the PHP world. Bringing up to 100% speed gain under certain workloads. Still, PHP 7 adoption is not as widespread as it should. As a matter of fact CentOS 7 still uses PHP 5.4, although it’s safe, with some tricks you can install PHP 7 and enjoy all of its benefits on CentOS 7. As a matter of fact CentOS 7 still uses PHP 5.4, although it’s safe, with some tricks you can install PHP 7 and enjoy all of its benefits on CentOS 7. A foreword PHP 7 is great, fast and absolutely one of the best re-engineering a language has ever seen.

I have a Centos 7 server running apache 2.4.6 and php 5.4. I'm trying to install Magento 2 on my server for a client but am having issues. I need to have PHP 5.5 or 5.6 installed on my server for. PHP 5.5 on CentOS/RHEL 7.2, 6.8 and 5.11 via Yum Webtatic has now ended support for PHP 5.5, and suggests either: Upgrade RHEL/CentOS to 7.2, so that you can install php 5.4.16, which is still supported by those distributions. There is more than one way to upgrade CentOS 6 to PHP 5.5; the following is a suggestion only. Consult a reference for additional options. To install PHP 5.5 on CentOS 6.

I have a Centos 7 server running apache 2.4.6 and php 5.4. I'm trying to install Magento 2 on my server for a client but am having issues.

I need to have PHP 5.5 or 5.6 installed on my server for Magento 2 to run. I cannot figure out how to upgrade to PHP 5.5 or PHP 5.6.

I don't know the difference between the two versions, so I'll take whatever I can get working !

Thanks :)

Brandon StewartBrandon Stewart
3122 gold badges5 silver badges23 bronze badges
How to install php on mac

3 Answers

This is the procedure for PHP 5.6.

I was able to upgrade PHP 5.4.16 on CENTOS7 to version 5.6.25 with these simple steps. Free download driver printer epson l210 for windows 7 64 bit. Important to note that i used the Software Collection Repositories.

1- Install All these new packages:

  • yum install centos-release-scl
  • yum install rh-php56
  • yum install rh-php56-php
  • yum install rh-php56-php-pdo
  • yum install rh-php56-php-devel
  • yum install rh-php56-php-mysql
  • yum install rh-php56-php-fpm

2- Make apache 2.4 use php-fpm

Edit that file: /etc/httpd/conf.d/php.confPut that content:

3- Reboot services to handle php-fpm:

  • systemctl restart rh-php56-php-fpm
  • systemctl restart httpd

4- Enabling rh-php56-php-fpm service on boot time

  • systemctl enable rh-php56-php-fpm
  • systemctl enable httpd

Install Php5 Centos 7

5- Create a symlink for the new php version.

  • mv /usr/bin/php /usr/bin/phpOLD
  • ln -s /opt/rh/rh-php56/root/bin/php /usr/bin/php
Sebastien FilionSebastien Filion

Run this in your terminal:wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpmwget http://rpms.famillecollet.com/enterprise/remi-release-7.rpmrpm -Uvh remi-release-7*.rpm epel-release-7*.rpm

Then :sudo yum install php php-gd php-mysql php-mcrypt

and you should have php 5.5

Nikolay NikolovNikolay Nikolov

Steps (Use sudo only if required)

1) Remove OLD Apache

2) Remove OLD PHP

if it´s a clean installation start from here:

3) Install PHP 5.6 (Apache 2.4 will be automatically installed with this)

4) Make sure all the required PHP extensions are installed

5) If not then install them using

6) To list the other available php extensions

7) PHP 5.6 MySQL extension (Assume you have already installed MySQL)

(NOTE: it is not php56-mysql)

8) Start / Restart Apache

How To Install Php On Ubuntu

9) Check the version

MCSellMCSell

Not the answer you're looking for? Browse other questions tagged centos7php-5.5 or ask your own question.

Active6 years, 10 months ago

I am setting up a staging server using CentOS and need to install PHP 5.3 to mirror my production server. Using the standard yum install php I'm sure will give me 5.4 - I've had a look and can't figure out how to specify a version number to install. Can anyone advise? Many thanks.

bsod99bsod99

1 Answer

To specify a version you do:

This assumes that php-5.3.3-14 is available in the repos that your staging server. To see available php versions do:

or yum search php and peruse the list it gives you. I am on a CentOS6 box right now and it comes with php-5.3.3-14.

How To Install Php Centos

I am assuming you are on Fedora since you mention php 5.4. Would it not be more advisable if you build your staging server with the same OS and repo sources as your production?

I think folks will be able to help you more if you state what OS versions and packages and what repositories are available to your production server. I might be wrong but i think that php rpms must also match the apache they are built for as a module.

Scott Pack

How To Install Php 5 On Centos Download

13.5k8 gold badges45 silver badges82 bronze badges

How To Install Php On Centos

jnvilojnvilo

How To Install Centos 6.9

Not the answer you're looking for? Browse other questions tagged phpcentosyum or ask your own question.

Comments are closed.