phpinfo says php.ini path is C:\Windows but there is no php.ini there
<p>We are trying to switch from PHP5 to PHP7.</p>

<p>We now have Apache installed and PHP works.</p>

<p>However, the changes we made in the <code>php.ini</code> file have no effect.</p>

<p>Via <code>phpinfo()</code> we realized the reason is that the <code>Configuration File (php.ini) Path</code> is <code>C:\Windows</code>.</p>

<p>In our <code>httpd.conf</code> we have:</p>

<pre><code># PHP7 setup
LoadFile "C:/test/php/php7ts.dll"
LoadModule php7_module "C:/test/php/php7apache2_4.dll"
AddHandler php7-script .php
PHPINIDir "C:/test/php"
</code></pre>

<p>Which I understand is supposed to make Apache look for the <code>php.ini</code> in <code>c:\test\php</code> (forward slashes are used in the http.conf as is required)</p>

<p>Not understanding why Apache doesn't look for <code>php.ini</code> where we tell it to, we put the <code>php.ini</code> in <code>c:\Windows</code> where it still is not read (the modules which we load in the <code>php.ini</code> are not loaded in phpinfo).</p>

<p>Each time we make changes to <code>php.ini</code> or <code>httpd.conf</code>, we restart Apache with the Apache monitor.</p>

<p><strong>How can we tell Apache to read the <code>php.ini</code> file in a specific directory other than what we have tried above?</strong></p>

<h1>Addendum:</h1>

<p><a href="https://i.stack.imgur.com/jSmmF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jSmmF.png" alt="enter image description here"></a></p>

<p>We switched everything back to PHP5 and now get the same error as in the above screenshot for where the PHP path is. It says it is now PHP 5.6.0 so it is obviously loading the new PHP version but something has changed so that the php.ini file is not read in either version. (???)</p>

<p>A reboot doesn't help either.</p>