1.2.3. --ini Show configuration file names
顯示配置檔案名
$ php --ini
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File: /etc/php5/cli/php.ini
Scan for additional .ini files in: /etc/php5/cli/conf.d
Additional .ini files parsed: /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-readline.ini
# php --ini
Configuration File (php.ini) Path: /srv/php-5.5.13/etc
Loaded Configuration File: /srv/php-5.5.13/etc/php.ini
Scan for additional .ini files in: /srv/php-5.5.13/etc/conf.d
Additional .ini files parsed: /srv/php-5.5.13/etc/conf.d/amqp.ini,
/srv/php-5.5.13/etc/conf.d/pthreads.ini,
/srv/php-5.5.13/etc/conf.d/redis.ini,
/srv/php-5.5.13/etc/conf.d/safenet.ini,
/srv/php-5.5.13/etc/conf.d/xdebug.ini
編譯PHP的時候可以通過 --with-config-file-scan-dir=來指定配置檔案掃瞄目錄。那麼我們怎樣再運行時修改這個目錄呢?
export PHP_INI_SCAN_DIR=/srv/php/etc/cli.d
export PHP_INI_SCAN_DIR=/srv/php/etc/conf.d:/srv/php/etc/fpm.d