Sometimes php installation comes with a bunch of php.ini files, that we do not know which one is actually being used by our currently running php. Below are 3 ways to locate your php.ini file
1. Using "php --ini" command
$ php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
...
2. Running phpinfo()
$ php -r 'phpinfo();' | grep ini
...
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
...
3. Using php -i command
$ php -i | grep ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
...
No comments:
Post a Comment