Last active
September 18, 2017 17:58
-
-
Save igoralves1/fd38a6a8dafbb57a79e726b199d072c6 to your computer and use it in GitHub Desktop.
Installing PHP 5.6 on Xenial (16.04) [duplicate]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How do I install different (upgrade or downgrade) PHP version in still supported Ubuntu release? | |
| https://askubuntu.com/questions/109404/how-do-i-install-different-upgrade-or-downgrade-php-version-in-still-supported | |
| sudo add-apt-repository ppa:ondrej/php | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| #check if php5.6 is avaliable | |
| apt list | |
| #Install desired version | |
| sudo apt-get install php7.1 # for PHP 7.1 | |
| sudo apt-get install php7.0 # for PHP 7.0 | |
| sudo apt-get install php5.6 # for PHP 5.6 | |
| ================================================================================================================================= | |
| https://askubuntu.com/questions/462673/installing-php-5-3-in-ubuntu-14-04 | |
| This needs to be said over and over: Don't run outdated software. | |
| PHP 5.3 has reached its end-of-life on 14 Aug 2014. | |
| ================================================================================================================================= | |
| Installing PHP 5.6 on Xenial (16.04) [duplicate] | |
| https://askubuntu.com/questions/756181/installing-php-5-6-on-xenial-16-04 | |
| sudo add-apt-repository ppa:ondrej/php | |
| mv1@mv1:~$ sudo add-apt-repository ppa:ondrej/php | |
| [sudo] password for mv1: | |
| Co-installable PHP versions: PHP 5.6, PHP 7.0, PHP 7.1 and most requested extensions are included. | |
| PLEASE DON'T USE PHP 5.4 OR PHP 5.5. The PHP 5.5 and later are no longer supported with security updates, therefore they are not included in this repository. | |
| You can get more information about the packages at https://deb.sury.org | |
| BUGS&FEATURES: This PPA now has a issue tracker: https://deb.sury.org/#bug-reporting | |
| PLEASE READ: If you like my work and want to give me a little motivation, please consider donating regularly: https://donate.sury.org/ | |
| WARNING: add-apt-repository is broken with non-UTF-8 locales, see https://github.com/oerdnj/deb.sury.org/issues/56 for workaround: | |
| # LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php | |
| More info: https://launchpad.net/~ondrej/+archive/ubuntu/php | |
| Press [ENTER] to continue or ctrl-c to cancel adding it | |
| =========================================================== | |
| https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04 | |
| https://askubuntu.com/questions/6358/how-do-you-restart-apache | |
| https://httpd.apache.org/docs/2.4/vhosts/examples.html | |
| https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04 | |
| ini_set('display_errors',1); | |
| //Test mysql_connect(), | |
| $link = mysql_connect('127.0.0.1', 'root', 'dev'); | |
| if (!$link) { | |
| echo 'Could not connect: ' . mysql_error(); | |
| } | |
| else{ | |
| echo 'Connected successfully'; | |
| } | |
| mysql_close($link); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment