• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install PHP 5.6 on CentOS 6.9

{{postValue.id}}

To install PHP 5.6 on CentOS 6.9

PHP is a popular general-purpose scripting language mostly used for the web development. Since it is fast, flexible and pragmatic, PHP is capable of powering everything from your blog to the most popular websites in the world. This tutorial covers the installation procedure of PHP 5.6 on CentOS 6.9.

Installation procedure

To start with the installation procedure, add the required repositories by running the following commands.

[root@linuxhelp ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
warning: /var/tmp/rpm-tmp.o8ubzh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

[root@linuxhelp ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
warning: /var/tmp/rpm-tmp.m52Pqb: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY
Preparing...                ########################################### [100%]
   1:webtatic-release       ########################################### [100%]

After adding your repositories, install PHP 5.6 using yum command and execute it.

[root@linuxhelp ~]# yum install php56w php56w-opcache
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
epel/metalink                                                                                                                                  | 6.2 kB     00:00     
 * base: ftp.iitm.ac.in
 * epel: ftp.jaist.ac.jp
 * extras: ftp.iitm.ac.in
 * updates: ftp.iitm.ac.in
 * webtatic: sp.repo.webtatic.com
base                                                                                                                                           | 3.7 kB     00:00     
epel                                                                                                                                           | 4.3 kB     00:00     
epel/primary_db                                                                                                                                | 5.9 MB     00:00     
extras                                                                                                                                         | 3.4 kB     00:00     
updates                                                                                                                                        | 3.4 kB     00:00     
updates/primary_db                                                                                                                             | 3.6 MB     00:00     
webtatic                                                                                                                                       | 3.6 kB     00:00     
webtatic/primary_db                                                                                                                            | 118 kB     00:00  
.
.
.
.
Installing : php56w-5.6.31-1.w6.x86_64                                                                                                                          3/4 
  Installing : php56w-opcache-5.6.31-1.w6.x86_64                                                                                                                  4/4 
  Verifying  : php56w-cli-5.6.31-1.w6.x86_64                                                                                                                      1/4 
  Verifying  : php56w-opcache-5.6.31-1.w6.x86_64                                                                                                                  2/4 
  Verifying  : php56w-5.6.31-1.w6.x86_64                                                                                                                          3/4 
  Verifying  : php56w-common-5.6.31-1.w6.x86_64                                                                                                                   4/4 

Installed:
  php56w.x86_64 0:5.6.31-1.w6                                                   php56w-opcache.x86_64 0:5.6.31-1.w6                                                  

Dependency Installed:
  php56w-cli.x86_64 0:5.6.31-1.w6                                                  php56w-common.x86_64 0:5.6.31-1.w6                                                 

Complete!

The PHP has been installed successfully. To see the version of the installed PHP. Run the following command.

[root@linuxhelp ~]# php -v
PHP 5.6.31 (cli) (built: Jul  7 2017 06:44:24) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

To list the modules in PHP, execute the following command as follows.

[root@linuxhelp ~]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Thus the installation procedure of PHP 5.6 on CentOS 6.9 is done without any glitches.

Tags:
connor
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

How does PHP compiler work?

A

PHP interpreter works done by the Zend engine. ... The PHP script is loaded into memory by the Zend engine and compiled into Zend opcodes. Opcodes (short for Operation codes) are low-level binary instructions. This opcode is executed and HTML is generated for the same.

Q

Can you tell me the procedure to install PHP 5.6 on Ubuntu?

A

Please refer the link as follow "https://www.linuxhelpbkp.revyy.com/how-to-install-php-5-6-on-centos-6-9/"

Q

Why is PHP an interpreted language?

A

The PHP language is interpreted. The binary that lets you interpret PHP is compiled, but what you write is interpreted. Both. PHP is compiled down to an intermediate bytecode that is then interpreted by the runtime engine.

Q

I have installed PHP without errors, but when I try to start Apache I get undefined symbol errors?

A

# apachectl configtest
This has actually nothing to do with PHP, but with the MySQL client libraries. Some need --with-zlib , others do not. This is also covered in the MySQL FAQ.

Q

What is Zend Engine?

A

The Zend Engine is the open source scripting engine that interprets the PHP programming language.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.