How can i install PHP 5.6 on Ubuntu 18.04 with Virtualmin?

3 posts / 0 new
Last post
#1 Wed, 02/27/2019 - 09:32
simon.b

How can i install PHP 5.6 on Ubuntu 18.04 with Virtualmin?

Hello, i'm know that PHP 5.6 is ending support, but i need only one website with this settings, i have found a lot tutorials from downgrade, but all this methods does'nt work with Virtualmin. example: "a2dismod php7.2"

How can i succesfull install Virtualmin and downgrade from php 7.2 to 5.6, i need only 5.6 on Ubuntu 18.04

thanks in advance

Wed, 02/27/2019 - 11:16
TheRavenKing

I suggest leave as is and install 5.6 and using the function PHP version per folder. To install 5.6 or other versions use this:

Multi-PHP
https://www.virtualmin.com/documentation/web/multiplephp

yum install centos-release-scl

yum install php54 php54-php-cli php54-php-mysql php54-php-gd php54-php-mbstring

yum install php55 php55-php-mysqlnd php55-php-pdo php55-php-gd php55-php-mbstring php55-php-xml php55-php-pear php55-php-soap php55-php-opcache php55-php-bcmath php55-php-intl php-mcrypt*

yum install rh-php56 rh-php56-php-mysqlnd

You can configure which one is the default PHP version used on new Virtual Servers. The default is to use the newest available. You can change that default in System Settings -> Server Templates -> Default -> PHP Options, and on that screen you can set the default PHP version to use in the field Default PHP version. Configuring Individual Virtual Servers

You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration -> PHP Versions.

The first line there specifies what PHP version will be used by default. If you wish, you can specify a different PHP version to be used for a specific directory.

Ioncube loader:

PHP 5.6

Transfer the Loaders to your web server and install in /opt/rh/rh-php56/root/usr/lib64/php/modules Save this 00-ioncube.ini file and put it in your ini files directory, /etc/opt/rh/rh-php56/php.d Restart the Apache server software.

But !!! sadly this is in CentOS, not sure how you would it in Ubuntu, but I assume not much different.

Wed, 02/27/2019 - 16:05
trimbode

Hi, this should help for Ubuntu. I have not tested it, but it should work. You will be able to run php7.2 and php5.6 on one System. (PHP 7.0/7.1/7.3 are also available.

  # For Ubuntu
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-mysql php5.6-cgi php5.6-cli php5.6-bz2 php5.6-cgi php5.6-curl php5.6-fpm php5.6-gd php5.6-imap php5.6-json php5.6-mbstring php5.6-mysql php5.6-odbc php5.6-pspell php5.6-soap php5.6-sqlite3 php5.6-xml php5.6-xmlrpc php5.6-zip php5.6-cgi php5.6-snmp php5.6-xsl php5.6-opcache php5.6-intl php5.6-curl

More Info: https://launchpad.net/~ondrej/+archive/ubuntu/php/