LoginSignup
4
8

More than 5 years have passed since last update.

phpをソースから入れたが /etc/php.ini と /etc/php.d を読まない時に確認する点

Last updated at Posted at 2016-11-09

CentOS 6.8 の php 5.3.29 にて確認。
./configure --prefix=/usr/local/php でビルドしたとする。

現状

  • php --iniphp -mphp -i | grep --color configure で確認

  • 赤色 : 目標

  • 緑色 : 現在

 Configuration File (php.ini) Path =>
- /etc/
+ /usr/local/php/lib/

 Loaded Configuration File => 
- /etc/php.ini
+ (none)

 Scan for additional .ini files in: 
- /etc/php.d
+ (none)

 extension_dir => 
- /usr/lib64/php/modules
+ /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626

./configure 修正

php.iniのpath修正
+ --with-config-file-path=/etc/
php.dをスキャンするよう修正
+ --with-config-file-scan-dir=/etc/php.d

php.ini 修正

/etc/php.ini
+ extension_dir = /usr/lib64/php/modules

解決した

4
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
8