PHP Command Line php.ini path error

前端 未结 2 1155
萌比男神i
萌比男神i 2020-12-19 11:44

I am trying to run some PHP pages on the command line but am running into a few problems with mysql and other PHP extensions.

Running php --ini produce

2条回答
  •  情话喂你
    2020-12-19 12:17

    First update your sloacate database by using the command updatedb

    Then try to locate php.ini file by using the command php --ini

    I hope it'll update the slocate database and it will display the ini files loaded path.

    [root@tamilan src]# php --ini
    Configuration File (php.ini) Path: /etc
    Loaded Configuration File:         /etc/php.ini
    Scan for additional .ini files in: /etc/php.d
    Additional .ini files parsed:      /etc/php.d/apc.ini,
    

    To run php with customized or other php.ini file use the below method

    php -c /etc/php.ini your-php-script-file.php
    

提交回复
热议问题