{"id":528,"date":"2020-01-03T00:39:55","date_gmt":"2020-01-03T00:39:55","guid":{"rendered":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/?p=528"},"modified":"2020-01-03T00:39:55","modified_gmt":"2020-01-03T00:39:55","slug":"how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04-duplicate","status":"publish","type":"post","link":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/how-can-i-downgrade-from-php-7-to-php-5-6-on-ubuntu-16-04-duplicate\/","title":{"rendered":"How can I downgrade from PHP 7 to PHP 5.6 on Ubuntu 16.04? [duplicate]"},"content":{"rendered":"<p>Today I got again problem with PHP 7 running despite I have disabled <code>php7.0<\/code> apache module: <code>phpinfo<\/code> was showing php 7 using fastCGI &#8230;<br \/>\n&#8230; So if after you follow the below instructions you face this situation, you may need to disable the <code>proxy_fcgi<\/code> apache module:<\/p>\n<pre><code>sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart\r\n<\/code><\/pre>\n<p><strong>1. Re-Install PHP 5.6<\/strong><\/p>\n<p>What worked for me was this guide: <a href=\"http:\/\/www.lornajane.net\/posts\/2016\/php-7-0-and-5-6-on-ubuntu\" rel=\"noreferrer\">http:\/\/www.lornajane.net\/posts\/2016\/php-7-0-and-5-6-on-ubuntu<\/a><\/p>\n<p>Actually is not required to remove <code>php7.0<\/code>, you can install php5.6 together ( also because you will have dependency problem with <code>phpmyadmin<\/code> package that required php7.0)<\/p>\n<p>Assuming <code>libapache2-mod-php<\/code> is a suitable way to enable PHP in Apache for you, you can proceed in this way:<\/p>\n<pre><code>sudo add-apt-repository ppa:ondrej\/php\r\nsudo apt-get update\r\nsudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php7.0-mbstring php-xdebug libapache2-mod-php5.6 libapache2-mod-php7.0\r\n<\/code><\/pre>\n<p><strong>2. Switch PHP version<\/strong>:<\/p>\n<ul>\n<li>From php5.6 to php7.0:\n<ul>\n<li>Apache:\n<pre><code>sudo a2dismod php5.6 ; sudo a2enmod php7.0 ; sudo service apache2 restart\r\n<\/code><\/pre>\n<\/li>\n<li>CLI:\n<pre><code>sudo update-alternatives --set php \/usr\/bin\/php7.0\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>From php7.0 to php5.6:\n<ul>\n<li>Apache:\n<pre><code>sudo a2dismod php7.0 ; sudo a2enmod php5.6 ; sudo service apache2 restart\r\n<\/code><\/pre>\n<\/li>\n<li>CLI:\n<pre><code>sudo update-alternatives --set php \/usr\/bin\/php5.6\r\n<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Today I got again problem with PHP 7 running despite I have disabled php7.0 apache module: phpinfo was showing php 7 using fastCGI &#8230; &#8230; So if after you follow the below instructions you face this situation, you may need to disable the proxy_fcgi apache module: sudo a2dismod proxy_fcgi proxy; sudo service apache2 restart 1. [&hellip;]<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/posts\/528"}],"collection":[{"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/comments?post=528"}],"version-history":[{"count":1,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/posts\/528\/revisions"}],"predecessor-version":[{"id":529,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/posts\/528\/revisions\/529"}],"wp:attachment":[{"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/media?parent=528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/categories?post=528"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.um-palembang.ac.id\/sayfudin\/wp-json\/wp\/v2\/tags?post=528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}