How To Install Php 5 On Centos

  
  1. Install Php 5.6 Centos 7
Active2 years, 3 months ago

When I run yum install php php-devel php-mysql php-gd php-mbstring, it will install php5.3.

I just removed it yum remove php php-cli php-common php-devel php-gd php-mbstring php-mysql php-pdo.

  1. 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.
  2. In this article, I’m going to show you how to upgrade PHP 5.3 to PHP 5.5 CentOS 6.7. This article assumes you have a stock installation of CentOS, and that you already have PHP 5.3 installed 1.
  3. Sudo yum install php php-gd php-mysql php-mcrypt As you can see PHP is installing version 5.5.20-2.el6.remi from the remi-php55 repo! Once you have hit Y to confirm the install restart apache and magical unicorns you have a better version of PHP!

How to install Apache, PHP 7.2 and MySQL on CentOS 7.4 (LAMP). The PHP version that ships with CentOS as default is quite old (PHP 5.4). Therefore I will show you.

And I tried yum install php56w php56w-devel php56w-mysql php56w-gd php56w-mbstring, but they are not available.

How can I install php5.6 on CentOS 6?

shinshin
2153 gold badges7 silver badges15 bronze badges

4 Answers

you would add repo into centos 6 by:

Next,

I hope help you!

GLifeGLife

CentOS now offers Software Collections (SCL) as a repo installable from base:

Once you've installed the SCL repo, you can install php 5.6:

The CentOS documentation is slightly dated as is the Red Hat Documentation, but newer versions of php, PostgreSQL, MariaDB, MySQL, perl, ruby, etc. are available. It's also available on CentOS and RHEL 7 and is theoretically better integrated with the OS. The notes say that adding packages through SCL won't interfere with the system's utilities, such as yum.

To make the SCL version of PHP the default on the command line, run the following as root to add to the default profile:

This makes using pear to add PHP packages easier by setting $PATH to include /opt/rh/rh-php56/root/..

LiczyrzepaLiczyrzepa

You can use REMI's repository

HP will transfer your name and address information, IP address, products ordered and associated costs and other personal information related to processing your application to Bill Me Later®. Hp laserjet 6p driver for windows 7.

To enable it, follow these steps:

  1. yum install http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  2. edit /etc/yum.repos.d/remi.repo and, under then [remi-php56] tag, set enabled=1
  3. yum install php

Please note that, doing that, you will update the system-wide php package to the 5.6 version. If you need, for some reason, install PHP 5.6 alongside the older, CentOS-distributed relase, you had to do a more complex side-by-side installation.

shodanshokshodanshok
28.8k3 gold badges52 silver badges99 bronze badges
CrisMCrisM

Install Php 5.6 Centos 7

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