Where can I find php.ini?

后端 未结 14 2321
無奈伤痛
無奈伤痛 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:32

    You can get more info about your config files using something like:

    $ -> php -i | ack config # Use fgrep -i if you don't have ack
    
    Configure Command =>  './configure'  ...
    Loaded Configuration File => /path/to/php.ini
    
    0 讨论(0)
  • 2020-11-22 12:33

    Try one of this solution

    1. In your terminal type find / -name "php.ini"

    2. In your terminal type php -i | grep php.ini . It should show the file path as Configuration File (php.ini) Path => /etc

    3. If you can access one your php files , open it in a editor (notepad) and insert below code after <?php in a new line phpinfo(); This will tell you the php.ini location
    4. You can also talk to php in interactive mode. Just type php -a in the terminal and type phpinfo(); after php initiated.
    0 讨论(0)
提交回复
热议问题