Where can I find php.ini?

后端 未结 14 2552
無奈伤痛
無奈伤痛 2020-11-22 11:58

A few years ago I installed Apache 2.2x and PHP 5.3.1 on a Linux server I maintain. I used .tar.gz\'s and built them as instructed (instead of rpms and what-have-you). And

14条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 12:07

    This works for me:

    php -i | grep 'php.ini'
    

    You should see something like:

    Loaded Configuration File => /usr/local/lib/php.ini
    

    p.s. To get only the php.inin path

    php -i | grep /.+/php.ini -oE
    

提交回复
热议问题