- php5.6 install, Add the PPA repo
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install software-properties-common
sudo apt-get update
sudo apt-get install php5.6 php5.6-mbstring php5.6-curl php5.6-mcrypt php5.6-mysql php5.6-xml php5.6-fpm php5.6-zip php5.6-ldap
- From php7.x to php5.6:
Apache:
sudo a2dismod php7.x ; sudo a2enmod php5.6 ;
CLI:
sudo update-alternatives --config php
sudo update-alternatives --set php /usr/bin/php5.6
- some modules required to be enabled
sudo a2enconf php5.6-fpm
sudo a2enmod proxy_fcgi setenvif
- Restart Apache server
sudo systemctl restart apache2
- Test PHP current version
$ php -v
httpL//localhost/phpinfo.php
sudo nano /var/www/html/phpinfo.php
<?php
//outputs php configuration info
phpinfo();
?>
No comments:
Post a Comment