How to change the path to php.ini in PHP CLI version

后端 未结 5 1861
我在风中等你
我在风中等你 2020-11-30 05:33

The php that run on the webserver and the CLI version is not using the same php.ini file. If I do a command php --ini, it show this



        
5条回答
  •  星月不相逢
    2020-11-30 06:16

    By specifying environment variable PHPRC to point to the same php.ini as the one Apache uses worked for me on Ubuntu

    export PHPRC=/etc/php5/apache2/php.ini
    

    Or put it in the $HOME/.bashrc to import every time cli is started

提交回复
热议问题