I am new to using Linux and I broke some php settings while tampering.
If I execute a php script containing: phpinfo();
it shows the php versions as 5.
Just to say, if your server is managed using Plesk (like mine is at the time of searching through this question) then you may not have later PHP versions in /usr/bin
In this case, your PHP versions will be located in /opt/plesk/php
so you can instead use the following command as a super user (run su
first if you're not a super user) to set your PHP CLI version (to 7.3 in this example):
echo "alias php='/opt/plesk/php/7.3/bin/php'" >> ~/.bashrc
Log out and log back in and.... voila!
7.3
in the command to whichever version you would like (in the OP's case this would be 5.6
ls /opt/plesk/php
Source: Plesk Support