1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

現在使われているphp.iniの場所の探し方

Last updated at Posted at 2017-01-11

PHPが複数バージョン入っているなどで、実際に読み込まれているphp.iniの場所が分からない場合に、php.iniの場所を確認する方法です。

phpinfo

phpinfo();

が見れる状態であれば、
そちらの「Configuration File (php.ini) Path」を確認してください。

php -i コマンド

SSHで接続中に確認したい場合は

php -i | grep php.ini

上記コマンドで一発確認出来ます。

まとめ

オススメは「php -i」コマンドです。

他にも、現在のTimeZone設定を知りたい場合は

php -i | grep timezone

とすれば確認出来ますし、応用が色々とききます。

1
4
1

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
1
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?