Qual é a sua dúvida?
Instalando versão 5 do php no servidor Mint / Debian (php5, php5.6, php 5, php 5.6)
Remoção / Install
Remoção
$ apt-get remove php* --purge
Debian 9 stretch
$ sudo apt install ca-certificates apt-transport-https
$ wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
$ echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
$ sudo apt update
$ sudo apt-cache search php5.6
$ sudo apt install php5.6 curl
$ sudo apt install php5.6-cli php5.6-common php5.6-curl php5.6-mbstring php5.6-mysql php5.6-xml php5.6-pgsql
Debian 8 Jessie
$ nano /etc/apt/sources.list.d/jessie.list
deb http://ftp.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
$ apt update
$ apt install php5
$ apt search php5 | grep ^php5
OLD POST
Install
$ apt-get install software-properties-common
$ add-apt-repository ppa:ondrej/php
$ apt-get update; apt-cache search php5
$ apt-get install php5.6 php5.6-curl php5.6-pgsql php5.6-mbstring
Post Externo
https://sempreupdate.com.br/instalar-versoes-diferentes-php-5-6-7-0-7-1-7-2-7-3-no-ubuntu/
Bash Script
#!/bin/bash
# PHP Install
apt-get install -y --fix-missing software-properties-common build-essential
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
apt-get update --fix-missing
apt-get install php5.6 php5.6-curl php5.6-pgsql php5.6-mbstring --allow-unauthenticated -y
# Restarting apache
service apache2 restart
php error Error: Postgres driver is NOT enabled
Instale o pacote pgsql
sudo apt install php5-pgsql php5-curl
Edite o arquivo .ini do php para habilitar o plugin na parte referente às extensions. Ele pode estar nos diretórios:
sudo nano /etc/php5/apache2/conf.d/10-pdo.ini
ou
sudo nano /etc/php/[VERSION]/apache2/conf.d/10-pdo.ini
ou
sudo nano /etc/php/[VERSION]/apache2/php.ini
ou
Adicione o conteúdo abaixo ao final do arquivo
extension=pgsql
extension=pgsql.so
extension=php_mbstring.dll
extension=php_curl.dll
extension=php_pdo_pgsql.dll
Erro: php5.6-curl : Depends: libcurl3 (>= 7.18.0) but it is not installable
Adicione um novo repositório:
$ echo "deb https://packages.sury.org/php/ buster main" | sudo tee /etc/apt/sources.list.d/php2.list
Atualize o apt e instale a versão php5.6-curl
$ sudo apt update
$ apt install php5.6-curl
tags: install php5.6, php 5.6, bmtelecom, configurando ambiente bmtelecom,
mb_strtolower