I’m trying to learn Symfony that “requires” using php in the command line / terminal for some tasks.
I like to store my php.ini in the /apache2/conf directory, to have all the server configs at one place (and not having to deal with Windows’ UAC everytime I change something). In Apache, it’s no problem to set the default php.ini location via
PHPIniDir "C:/apache2/conf"
However, when running php from the terminal – not through the apache server – it looks for the file in the C:\Windows directory by default, although there’s none there:
C:\>php -i
...
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => (none)
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
...
Of course, I can bypass this by using the php -c C:\apache2\conf ... everytime I use it but I’d prefer a more easy and permanent solution.
Is this possible?
Thanks in advance!
http://www.php.net/manual/en/configuration.file.php
In addition as of PHP 5.3, you can use per-directory .ini files. See http://php.net/manual/en/configuration.file.per-user.php