{"id":86,"date":"2015-09-04T12:20:20","date_gmt":"2015-09-04T11:20:20","guid":{"rendered":"http:\/\/www.haxed.me.uk\/?p=86"},"modified":"2015-09-04T12:20:20","modified_gmt":"2015-09-04T11:20:20","slug":"upgrading-php-5-3-3-to-5-3-17-or-5-4-44-in-centos6","status":"publish","type":"post","link":"https:\/\/haxed.me.uk\/index.php\/2015\/09\/04\/upgrading-php-5-3-3-to-5-3-17-or-5-4-44-in-centos6\/","title":{"rendered":"Upgrading PHP 5.3.3 to 5.3.17+ or 5.4.44 in CENTOS6"},"content":{"rendered":"<p>A customer of ours was looking to upgrade their php to 5.3.17+ following the guide:<br \/>\nhttp:\/\/www.rackspace.com\/knowledge_center\/article\/how-to-installupgrade-php-53-for-centos-5x<\/p>\n<p>Unfortunately this guide is specifically tailored for CentOS 5 instead of CentOS 6, which really broke the customers dependencies.<\/p>\n<p>when running the command &#8216;yum upgrade php&#8217; there were getting the following error:<br \/>\nError: Package: php-common-5.3.29-4.w5.x86_64 (webtatic) Requires: libcurl.so.3()(64bit) Error: Package: php-snmp-5.3.29-4.w5.x86_64 (webtatic) Requires: libnetsnmp.so.10()(64bit) You could try using &#8211;skip-broken to work around the problem You could try running: rpm -Va &#8211;nofiles &#8211;nodigest<\/p>\n<p>The first thing to do was to<\/p>\n<p>Step 1. <\/p>\n<pre>\r\nrun a \"CREATE IMAGE\". Just in case.\r\n<\/pre>\n<p>Step 2.<\/p>\n<pre> \r\nsudo vim \/etc\/yum.repos.d\/webtatic.repo\r\n<\/pre>\n<p>The file should look like , with enabled=0<\/p>\n<pre>\r\n[webtatic]\r\nname=Webtatic Repository $releasever - $basearch\r\n#baseurl=http:\/\/repo.webtatic.com\/yum\/centos\/5\/$basearch\/\r\nmirrorlist=http:\/\/mirror.webtatic.com\/yum\/centos\/5\/$basearch\/mirrorlist\r\nenabled=0\r\ngpgcheck=1\r\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-webtatic-andy\r\n<\/pre>\n<p>Again, make sure that enabled is now 0. This disables the webtatic repo.<\/p>\n<p>Then re-run:<br \/>\nStep 3:<\/p>\n<p>sudo yum install php php-cli php-gd php-mysql php-mbstring<\/p>\n<p>This fixed all their badly borked deps. Then the next step was to get the latest PHP 5 support , and show the customer how to use the correct repository, and even after overcoming the dependency issues, there was a new issue now,<\/p>\n<pre>\r\nError: php54w-common conflicts with php-common-5.3.3-46.el6_6.x86_64\r\n<\/pre>\n<p>Solving this was quite simple too, after an hour or so of research.<\/p>\n<p>Step 1: Make Backup<\/p>\n<pre>\r\nplease make a backup image before carrying out this procedure to ensure you have a roll back point.\r\n<\/pre>\n<p>Step 2 : Check PHP Packages<\/p>\n<pre>\r\n yum list installed | grep php\r\n<\/pre>\n<p>Step 3: Use correct webtatic repository<\/p>\n<pre>\r\n rpm -Uvh http:\/\/mirror.webtatic.com\/yum\/el6\/latest.rpm\r\n<\/pre>\n<p>Step 4: Install yum replace package addin and replace php-common conflicted package with php54w-common <\/p>\n<pre>\r\nyum install yum-plugin-replace\r\nyum replace php-common --replace-with=php54w-common\r\n<\/pre>\n<p>Step 5:<\/p>\n<pre>\r\nyum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64\r\n<\/pre>\n<p>I have tested this and it does seem to work. However, again, please make a backup image before carrying out this procedure to ensure you have a roll back point. I also don&#8217;t recommend doing it.<\/p>\n<p>Well, it worked, yay<\/p>\n<pre>\r\n[root@centos6test ~]# php -v\r\nPHP 5.4.44 (cli) (built: Aug  9 2015 13:45:34)\r\nCopyright (c) 1997-2014 The PHP Group\r\nZend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A customer of ours was looking to upgrade their php to 5.3.17+ following the guide: http:\/\/www.rackspace.com\/knowledge_center\/article\/how-to-installupgrade-php-53-for-centos-5x Unfortunately this guide is specifically tailored for CentOS 5 instead of CentOS 6, which really broke the customers dependencies. when running the command &#8216;yum &hellip; <a href=\"https:\/\/haxed.me.uk\/index.php\/2015\/09\/04\/upgrading-php-5-3-3-to-5-3-17-or-5-4-44-in-centos6\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-86","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/86","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/comments?post=86"}],"version-history":[{"count":0,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/posts\/86\/revisions"}],"wp:attachment":[{"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/media?parent=86"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/categories?post=86"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haxed.me.uk\/index.php\/wp-json\/wp\/v2\/tags?post=86"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}