We are trying to switch from PHP5 to PHP7.
We now have Apache installed and PHP works.
However, the changes we made in the
php.ini file have no effect.
phpinfo() we realized the reason is that the
Configuration File (php.ini) Path is
httpd.conf we have:
# 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"
Which I understand is supposed to make Apache look for the
c:\test\php (forward slashes are used in the http.conf as is required)
Not understanding why Apache doesn’t look for
php.ini where we tell it to, we put the
c:\Windows where it still is not read (the modules which we load in the
php.ini are not loaded in phpinfo).
Each time we make changes to
httpd.conf, we restart Apache with the Apache monitor.
How can we tell Apache to read the
php.ini file in a specific directory other than what we have tried above?
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. (???)
A reboot doesn’t help either.
You can try add trailing slash
Note: Remember that when adding path values in the Apache configuration files on Windows, all backslashes such as
c:\directory\file.ext should be converted to forward slashes:
c:/directory/file.ext. A trailing slash may also be necessary for