Centos Howto Upgrade to PHP 5.3 from 5.2

It's not as simple as "yum install" as you can see below and it doesn't stop there.

 yum install php53
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * rpmforge: mirror.us.leaseweb.net
 * extras: centos.mirror.rafal.ca
 * updates: centos.mirror.nexicom.net
 * base: centos.mirror.nexicom.net
 * addons: centos.mirror.nexicom.net
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php53.i386 0:5.3.3-22.el5_10 set to be updated
--> Processing Dependency: php53-cli = 5.3.3-22.el5_10 for package: php53
--> Processing Dependency: php53-common = 5.3.3-22.el5_10 for package: php53
--> Running transaction check
---> Package php53-cli.i386 0:5.3.3-22.el5_10 set to be updated
---> Package php53-common.i386 0:5.3.3-22.el5_10 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package php-common.i386 0:5.1.6-43.el5_10 set to be updated
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-mysql
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-cli
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-27.el5_5.3 for package: php-imap
--> Running transaction check
---> Package php-pdo.i386 0:5.1.6-43.el5_10 set to be updated
---> Package php-imap.i386 0:5.1.6-43.el5_10 set to be updated
---> Package php-mysql.i386 0:5.1.6-43.el5_10 set to be updated
---> Package php-cli.i386 0:5.1.6-43.el5_10 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-22.el5_10.i386 from updates has depsolving problems
  --> php53-common conflicts with php-common
Error: php53-common conflicts with php-common

Run what is below to avoid dependency hell that I decided not to paste.

yum -y install package-cleanup
package-cleanup --problems
package-cleanup --dupes
package-cleanup --orphans
rpm -Va --nofiles --nodigest
#this fixed it
yum clean all

This will require downtime but I couldn't fiind another way that worked:

 echo y|yum remove php-*;echo y|yum install php53*

yum -x php53-odbc64 install php53*


Stopping httpd:                                            [FAILED]
Starting httpd: [Wed Jan 22 16:35:58 2014] [warn] module php5_module is already loaded, skipping
httpd: Syntax error on line 994 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /www/conf/a*********-best.com.conf: Syntax error on line 1 of /usr/local/zend/etc/sites.d/zend-default-vhost-80.conf: Include directory '/usr/local/zend/etc/sites.d/http/__default__/0' not found
                                                           [FAILED]

To solve the above you have to remove some weird stuff that Zend adds to your default vhost.

 

#ZEND-{DC789661BC47C707017CAF9F2BB500D1}
#Include "/usr/local/zend/etc/sites.d/zend-default-vhost-80.conf"
#ZEND-{DC789661BC47C707017CAF9F2BB500D1}


#ZEND-{15168DADCE0E562BD3FC24EB9302589D}
#Include "/usr/local/zend/etc/sites.d/globals-*.conf"
#Include "/usr/local/zend/etc/sites.d/vhost_*.conf"
#ZEND-{15168DADCE0E562BD3FC24EB9302589D}

Your php.ini will probably be wiped out and overwritten so make sure you enable short tags or PHP code with <? will not be working and will display as HTML:


/etc/php.ini
short_open_tag = On


Tags:

centos, howto, upgrade, php, quot, yum, install, doesn, plugins, fastestmirror, loading, speeds, cached, hostfile, rpmforge, leaseweb, extras, rafal, ca, updates, nexicom, addons, parsing, arguments, resolving, dependencies, transaction, _, updated, processing, dependency, cli, conflicts, restarting, resolution, mysql, pdo, imap, depsolving, cleanup, dupes, orphans, rpm, va, nofiles, nodigest, downtime, couldn, fiind, echo, odbc, httpd, wed, module, _module, skipping, syntax, etc, conf, www, usr, zend, sites, default, vhost, directory, http, __default__, adds, dc, bc, caf, bb, dadce, bd, fc, eb, globals, vhost_, ini, overwritten, enable, tags, display, html, short_open_tag,

Latest Articles

  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide
  • Abusive IP ranges blacklist
  • How to Install Any OS on a Physical Drive from Windows Using VMware Workstation (Linux, Windows, BSD)
  • CDN Cloudflare how to set and preserve the real IP of the client without modifying application code on Apache
  • CentOS 7 fix Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=container error was 14: curl#6 -
  • Ubuntu Debian How To Install Recommended Packages Automatically
  • How to set Linux Ubuntu Redhat Debian Command Line http https socks proxy for yum apt
  • How to resize a pdf without losing much quality in Linux Mint Ubuntu Debian Redhat Solution
  • qemu: could not load PC BIOS 'bios-256k.bin' solution
  • Proxmox How To Custom Partition During Install
  • Hyper-V Linux VM Boots to Black Screen, Storage, NIC Not Found Issues
  • Ubuntu Mint How to Fix Missing/Broken /dev and /dev/pts which causes terminal to immediately close exit and not work
  • How high can a Xeon CPU get?
  • bash fix PATH environment variable "command not found" solution
  • Ubuntu Linux Mint Debian Redhat Youtube Cannot Play HD or 4K videos, dropped frames or high CPU usage with Nvidia or AMD Driver