Re: Can php select which ini file to use?

From: Date: Wed, 14 Jan 2004 01:52:38 +0000
Subject: Re: Can php select which ini file to use?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174506@lists.php.net to get a copy of this message
You can do things the hard way, or write a batch file that resembles this one: "C:\Program Files\Apache Group\Apache\Apache.exe" -w -n "Apache" -k stop if '%1' == '4.x' (
    copy C:\php4\php.ini C:\winnt\php.ini
    copy C:\php4\dlls\iconv.dll C:\winnt\system32
    copy C:\php4\dlls\php4ts.dll C:\winnt\system32
    copy "C:\Program Files\Apache Group\Apache\conf\httpd4.conf" "C:\Program Files\Apache Group\Apache\conf\httpd.conf"
) ELSE (
    copy C:\php5b3\php.ini C:\winnt\php.ini
    copy C:\php5b3\dlls\iconv.dll C:\winnt\system32
    copy C:\php5b3\dlls\php4ts.dll C:\winnt\system32
    copy "C:\Program Files\Apache Group\Apache\conf\httpd5.conf" "C:\Program Files\Apache Group\Apache\conf\httpd.conf"
) "C:\Program Files\Apache Group\Apache\Apache.exe" -w -n "Apache" -k start Just change the paths. You'll need to create the httpd4.conf and httpd5.conf files, and set up the correct addModule line, but that's really very easy to do. I use this system, and it works great. C:\>phpswitch 4.x and I have PHP 4 installed C:\>phpswitch and I have PHP 5 installed. Regards, Greg -- phpDocumentor http://www.phpdoc.org Richard Davey wrote:
Hi all, I've been playing around installing PHP5 (b3) tonight. I managed to get it running on my Windows XP Pro box as a Module, bar one thing. I have Zend Studio 3 installed which uses the Debugger and Profiler which adds a whole host of extra stuff to the php.ini file in the Windows directory. My question is this - is there any way to get PHP to use a different ini file? I need PHP4 and 5 on the same machine and have two Apache conf files and two short-cuts to start the one I need. PHP4 works perfectly and PHP5 works but I have to click through a whole bunch of warning dialogs first because of all the Zend extensions it's trying (but failing) to load.


« previous php.general (#174506) next »