I don't wanna put the php.ini file in the Windows directory, I like to keep everything in the same place, how can I get PHP to read the php.ini file which is in the same place as php.exe
Right now, when the php.ini file is in the php.exe folder, the changes I make doesn't show up in phpinfo.
Running as module, restarted Apache everytime...
Using Win2000, Apache, PHP4
Contrary to what all the tutorials and istallation instructions say, it is totally unnecessary to put php.ini in your Windows directory. Leave it where you found it and php will check its own directory for php.ini before it goes looking in the Windows directory. At least that works for me, but I am running php4 as cgi, not a module, on win98.
That's what I thought, I would change the session.save_path, restart Apache, and phpinfo would still say /tmp...
Maybe it does have something to do with module, I'll trying running as CGI...I'm running as module 'cos it's faster, and since it's only for testing, nothing heavy gets on it so it's completely stable.
What is the problem with keeping the php.ini file in the Windows directory, god forbid you might have to navigate to the windows directory to edit it. That was where it was made to be.
Why do you want to go from Module to CGI? Just so you can keep the ini file in your php dir? Just seems like a bad tradeoff, lose all my speed and stableness so I can keep my ini file in the php dir instead of the Windows dir.
Just some stuff for you to chew on before changing everything around.
It's just that I format my computer quite often, to do other tests on hardware/software. And it's kinda easy to forget to backup that php.ini file. But if I have it in my php dir, which is in another partition of the computer, I can format, and Apache, MySQL and PHP will still work perfectly straight away.
I'm only using this machine for testing, and the only one Apache serving the pages to is me, so there isn't any heavy loads, and the MySQL db wouldn't have anything more than 10 rows in each table, 'cos well...it's a test.
Of course, if there's a way to get the module PHP to read the php.ini file from it's dir, that would be the best alternative.
In the top of php.ini, there is this comment:
; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
; path in which the php.ini file is looked for can be overriden using
; the -c argument in command line mode.
That should help a bit.