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

后端 未结 5 1860
我在风中等你
我在风中等你 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:27

    I have spent about 3 hours trying to do exactly what your question asks. Couldn't do it. I gave up and copied that php.ini to C:\Windows and changed my ENV variable "PHPRC" to C:\Windows (and in httpd.conf). That way both my CLI php and Apach php e are using the same file. I could not get "php -m" to display the modules I had loaded in my php.ini for the life of me until I made this change...

提交回复
热议问题