To install PHP5.6 on Ubuntu 16.4 or deepin 15.3, we need to add the source manually.
On https://launchpad.net/+search?field.text=php, you can find the source of the software you want by searching for it, and the PPA is the source of the software.
How to install PHP5.6:
1. Add PPA Source
sudo su-"deb Http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | Tee-a/etc/apt/"deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | Tee-a/etc/apt/sources.listapt-key adv--keyserver keyserver.ubuntu.com--recv-keys e5267a6capt- Get Updateexit
2, Installation PHP5.6
sudo apt-get install php5.6 php5.6-fpm php5.6-cli php5.6-mcrypt
3. View the installation version
Php-version
4. Configure PHP
sudo gedit/etc/php/5.6/fpm/php.ini
Open php config file, find the cgi.fix_pathinfo=1 option, remove the comment semicolon in front of it; , and then set its value to 0, as follows
Cgi.fix_pathinfo=0
Then configure the www.conf file
sudo gedit/etc/php5/fpm/pool.d/www.conf
Search Listen keyword, find listen =/run/php/php5.6-fpm.sock , change to listen =/var/run/php/php5.6-fpm.sock
6. Restart PHP5-FPM
sudo service php5. 6-fpm Restart
ubuntu16.4 deepin 15.3 Add PPA source installation php5.6