I am trying to find the php.ini
file on Ubuntu server with the command:
sudo vim /etc/php5
However, this tells me that the file does not exist. How can I find and edit the php.ini
file?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityThe other answers can correctly locate php.ini
files in the system, but to find out which one is used by the process you are running, you can use the php_ini_loaded_file() function.
Note that the file loaded is different depending on how you invoke php (apache, nginx, command line, etc).
This information is also available through phpinfo()
locate php.ini
I found mine that way.