solvit.io

Find the php.ini configuration file used by PHP

Solution #1

Find the php.ini used when executing PHP in the command console:

$ php --ini

Loaded Configuration File:         /usr/local/php5/lib/php.ini
Scan for additional .ini files in: /usr/local/php5/php.d
Additional .ini files parsed:      ...
Solution #2

Find the php.ini used when executing PHP in a web server:

  1. Create a PHP page with this content:
    <?php phpinfo();
    
  2. Load that page via your web server
  3. Look for the Loaded Configuration File value
Find more solutions about: