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 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
  • hostapd example configuration for high speed AC on 5GHz using WPA2
  • hostapd how to enable and use WPS to connect wireless devices like printers
  • Dell Server Workstation iDRAC Dead after Firmware Update Solution R720, R320, R730
  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint