I need to upgrade the php version to 7.2 in my Lampp. Actually, when I am checking php -v in terminal, it's showing the following result:
PHP 7.2.1-1+ubuntu14.04.1+deb.sury.org+1 (cli) (built: Jan 11 2018 22:52:58) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.2.1-1+ubuntu14.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
But I am running the file from opt/lampp/htdocs and there I am getting the php version as 5.6.3 which needs to be upgraded to 7.2. I was referring the following steps to install this originally.
sudo apt-get install apache2 mysql-server php7-mysql php7 libapache2-mod-php7 php7-mcrypt phpmyadmin
Package manager info:
$ apt-cache policy apache2 mysql-server php7-mysql php7 libapache2-mod-php7 php7-mcrypt phpmyadmin
apache2:
Installed: 2.4.7-1ubuntu4.18
Candidate: 2.4.7-1ubuntu4.18
Version table:
2.4.10-1ubuntu1.1~ubuntu14.04.2 0
100 http://in.archive.ubuntu.com/ubuntu/ trusty-backports/main amd64 Packages
*** 2.4.7-1ubuntu4.18 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
2.4.7-1ubuntu4 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
mysql-server:
Installed: 5.5.58-0ubuntu0.14.04.1
Candidate: 5.5.58-0ubuntu0.14.04.1
Version table:
*** 5.5.58-0ubuntu0.14.04.1 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
100 /var/lib/dpkg/status
5.5.35+dfsg-1ubuntu1 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
phpmyadmin:
Installed: 4:4.0.10-1
Candidate: 4:4.0.10-1
Version table:
*** 4:4.0.10-1 0
500 http://in.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
N: Unable to locate package php7-mysql
N: Unable to locate package php7
N: Unable to locate package libapache2-mod-php7
N: Unable to locate package php7-mcrypt