Php – Difference between php.ini Configuration File location and Loaded configuration file

PHP

What is the difference between configuration file and loaded configuration file?

If ini file is loaded from "C:\Program Files (x86)\PHP\php.ini ", what does ini inside C:\Windows mean?

Output of phpinfo()

Configuration File (php.ini) Path C:\Windows 
Loaded Configuration File C:\Program Files (x86)\PHP\php.ini 

If i have to change some config, should i modify both files?

Best Answer

"Configuration File (php.ini) Path" is where by default php.ini should be/PHP will look for by default (this path is may be the %windir env var for Win distro?).

I believe that in your apache config you have PHPINIDir, that define explicitly a new path to the ini file. If you don't have php.ini in there, then PHP defaults will be used (even if you have php.ini in the C:\Windows folder). At least this is the case when PHP is used as module (which is my config and I'm able to test on).

So "Loaded Configuration File" is your currently loaded config file and the one you should edit.