How do you specify the path of the php.ini file for a PHPStorm project to use?
I have been trying to tell PHPStorm what php.ini file to use when running my project and I cannot.
PhpInfo reports that:
| Configuration File (php.ini) Path | C:\Windows |
| Loaded Configuration File | (none) |
| Scan this dir for additional .ini files | (none) |
| Additional .ini files parsed | (none) |
however, I have specified that the path should be C:\PHP\php-5.6.7\php.ini by setting the "interpreter options" of the "run configuration":
--php-ini C:\PHP\php-5.6.7\php.ini
According to this thread, this is how to do it, but it suggests that there might be a different system in recent versions of PHPStorm. I am not able to discover what that system is.
Please sign in to leave a comment.
Hi there,
No idea why it does not work for you.

In any case: "-c" works just fine (just tested on php 5.6.7 running on Windows 7)
P.S.
Ignore the small path difference -- it's because "E:\Projects\php\" is a symlink to "E:\Projects\php56\"
--php-ini C:\PHP\php-5.6.7\php.ini works for you? If so, what version of PHPStorm do you have? I am on 8.0.3
switching it to -c C:\PHP\php-5.6.7\php.ini worked for me, but that just leavs me more confused about what is actually going on here.
Have not tried then.
I've double checked php.net manual as well as ouput of "php -h" which shows modern options ("--php-ini" is a long option name for "-c") and just used them.
But I've just check it in console (not via PhpStorm) and it worked as well (notice the order of parameters):