Here are the steps to install PHP 7.2 on Debian systems
-
Update:
apt-get update apt-get install python-software-properties apt-get install software-properties-common apt-get update
-
Install Zip/Unzip:
apt-get install zip unzip
-
Add PHP5 package sources to your system:
add-apt-repository ppa:ondrej/php
If you get error here about Python Unicode, then it’s a problem of locale language set in your local machine. To fix you need to update locale and set, follow these steps:
locale-gen en_US.UTF-8 export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8
-
Update:
apt-get update
-
Install PHP5.6:
apt-get install php7.2
-
Install other Laravel dependencies:
apt-get install php7.2-curl php7.2-mysql apt-get install libapache2-mod-php7.2 php7.2-mbstring php7.2-xml php7.2-opcache php7.2-gd php7.2-zip
-
Check the newly installed PHP version:
php -v