I had a WAMP environment with php installed in C:\SP\php. Every thing worked fine.
I recently desired to place my php.ini file in a custom directory: C:\SP\confs\, and it didn't work.
Here are my httpd.conf directives:
PHPIniDir "C:/SP/confs/"
LoadModule php5_module "C:/SP/php/php5apache2_4.dll"
In C:/SP/confs/php.ini I had this:
extension_dir = C:\SP\php\ext
date.timezone = Africa/Lagos
Errors appeared everywhere suggesting that many functions (e.g. mysql) were undefined.
The phpinfo() showed the following:
Configuration File (php.ini) Path: C:\windows
Loaded Configuration File: C:\SP\confs\php.ini
Extension_dir: C:\php
Default timezone: UTC (with warnings like: It is not safe to rely on the system's timezone settings....)
My Server Software is : Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11
Now all this seems to suggest that my custom php.ini was found and loaded (according to phpinfo()) but somehow its directives were completely ignored in favour of some server defaults.
Now, how could this be?