How to upgrade PHP on LINUX


Step 1: uninstall httpd

yum remove httpd*

Sample output:

[root@tutorialspots ~]# yum remove httpd*
Loaded plugins: fastestmirror, protectbase
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package httpd-tools.i386 0:2.2.22-1 set to be erased
---> Package httpd.i386 0:2.2.22-1 set to be erased
--> Processing Dependency: httpd-mmn = 20051115 for package: mod_ssl
--> Processing Dependency: httpd = 2.2.22-1 for package: mod_ssl
--> Running transaction check
---> Package mod_ssl.i386 1:2.2.22-1 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch         Version               Repository         Size
================================================================================
Removing:
 httpd               i386         2.2.22-1              installed         8.6 M
 httpd-tools         i386         2.2.22-1              installed         234 k
Removing for dependencies:
 mod_ssl             i386         1:2.2.22-1            installed         723 k

Transaction Summary
================================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       3 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : mod_ssl                                           [1/3]
  Erasing        : httpd                                             [2/3]
warning: /etc/httpd/conf/httpd.conf saved as /etc/httpd/conf/httpd.conf.rpmsave
  Erasing        : httpd-tools                                       [3/3]

Removed: httpd.i386 0:2.2.22-1 httpd-tools.i386 0:2.2.22-1
Dependency Removed: mod_ssl.i386 1:2.2.22-1
Complete!

<strong>Step 2: Uninstall all PHP installed</strong>
1yum remove $(yum list installed | grep "php" | awk '{print $1}')

Sample Output:

[root@tutorialspots ~]# yum remove $(yum list installed | grep "php" | awk '{print $1
}')
Loaded plugins: fastestmirror, protectbase
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package php-pear.noarch 1:1.4.9-8.el5 set to be erased
---> Package php-xml.i386 0:5.2.17-37 set to be erased
---> Package php-devel.i386 0:5.2.17-37 set to be erased
---> Package php-common.i386 0:5.2.17-37 set to be erased
---> Package php-mysql.i386 0:5.2.17-37 set to be erased
---> Package php.i386 0:5.2.17-37 set to be erased
---> Package php-gd.i386 0:5.2.17-37 set to be erased
---> Package php-mcrypt.i386 0:5.2.17-37 set to be erased
---> Package php-imap.i386 0:5.2.17-37 set to be erased
---> Package php-cli.i386 0:5.2.17-37 set to be erased
---> Package php-mbstring.i386 0:5.2.17-37 set to be erased
---> Package php-soap.i386 0:5.2.17-37 set to be erased
---> Package php-pdo.i386 0:5.2.17-37 set to be erased
---> Package lxphp.i386 0:5.2.1-400 set to be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package             Arch          Version               Repository        Size
================================================================================
Removing:
 lxphp               i386          5.2.1-400             installed         15 M
 php                 i386          5.2.17-37             installed        3.0 M
 php-cli             i386          5.2.17-37             installed        5.8 M
 php-common          i386          5.2.17-37             installed        738 k
 php-devel           i386          5.2.17-37             installed        2.7 M
 php-gd              i386          5.2.17-37             installed        358 k
 php-imap            i386          5.2.17-37             installed         96 k
 php-mbstring        i386          5.2.17-37             installed        1.8 M
 php-mcrypt          i386          5.2.17-37             installed         32 k
 php-mysql           i386          5.2.17-37             installed        171 k
 php-pdo             i386          5.2.17-37             installed        108 k
 php-pear            noarch        1:1.4.9-8.el5         installed        1.8 M
 php-soap            i386          5.2.17-37             installed        320 k
 php-xml             i386          5.2.17-37             installed        272 k

Transaction Summary
================================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove      14 Package(s)

Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing        : php-pdo                                         [ 1/14]
  Erasing        : php-gd                                          [ 2/14]
  Erasing        : php-soap                                        [ 3/14]
  Erasing        : php-xml                                         [ 4/14]
  Erasing        : php-pear                                        [ 5/14]
  Erasing        : php-mysql                                       [ 6/14]
  Erasing        : php-mbstring                                    [ 7/14]
  Erasing        : lxphp                                           [ 8/14]
  Erasing        : php-common                                      [ 9/14]
warning: /etc/php.ini saved as /etc/php.ini.rpmsave
  Erasing        : php-imap                                        [10/14]
  Erasing        : php                                             [11/14]
  Erasing        : php-mcrypt                                      [12/14]
  Erasing        : php-cli                                         [13/14]
  Erasing        : php-devel                                       [14/14]

Removed: lxphp.i386 0:5.2.1-400 php.i386 0:5.2.17-37 php-cli.i386 0:5.2.17-37 ph
p-common.i386 0:5.2.17-37 php-devel.i386 0:5.2.17-37 php-gd.i386 0:5.2.17-37 php
-imap.i386 0:5.2.17-37 php-mbstring.i386 0:5.2.17-37 php-mcrypt.i386 0:5.2.17-37
 php-mysql.i386 0:5.2.17-37 php-pdo.i386 0:5.2.17-37 php-pear.noarch 1:1.4.9-8.e
l5 php-soap.i386 0:5.2.17-37 php-xml.i386 0:5.2.17-37
Complete!

Note: if you use KLOXO, you will see

---> Package lxphp.i386 0:5.2.1-400 set to be erased

Now you must reinstall lxphp:

yum install lxphp.i386

Sample Output:

[root@tutorialspots ~]# yum install lxphp.i386
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile
 * epel: linux.mirrors.es.net
 * updates: mirror.pac-12.org
 * base: mirror.keystealth.org
 * addons: mirror.chpc.utah.edu
 * extras: mirrors.easynews.com
0 packages excluded due to repository protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package lxphp.i386 0:5.2.1-400 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package       Arch         Version              Repository                Size
================================================================================
Installing:
 lxphp         i386         5.2.1-400            lxcenter-updates         5.7 M

Transaction Summary
================================================================================
Install      1 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 5.7 M
Is this ok [y/N]: y
Downloading Packages:
lxphp-5.2.1-400.i386.rpm                                 | 5.7 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : lxphp                                             [1/1]

Installed: lxphp.i386 0:5.2.1-400
Complete!

Step 3: Verify which version of httpd and php must install

yum list |grep httpd

Sample output:

[root@tutorialspots ~]# yum list |grep httpd
lxlighttpd.i386                       1.4.29-1                installed
httpd.i386                            2.2.27-2                lxcenter-updates
httpd-devel.i386                      2.2.27-2                lxcenter-updates
httpd-manual.i386                     2.2.27-2                lxcenter-updates
httpd-tools.i386                      2.2.27-2                lxcenter-updates
iipsrv-httpd-fcgi.i386                1.0.0-0.7.git0b63de7.el5
libmicrohttpd.i386                    0.9.22-1.el5            epel
libmicrohttpd-devel.i386              0.9.22-1.el5            epel
libmicrohttpd-doc.i386                0.9.22-1.el5            epel
lighttpd.i386                         1.4.37-1.el5            epel
lighttpd-fastcgi.i386                 1.4.37-1.el5            epel
lighttpd-mod_geoip.i386               1.4.37-1.el5            epel
lighttpd-mod_mysql_vhost.i386         1.4.37-1.el5            epel
lxlighttpd.i386                       1.4.32-1                lxcenter-updates
mantis-config-httpd.noarch            1.2.19-3.el5            epel
mirmon-httpd.noarch                   2.9-1.el5               epel
system-config-httpd.noarch            5:1.3.3.3-1.el5         base
thttpd.i386                           2.25b-12.el5.1          epel
web-assets-httpd.noarch               5-2.el5                 epel

We can see httpd.i386

For PHP:

yum list |grep php
[root@tutorialspots ~]# yum list |grep php
graphviz-php.i386                     2.12-10.el5             epel
hypervm-core-php.i386                 5.5.23-1                lxcenter-updates
kloxo-core-php.i386                   5.3.28-2                lxcenter-updates
lxphp.i386                            5.2.1-400               lxcenter-updates
mod_suphp.i386                        0.7.1-1.el5.rf          lxcenter-updates
nntpgrab-php.i386                     0.7.2-1.el5             epel
php.i386                              5.2.17-37               lxcenter-updates
php-IDNA_Convert.noarch               0.8.0-1.el5             epel
php-PHPMailer.noarch                  5.0.2-3.el5             epel
php-Smarty.noarch                     2.6.27-1.el5            epel
php-ZendFramework.noarch              1.12.13-2.el5           epel
php-ZendFramework-Auth-Adapter-Ldap.noarch
php-ZendFramework-Cache-Backend-Apc.noarch
php-ZendFramework-Cache-Backend-Libmemcached.noarch
php-ZendFramework-Cache-Backend-Memcached.noarch
php-ZendFramework-Captcha.noarch      1.12.13-2.el5           epel
php-ZendFramework-Db-Adapter-Firebird.noarch
php-ZendFramework-Db-Adapter-Mysqli.noarch
php-ZendFramework-Db-Adapter-Pdo.noarch
php-ZendFramework-Db-Adapter-Pdo-Mssql.noarch
php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch
php-ZendFramework-Db-Adapter-Pdo-Pgsql.noarch
php-ZendFramework-Dojo.noarch         1.12.13-2.el5           epel
php-ZendFramework-Feed.noarch         1.12.13-2.el5           epel
php-ZendFramework-Ldap.noarch         1.12.13-2.el5           epel
php-ZendFramework-Pdf.noarch          1.12.13-2.el5           epel
php-ZendFramework-Search-Lucene.noarch
php-ZendFramework-Services.noarch     1.12.13-2.el5           epel
php-ZendFramework-Soap.noarch         1.12.13-2.el5           epel
php-ZendFramework-demos.noarch        1.12.13-2.el5           epel
php-ZendFramework-extras.noarch       1.12.13-2.el5           epel
php-ZendFramework-full.noarch         1.12.13-2.el5           epel
php-adodb.noarch                      4.95-1.a.el5            epel
php-bcmath.i386                       5.2.17-37               lxcenter-updates
php-channel-htmlpurifier.noarch       1.0-2.el5               epel
php-channel-pearplex.noarch           1.3-2.el5               epel
php-channel-phpunit.noarch            1.0-2.el5               epel
php-cli.i386                          5.2.17-37               lxcenter-updates
php-common.i386                       5.2.17-37               lxcenter-updates
php-dba.i386                          5.2.17-37               lxcenter-updates
php-dbase.i386                        5.2.17-1                lxcenter-updates
php-debuginfo.i386                    5.2.17-37               lxcenter-updates
php-devel.i386                        5.2.17-37               lxcenter-updates
php-domxml-php4-php5.noarch           1.21.2-1.el5            epel
php-eaccelerator.i386                 5.2.17_0.9.6.1-1        lxcenter-updates
php-email-address-validation.noarch   0-0.3.20090910svn.el5   epel
php-embedded.i386                     5.2.17-37               lxcenter-updates
php-facedetect.i386                   1.0.0-2.el5             epel
php-feedcreator.noarch                1.7.2-3.el5             epel
php-fpdf.noarch                       1.6-4.el5               epel
php-fpdf-doc.noarch                   1.6-4.el5               epel
php-fpm.i386                          5.2.17-37               lxcenter-updates
php-gd.i386                           5.2.17-37               lxcenter-updates
php-geshi.noarch                      1.0.8.11-3.el5          epel
php-htmLawed.noarch                   1.1.20-1.el5            epel
php-idn.i386                          1.2c-1.el5              epel
php-imap.i386                         5.2.17-37               lxcenter-updates
php-interbase.i386                    5.2.17-37               lxcenter-updates
php-layers-menu.noarch                3.2.0-0.2.rc.el5        epel
php-ldap.i386                         5.2.17-37               lxcenter-updates
php-libdmtx.i386                      0.7.2-3.el5             epel
php-libpuzzle.i386                    0.11-5.el5              epel
php-magickwand.i386                   0.1.9-2.el5             epel
php-mapi.i386                         7.1.14-1.el5            epel
php-mapserver.i386                    5.2.1-2.el5.kb          kbs-CentOS-Testing
php-markdown.noarch                   1.0.1p-1.el5            epel
php-mbstring.i386                     5.2.17-37               lxcenter-updates
php-mcrypt.i386                       5.2.17-37               lxcenter-updates
php-mhash.i386                        5.2.17-37               lxcenter-updates
php-mssql.i386                        5.2.17-37               lxcenter-updates
php-mysql.i386                        5.2.17-37               lxcenter-updates
php-ncurses.i386                      5.2.17-37               lxcenter-updates
php-nusoap.noarch                     0.9.5-1.el5             epel
php-odbc.i386                         5.2.17-37               lxcenter-updates
php-pdo.i386                          5.2.17-37               lxcenter-updates
php-pear.noarch                       1:1.9.4-23              lxcenter-updates
php-pear-Auth-RADIUS.noarch           1.0.6-1.el5             epel
php-pear-Auth-SASL.noarch             1.0.4-1.el5             epel
php-pear-Benchmark.noarch             1.2.7-1.el5             epel
php-pear-CAS.noarch                   1.3.4-1.el5             epel
php-pear-Cache-Lite.noarch            1.7.5-1.el5             epel
php-pear-CodeGen.noarch               1.0.7-3.el5             epel
php-pear-CodeGen-PECL.noarch          1.1.3-3.el5             epel
php-pear-Console-CommandLine.noarch   1.1.3-3.el5             epel
php-pear-Console-Getargs.noarch       1.3.5-1.el5             epel
php-pear-Console-ProgressBar.noarch   0.5.2-0.2.beta.el5      epel
php-pear-Console-Table.noarch         1.1.1-1.el5             epel
php-pear-Crypt-Blowfish.noarch        1.0.1-1.el5             epel
php-pear-Crypt-CHAP.noarch            1.0.2-1.el5             epel
php-pear-DB.noarch                    1.7.13-1.el5.centos     extras
php-pear-DB-DataObject.noarch         1.8.12-1.el5            epel
php-pear-DB-DataObject-FormBuilder.noarch
php-pear-DB-QueryTool.noarch          1.1.2-1.el5             epel
php-pear-Date.noarch                  1.4.7-2.el5.centos      extras
php-pear-Date-Holidays.noarch         0.21.4-1.el5            epel
php-pear-Date-Holidays-USA.noarch     0.1.1-1.el5             epel
php-pear-Event-Dispatcher.noarch      1.1.0-1.el5             epel
php-pear-File.noarch                  1.2.2-1.el5.centos      extras
php-pear-File-Find.noarch             1.3.0-1.el5             epel
php-pear-File-Fstab.noarch            2.0.3-1.el5             epel
php-pear-File-Passwd.noarch           1.1.7-1.el5             epel
php-pear-File-SMBPasswd.noarch        1.0.3-1.el5             epel
php-pear-HTML-Common.noarch           1.2.5-1.el5             epel
php-pear-HTML-QuickForm.noarch        3.2.12-1.el5            epel
php-pear-HTML-QuickForm-ElementGrid.noarch
php-pear-HTML-QuickForm-advmultiselect.noarch
php-pear-HTML-Table.noarch            1.7.5-1.el5             epel
php-pear-HTML-Template-IT.noarch      1.3.0-2.el5             epel
php-pear-HTML_Template_PHPLIB.noarch  1.4.0-2.el5             epel
php-pear-HTTP.noarch                  1.4.0-7.el5             epel
php-pear-HTTP-Client.noarch           1.1.1-1.el5             epel
php-pear-HTTP-Request.noarch          1.4.4-1.el5             epel
php-pear-HTTP-Upload.noarch           0.9.1-2.el5             epel
php-pear-Image-Canvas.noarch          0.3.1-1.el5             epel
php-pear-Image-Color.noarch           1.0.3-1.el5             epel
php-pear-Image-Graph.noarch           0.8.0-1.el5             epel
php-pear-Image-GraphViz.noarch        1.2.1-4.el5             epel
php-pear-Image-Text.noarch            0.6.1-1.el5             epel
php-pear-Log.noarch                   1.12.7-1.el5            epel
php-pear-MDB2.noarch                  2.4.1-2.el5.centos      extras
php-pear-MDB2-Driver-mysql.noarch     1.4.1-3.el5.centos      extras
php-pear-MDB2-Driver-pgsql.noarch     1.4.1-1.el5             epel
php-pear-MDB2-Schema.noarch           0.8.0-2.el5             epel
php-pear-Mail.noarch                  1.1.14-5.el5.1          epel
php-pear-Mail-Mime.noarch             1.4.0-2.el5             epel
php-pear-Math-Stats.noarch            0.9.0-0.1.beta3.el5     epel
php-pear-Net-Curl.noarch              1.2.5-1.el5             epel
php-pear-Net-DIME.noarch              1.0.1-1.el5             epel
php-pear-Net-FTP.noarch               1.3.4-1.el5             epel
php-pear-Net-IMAP.noarch              1.1.3-1.el5             epel
php-pear-Net-POP3.noarch              1.3.7-1.el5             epel
php-pear-Net-Ping.noarch              2.4.5-1.el5             epel
php-pear-Net-SMTP.noarch              1.4.4-1.el5             epel
php-pear-Net-Sieve.noarch             1.3.4-1.el5             epel
php-pear-Net-Socket.noarch            1.0.10-1.el5            epel
php-pear-Net-Traceroute.noarch        0.21.3-1.el5            epel
php-pear-Net-URL.noarch               1.0.15-1.el5.centos     extras
php-pear-Net-URL-Mapper.noarch        0.9.0-2.el5.1           epel
php-pear-Net-URL2.noarch              0.3.0-1.el5             epel
php-pear-Net-UserAgent-Detect.noarch  2.5.2-1.el5             epel
php-pear-Numbers-Roman.noarch         1.0.2-2.el5             epel
php-pear-Numbers-Words.noarch         0.16.1-1.el5            epel
php-pear-OLE.noarch                   1.0.0-0.4.rc1.el5       epel
php-pear-PHP-CodeSniffer.noarch       1.2.2-1.el5             epel
php-pear-PHP-Compat.noarch            1.5.0-1.el5             epel
php-pear-PHP-CompatInfo.noarch        1.4.3-1.el5             epel
php-pear-PHPUnit.noarch               3.3.5-2.el5             epel
php-pear-Pager.noarch                 2.4.8-1.el5             epel
php-pear-Payment-Process.noarch       0.6.6-1.el5             epel
php-pear-PhpDocumentor.noarch         1.4.3-1.el5             epel
php-pear-PhpDocumentor-docs.noarch    1.4.3-1.el5             epel
php-pear-SOAP.noarch                  0.11.0-2.el5            epel
php-pear-Spreadsheet-Excel-Writer.noarch
php-pear-Structures-DataGrid.noarch   0.8.3-1.el5             epel
php-pear-Structures-DataGrid-DataSource-Array.noarch
php-pear-Structures-DataGrid-DataSource-DataObject.noarch
php-pear-Structures-DataGrid-DataSource-MDB2.noarch
php-pear-Structures-DataGrid-DataSource-RSS.noarch
php-pear-Structures-DataGrid-Renderer-Pager.noarch
php-pear-Text-CAPTCHA.noarch          0.4.4-1.el5             epel
php-pear-Text-Diff.noarch             1.1.0-1.el5             epel
php-pear-Text-Figlet.noarch           1.0.2-1.el5             epel
php-pear-Text-Password.noarch         1.1.1-1.el5             epel
php-pear-Validate.noarch              0.8.3-1.el5             epel
php-pear-Validate-Finance-CreditCard.noarch
php-pear-Var-Dump.noarch              1.0.3-2.el5             epel
php-pear-XML-Beautifier.noarch        1.1-3.el5               epel
php-pear-XML-Parser.noarch            1.2.8-1.el5             epel
php-pear-XML-RSS.noarch               1.0.0-1.el5             epel
php-pear-XML-SVG.noarch               1.1.0-2.el5             epel
php-pear-XML-Serializer.noarch        0.20.0-1.el5            epel
php-pear-XML-Util.noarch              1.1.4-3.el5             epel
php-pear-text-wiki.noarch             1.2.1-3.el5             epel
php-pecl-Fileinfo.i386                1.0.4-3.el5.centos      extras
php-pecl-apc.i386                     3.0.19-2.el5            epel
php-pecl-geoip.i386                   1.0.8-3.el5             epel
php-pecl-gmagick.i386                 1.1.0-0.2.RC2.el5       epel
php-pecl-imagick.i386                 2.2.1-3.el5             epel
php-pecl-json.i386                    1.2.1-4.el5             epel
php-pecl-lzf.i386                     1.6.2-2.el5             epel
php-pecl-memcache.i386                2.2.6-1.el5             epel
php-pecl-memcached.i386               1.0.0-1.el5             epel
php-pecl-mongo.i386                   1.0.10-4.el5            epel
php-pecl-radius.i386                  1.2.7-1.el5             epel
php-pecl-runkit.i386                  0.9-12.CVS20090215.el5  epel
php-pecl-xdebug.i386                  2.0.5-1.el5.1           epel
php-pecl-zip.i386                     1.8.10-3.el5            epel
php-pgsql.i386                        5.2.17-37               lxcenter-updates
php-php-gettext.noarch                1.0.11-12.el5           epel
php-phpunit-File-Iterator.noarch      1.1.1-2.el5             epel
php-process.i386                      5.2.17-37               lxcenter-updates
php-pspell.i386                       5.2.17-37               lxcenter-updates
php-readline.i386                     5.2.17-1                lxcenter-updates
php-recode.i386                       5.2.17-37               lxcenter-updates
php-simplepie.noarch                  1.1.3-3.el5             epel
php-snmp.i386                         5.2.17-37               lxcenter-updates
php-soap.i386                         5.2.17-37               lxcenter-updates
php-tidy.i386                         5.2.17-37               lxcenter-updates
php-voms-admin.noarch                 0.6.7-1.el5             epel
php-xcache.i386                       1:5.2.17-3.1.0          lxcenter-updates
php-xml.i386                          5.2.17-37               lxcenter-updates
php-xmlrpc.i386                       5.2.17-37               lxcenter-updates
php-zts.i386                          5.2.17-37               lxcenter-updates
php53.i386                            5.3.3-26.el5_11         updates
php53-bcmath.i386                     5.3.3-26.el5_11         updates
php53-cli.i386                        5.3.3-26.el5_11         updates
php53-common.i386                     5.3.3-26.el5_11         updates
php53-dba.i386                        5.3.3-26.el5_11         updates
php53-devel.i386                      5.3.3-26.el5_11         updates
php53-enchant.i386                    5.3.3-1.el5             epel
php53-gd.i386                         5.3.3-26.el5_11         updates
php53-imap.i386                       5.3.3-26.el5_11         updates
php53-interbase.i386                  5.3.3-1.el5             epel
php53-intl.i386                       5.3.3-26.el5_11         updates
php53-ldap.i386                       5.3.3-26.el5_11         updates
php53-mapi.i386                       7.1.14-1.el5            epel
php53-mbstring.i386                   5.3.3-26.el5_11         updates
php53-mcrypt.i386                     5.3.3-1.el5             epel
php53-mssql.i386                      5.3.3-1.el5             epel
php53-mysql.i386                      5.3.3-26.el5_11         updates
php53-odbc.i386                       5.3.3-26.el5_11         updates
php53-odbc64.i386                     5.3.3-2.el5             base
php53-pdo.i386                        5.3.3-26.el5_11         updates
php53-pgsql.i386                      5.3.3-26.el5_11         updates
php53-php-gettext.noarch              1.0.11-3.el5            epel
php53-process.i386                    5.3.3-26.el5_11         updates
php53-pspell.i386                     5.3.3-26.el5_11         updates
php53-recode.i386                     5.3.3-1.el5             epel
php53-simplepie.noarch                1.3.1-5.el5             epel
php53-snmp.i386                       5.3.3-26.el5_11         updates
php53-soap.i386                       5.3.3-26.el5_11         updates
php53-tcpdf.noarch                    6.2.8-1.el5             epel
php53-tcpdf-dejavu-lgc-sans-fonts.noarch
php53-tcpdf-dejavu-lgc-sans-mono-fonts.noarch
php53-tcpdf-dejavu-lgc-serif-fonts.noarch
php53-tcpdf-dejavu-sans-fonts.noarch  6.2.8-1.el5             epel
php53-tcpdf-dejavu-sans-mono-fonts.noarch
php53-tcpdf-dejavu-serif-fonts.noarch 6.2.8-1.el5             epel
php53-tcpdf-gnu-free-mono-fonts.noarch
php53-tcpdf-gnu-free-sans-fonts.noarch
php53-tcpdf-gnu-free-serif-fonts.noarch
php53-tidy.i386                       5.3.3-1.el5             epel
php53-xml.i386                        5.3.3-26.el5_11         updates
php53-xmlrpc.i386                     5.3.3-26.el5_11         updates
phpFlickr.noarch                      2.3.0.1-1.el5           epel
phpMyAdmin.noarch                     2.11.11.3-2.el5         epel
phpMyAdmin4.noarch                    4.0.10.11-1.el5         epel
phpPgAdmin.noarch                     5.0.4-1.el5             epel
phpdoc.noarch                         1.4.3-1.el5             epel
phpldapadmin.noarch                   1.2.3-1.el5             epel
phpwapmail.noarch                     0.9.4-1.el5             epel
remctl-php.i386                       3.9-2.el5               epel
rrdtool-php.i386                      1.2.27-4.el5            epel
syck-php.i386                         0.55-10.el5             epel
uuid-php.i386                         1.6.1-3.el5.kb          kbs-CentOS-Testing

We can see php53.i386

Step 4: install httpd and php

yum install httpd.i386 php53.i386

Sample output:

[root@tutorialspots ~]# yum install httpd.i386 php53.i386
Loaded plugins: fastestmirror, protectbase
Loading mirror speeds from cached hostfile
 * epel: linux.mirrors.es.net
 * updates: mirror.pac-12.org
 * base: mirror.keystealth.org
 * addons: mirror.chpc.utah.edu
 * extras: mirrors.easynews.com
0 packages excluded due to repository protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php53.i386 0:5.3.3-26.el5_11 set to be updated
--> Processing Dependency: php53-cli = 5.3.3-26.el5_11 for package: php53
--> Processing Dependency: php53-common = 5.3.3-26.el5_11 for package: php53
---> Package httpd.i386 0:2.2.27-2 set to be updated
--> Processing Dependency: httpd-tools = 2.2.27-2 for package: httpd
--> Running transaction check
---> Package httpd-tools.i386 0:2.2.27-2 set to be updated
---> Package php53-cli.i386 0:5.3.3-26.el5_11 set to be updated
---> Package php53-common.i386 0:5.3.3-26.el5_11 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package           Arch      Version                Repository             Size
================================================================================
Installing:
 httpd             i386      2.2.27-2               lxcenter-updates      3.4 M
 php53             i386      5.3.3-26.el5_11        updates               1.3 M
Installing for dependencies:
 httpd-tools       i386      2.2.27-2               lxcenter-updates      116 k
 php53-cli         i386      5.3.3-26.el5_11        updates               2.5 M
 php53-common      i386      5.3.3-26.el5_11        updates               609 k

Transaction Summary
================================================================================
Install      5 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 7.9 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): httpd-tools-2.2.27-2.i386.rpm                     | 116 kB     00:00
(2/5): php53-common-5.3.3-26.el5_11.i386.rpm             | 609 kB     00:00
(3/5): php53-5.3.3-26.el5_11.i386.rpm                    | 1.3 MB     00:00
(4/5): php53-cli-5.3.3-26.el5_11.i386.rpm                | 2.5 MB     00:00
(5/5): httpd-2.2.27-2.i386.rpm                           | 3.4 MB     00:00
--------------------------------------------------------------------------------
Total                                           3.8 MB/s | 7.9 MB     00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : php53-common                                      [1/5]
  Installing     : php53-cli                                         [2/5]
  Installing     : httpd-tools                                       [3/5]
  Installing     : httpd                                             [4/5]
  Installing     : php53                                             [5/5]

Installed: httpd.i386 0:2.2.27-2 php53.i386 0:5.3.3-26.el5_11
Dependency Installed: httpd-tools.i386 0:2.2.27-2 php53-cli.i386 0:5.3.3-26.el5_
11 php53-common.i386 0:5.3.3-26.el5_11
Complete!

Step 5: Reboot server

Done!, now we can use the new version of PHP

centos upgrade php

Some error can occur for Kloxo:

Error 1: Can't access website

You must edit your file domain.conf at /home/apache/conf/domains

Change

<VirtualHost\
	192.210.148.50:80\
	192.210.148.50:443\
>

	ServerName tutorialspots.com
	ServerAlias\
		www.tutorialspots.com

To

<VirtualHost 192.210.148.50:80 192.210.148.50:443 >

	ServerName tutorialspots.com
	ServerAlias www.tutorialspots.com

Now, restart apache.

1 Comment

Leave a Reply