This article describes how to install PHP 5.6 on a CentOS 6 or CentOS 7 server

Access the terminal (as root) and run the commands below, according to the version of your system:

CentOS/RHEL 7.x:

```
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmrpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
```

CentOS/RHEL 6.x:

```
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
```

Installing PHP 5.6:

```
yum install php56w php56w-cli php56w-common php56w-devel php56w-mbstring php56w-pecl-imagick php56w-xml 
```

Enabling PHP extensions :

Firebird/Interbase:

```
yum install php56w-interbase
```

Ldap Module:

```
yum install php56w-ldap
```

GD Module:

```
yum install php56w-gd
```

MySQL:

```
yum install php56w-mysql php56w-mysqlnd
```

MSSQL Server:

```
yum install php56w-mssql
```

ODBC:

```
yum install php56w-odbc
```

PDO:

```
yum install php56w-pdo
```

PostgreSQL:

```
yum install php56w-pgsql
```

Restart apache:

```
service httpd restart
```