{"id":1159,"date":"2012-03-21T20:28:09","date_gmt":"2012-03-22T03:28:09","guid":{"rendered":"http:\/\/blog.networkpresence.co\/?p=1159"},"modified":"2012-03-21T20:28:09","modified_gmt":"2012-03-22T03:28:09","slug":"upgrading-to-php-5-3-on-centos-5-x-linux","status":"publish","type":"post","link":"http:\/\/blog.networkpresence.co\/?p=1159","title":{"rendered":"Upgrading to PHP 5.3 on CentOS 5.x Linux"},"content":{"rendered":"<p>Some of the earlier CentOS\/RHEL version 5.x Linux distributions came with older PHP versions (like 5.1 etc) and many newer PHP based open-source software distributions (eg: latest WordPress) require the better and newer versions of PHP like 5.3 or higher, so here&#8217;s some quick commands to run as root on a CentOS 5.x operating system to upgrade its PHP version to 5.3.x<br \/>\nDo note that this does require installing the Fedora &#8220;EPEL&#8221; Repository to gain access to the newer PHP Packages.<\/p>\n<p>First, shutdown any running software that&#8217;s using PHP, mostly this is the Web Server:<\/p>\n<p><code>service httpd stop<\/code><\/p>\n<p>Then due to nasty RPM dependencies (particularly if you have the frequently used &#8216;phpMyAdmin&#8217; software installed), we recommend that you remove all currently installed PHP software packages, which can be identified and then removed with the following commands:<\/p>\n<p><code>yum list installed | egrep ^php<br \/>\nyum remove php php-cli php-common php-gd php-ldap php-mbstring php-mcrypt php-mysql php-pdo<\/code><\/p>\n<p>Then install the equivalent new PHP packages from the EPEL Repository, installing that Repo file first, with the following commands:<\/p>\n<p><code>cd \/usr\/local\/src<br \/>\nwget http:\/\/dl.fedoraproject.org\/pub\/epel\/5\/i386\/epel-release-5-4.noarch.rpm<br \/>\nrpm -i epel-release-5-4.noarch.rpm<br \/>\nyum install php53 php53-cli php53-common php53-gd php53-ldap php53-mbstring php53-mcrypt php53-mysql php53-pdo<\/code><\/p>\n<p>All done, so now restart the Web Server (Apache in this example) with:<\/p>\n<p><code>service httpd start<\/code><\/p>\n<p>And check the Apache web server logs to see that it&#8217;s running Ok with the new PHP, eg: <code>tail \/var\/log\/httpd\/error.log<\/code><\/p>\n<p>FYI,<br \/>\nRichard.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some of the earlier CentOS\/RHEL version 5.x Linux distributions came with older PHP versions (like 5.1 etc) and many newer PHP based open-source software distributions (eg: latest WordPress) require the better and newer versions of PHP like 5.3 or higher, &hellip; <a href=\"http:\/\/blog.networkpresence.co\/?p=1159\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[485,75,78,9],"class_list":["post-1159","post","type-post","status-publish","format-standard","hentry","category-network-presence","tag-centos","tag-php","tag-sysadmin","tag-vps"],"_links":{"self":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/1159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1159"}],"version-history":[{"count":1,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions"}],"predecessor-version":[{"id":1160,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=\/wp\/v2\/posts\/1159\/revisions\/1160"}],"wp:attachment":[{"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.networkpresence.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}