{"id":1005,"date":"2019-02-26T15:49:48","date_gmt":"2019-02-26T15:49:48","guid":{"rendered":"http:\/\/orissawebhosting.in\/blog\/?p=1005"},"modified":"2019-06-23T14:20:49","modified_gmt":"2019-06-23T14:20:49","slug":"enhance-the-php-version-5-4-to-7-0","status":"publish","type":"post","link":"https:\/\/orissawebhosting.in\/blog\/enhance-the-php-version-5-4-to-7-0\/","title":{"rendered":"Enhance the php version 5.4 to 7.0"},"content":{"rendered":"\n<p>The default version of PHP available on Server running CentOS 7 is version 5.4. You will need to perform the upgrade by hand, since PHP 7 is not available in the standard CentOS 7 yum repository, because it is not considered stable.<\/p>\n\n\n\n<p>This is a significant upgrade, with potential for causing serious conflicts with any web software you may be running.<\/p>\n\n\n\n<p>We strongly recommend that you create a snapshot of your server before you proceed. This will allow you to roll back any changes if you encounter a problem with the upgrade.<\/p>\n\n\n\n<p>\n\nUse the&nbsp;<code>php -v<\/code>&nbsp;command to verify your current PHP version:\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"557\" height=\"127\" src=\"http:\/\/orissawebhosting.in\/blog\/wp-content\/uploads\/2019\/03\/Capture.jpg\" alt=\"\" class=\"wp-image-1006\" srcset=\"https:\/\/orissawebhosting.in\/blog\/wp-content\/uploads\/2019\/03\/Capture.jpg 557w, https:\/\/orissawebhosting.in\/blog\/wp-content\/uploads\/2019\/03\/Capture-300x68.jpg 300w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Upgrade to PHP 7<\/h3>\n\n\n\n<p>We will be using the IUS repository to upgrade PHP. Although there are several repositories which have made available versions of PHP 7 for CentOS 7, IUS is the only one which carries the official recommendation of the CentOS Project.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install https:\/\/centos7.iuscommunity.org\/ius-release.rpm<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Remove the existing version of PHP:\nyum remove php-common mod_php php-cli<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code> Update packages:\nyum update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Install PHP 7:\nyum install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-gd php70u-devel php70u-mysql <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Restart Apache:\nsystemctl restart httpd<\/code><\/pre>\n\n\n\n<p> Use the&nbsp;<code>php -v<\/code>&nbsp;command to verify that PHP has been upgraded: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#php -v\nPHP 7.0.18 (cli) (built: Apr 13 2017 15:18:10) ( NTS )\nCopyright (c) 1997-2017 The PHP Group\nZend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies\nwith Zend OPcache v7.0.18, Copyright (c) 1999-2017, by Zend Technologies<\/code><\/pre>\n\n\n\n<p>These are the procedures to upgrade the php version.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default version of PHP available on Server running CentOS 7 is version 5.4. You will need to perform the upgrade by hand, since PHP 7 is not available in the standard CentOS 7 yum repository, because it is not considered stable. This is a significant upgrade, with potential for causing serious conflicts with any web software you may be running. We strongly recommend that you create a snapshot of your server before you proceed. This will allow you to roll back any changes if you encounter a problem with&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1005"}],"collection":[{"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/comments?post=1005"}],"version-history":[{"count":3,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions"}],"predecessor-version":[{"id":1050,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/posts\/1005\/revisions\/1050"}],"wp:attachment":[{"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/media?parent=1005"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/categories?post=1005"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orissawebhosting.in\/blog\/wp-json\/wp\/v2\/tags?post=1005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}