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?
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?
The 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. – Alvar Dec 26 '13 at 13:30