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 Windows or other OS and then bring to another computer by using a physical drive and Virtual Machine with QEMU
  • PXE-E23 Error BOOTx64.EFI GRUB booting is 0 bytes tftp pxe dhcp solution NBP filesize is 0 Bytes
  • vagrant install on Debian Mint Ubuntu Linux RHEL Quick Setup Guide Tutorial
  • RHEL 8 CentOS 8, Alma Linux 8, Rocky Linux 8 System Not Booting with RAID or on other servers/computers Solution for dracut and initramfs missing kernel modules
  • How to Upgrade to Debian 11 from Version 8,9,10
  • Ubuntu Linux Mint Debian Redhat Cannot View Files on Android iPhone USB File Transfer Not Working Solution
  • Virtualbox Best Networking Mode In Lab/Work Environment without using NAT Network or Bridged
  • debootstrap how to install Ubuntu, Mint, Debian install
  • Linux grub not using UUID for the root device instead it uses /dev/sda1 or other device name solution
  • How To Restore Partition Table on Running Linux Mint Ubuntu Debian Machine
  • Debian Ubuntu apt install stop daemon questions/accept the default action without prompting
  • iptables NAT how to enable PPTP in newer Debian/Ubuntu/Mint Kernels Linux
  • Grandstream Phone Vulnerability Security Issue Remote Backdoor Connection to 207.246.119.209:3478
  • Linux How to Check Which NIC is Onboard eth0 or eth1 Ubuntu Centos Debian Mint
  • VboxManage VirtualBox NAT Network Issues Managment Troubleshooting
  • Dell PowerEdge Server iDRAC Remote KVM/IP Default Username, Password Reset and Login Information Solution
  • Nvidia Tesla GPUs K40/K80/M40/P40/P100/V100 at home/desktop hacking, cooling, powering, cable solutions Tutorial AIO Solutions
  • Stop ls in Linux Debian Mint CentOS Ubuntu from applying quotes around filenames and directory names
  • Thunderbird Attachment Download Error Corrupt Wrong filesize of 29 or 27 bytes Solution
  • Generic IP Camera LAN Default IP Settings DVR