I want to see where PHP is, because I've found it in /etc/php5/apache2/php.ini., And it's not there. I do not know which is the best way to install it, since I never did it, and I did not want to put it in the wrong place, that is why I come to you. Thank you.
If you're using php5 in 18.04 then you won't be able to do it via
apt-get install php
since that installs php 7.2. If you're fine with that, then you're set. If you require php 5.6, you'll have to use ondrej/php repo which is outside of a default ubuntu repo. You can do that by adding the ppa:ondrej/php repo and then install php5.6. It should look something like this
sudo add-apt-repository ppa:ondrej/php sudo apt-get update sudo apt-get install php5.6
If you're suspecting php already is installed on the server, then you can do a few things to figure that out. This will show you what version is installed.
If you get a command not found, then chances are it is not installed. If it comes back with a version and you want to see where the bin is then you can run this to find it
and that will give you the path to the file it's using. If you need to find if it's installed via apt (standard way to install)
sudo apt list --installed | grep php
and that will list all packages installed with php in their name.