{"id":10579,"date":"2023-06-04T03:46:38","date_gmt":"2023-06-04T03:46:38","guid":{"rendered":"https:\/\/myprojects.advchaweb.com\/?p=10579"},"modified":"2023-08-09T02:58:12","modified_gmt":"2023-08-09T02:58:12","slug":"install-php-5-6-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2023\/06\/04\/install-php-5-6-on-ubuntu-20-04\/","title":{"rendered":"Install PHP 5.6 On Ubuntu 20.04"},"content":{"rendered":"<p>REF: https:\/\/tecadmin.net\/install-php-ubuntu-20-04\/<\/p>\n<p>I already added Ond\u0159ej Sur\u00fd PPA repository. So Just install php5.6<\/p>\n<pre class=\"lang:default decode:true \">sudo apt install php5.6<\/pre>\n<p>Check it on CLI Terminal<\/p>\n<pre class=\"lang:default decode:true\">satria@teddy:~$ sudo update-alternatives --config php\nThere are 5 choices for the alternative php (providing \/usr\/bin\/php).\n\n  Selection    Path             Priority   Status\n------------------------------------------------------------\n  0            \/usr\/bin\/php8.2   82        auto mode\n  1            \/usr\/bin\/php5.6   56        manual mode\n  2            \/usr\/bin\/php7.2   72        manual mode\n  3            \/usr\/bin\/php7.4   74        manual mode\n* 4            \/usr\/bin\/php8.1   81        manual mode\n  5            \/usr\/bin\/php8.2   82        manual mode\n\nPress &lt;enter&gt; to keep the current choice[*], or type selection number: 1\nupdate-alternatives: using \/usr\/bin\/php5.6 to provide \/usr\/bin\/php (php) in manual mode\nsatria@teddy:~$ php -v\nPHP 5.6.40-65+ubuntu20.04.1+deb.sury.org+1 (cli) \nCopyright (c) 1997-2016 The PHP Group\nZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies\n    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies<\/pre>\n<p>A few extensions are already installed automatically<\/p>\n<pre class=\"lang:default decode:true \">The following NEW packages will be installed:\n  libapache2-mod-php5.6 php5.6 php5.6-cli php5.6-common php5.6-json\n  php5.6-opcache php5.6-readline\n<\/pre>\n<p>So installed some others extensions<\/p>\n<pre class=\"lang:default decode:true \">sudo apt install php5.6-{bcmath,xml,fpm,mysql,zip,intl,ldap,gd,bz2,curl,mbstring,pgsql,soap,cgi}<\/pre>\n<p>Install XDebug<\/p>\n<pre class=\"lang:default decode:true \">sudo apt install php5.6-xdebug<\/pre>\n<p>Check it out<\/p>\n<pre class=\"lang:default decode:true \">satria@teddy:~$ php -v\nPHP 5.6.40-65+ubuntu20.04.1+deb.sury.org+1 (cli) \nCopyright (c) 1997-2016 The PHP Group\nZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies\n    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies\n    with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans<\/pre>\n<p>PHP5.6 On Apache2<br \/>\nDisable the old PHP<\/p>\n<pre class=\"lang:default decode:true\">sudo a2dismod php8.1<\/pre>\n<p>Enable PHP5.6<\/p>\n<pre class=\"lang:default decode:true\">sudo a2enmod php5.6<\/pre>\n<p>Also need to run &#8212; NO NEED<\/p>\n<pre class=\"lang:default decode:true\">sudo a2enmod proxy_fcgi setenvif &amp;&amp; sudo a2enconf php5.6-fpm<\/pre>\n<p>Restart Apache server<\/p>\n<pre class=\"lang:default decode:true\">sudo systemctl restart apache2<\/pre>\n<p>Check on the browser<\/p>\n<pre class=\"lang:default decode:true\">http:\/\/localhost\/phpinfo.php<\/pre>\n<p>Should show like PHP Version 5.6.40-65+ubuntu20.04.1+deb.sury.org+1<\/p>\n<p>CHANGE THE PHP5.6 SETTING<br \/>\nMODIFY SOME INI FILES IN:<br \/>\n\/etc\/php\/5.6\/fpm\/php.ini\u00a0 &#8211;&gt; PHP-FPM\u00a0 AS MAIN<br \/>\n\/etc\/php\/5.6\/apache2\/php.ini\u00a0 &#8211;&gt;APACHE<br \/>\n\/etc\/php\/5.6\/cli\/php.ini &#8211;&gt; CLI<\/p>\n<pre class=\"lang:default decode:true\">upload_max_filesize = 4000M -&gt; (default 2M) \nmax_file_uploads = 4000 -&gt; (default 20) \npost_max_size = 4000M -&gt; (default 8M) \nmax_execution_time = 6000 -&gt; (default 30) in second \nmax_input_time = 6000 -&gt; (default 60) in second \nmax_input_vars = 10000 \nmemory_limit = 5120M -&gt; (default 128M) \nmemory_limit = -1 -&gt; (FOR CLI)<\/pre>\n<p>RESTART<\/p>\n<pre class=\"lang:default decode:true \">sudo systemctl restart apache2<\/pre>\n<p>DONE<\/p>\n","protected":false},"excerpt":{"rendered":"<p>REF: https:\/\/tecadmin.net\/install-php-ubuntu-20-04\/ I already added Ond\u0159ej Sur\u00fd PPA repository. So Just install php5.6 sudo apt install php5.6 Check it on CLI Terminal satria@teddy:~$ sudo update-alternatives &#8211;config php There are 5 choices for the alternative php (providing \/usr\/bin\/php). Selection Path Priority Status &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; 0 \/usr\/bin\/php8.2 82 auto mode 1 \/usr\/bin\/php5.6 56 manual mode 2 \/usr\/bin\/php7.2 72 &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2023\/06\/04\/install-php-5-6-on-ubuntu-20-04\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install PHP 5.6 On Ubuntu 20.04&#8221;<\/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":[48],"tags":[],"class_list":["post-10579","post","type-post","status-publish","format-standard","hentry","category-php-2"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/10579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=10579"}],"version-history":[{"count":7,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/10579\/revisions"}],"predecessor-version":[{"id":10582,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/10579\/revisions\/10582"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=10579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=10579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=10579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}