I am very new to linux and setting up PHP in the server.
When I try to do a php -v, the php version is returning a version of 7.0, but when I checked the php version in phpinfo(), it is returning 5.5.9.
My question here is that how can I make both versions to be the same, like when I checked in to the phpinfo(), it should also have 7.0 version.
Your help would be greatly appreciated! Thank you!
First you will need to remove the php by following command. This will remove both i.e php 5 and 7.
sudo apt purge php*
Now install php7.0
sudo apt -y install php7.0 libapache2-mod-php7.0
Then restart Apache:
systemctl restart apache2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With