note 71027 added to install.windows
| From: | jneill at gamedaytv dot com | Date: | Thu, 09 Nov 2006 01:36:30 +0000 |
| Subject: | note 71027 added to install.windows | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119533@lists.php.net to get a copy of this message | ||
Here's how to run dual PHP instances with PHP 5.2 and any previous PHP on Windows 2003:
1. Right-click My Computer, go to Advanced tab, and click on Environment Variables.
Add the two installations and their EXT directories to the Path variable. For example, add:
c:\php;c:\php\ext;c:\TMAS\php;c:\tmas\php\ext;
Then, add the newer PHP version's directory as a variable called PHPRC. For example:
Variable:PHPRC
Value: C:\PHP
Click OK to close the Environment Variables window, and click OK to close System Properties.
2. In registry, under HKEY_LOCAL_MACHINE>SOFTWARE>PHP, add a REG_SZ key called iniFilePath and
give it a value
of the directory where the older PHP is installed. For example:
C:\TMAS\PHP
3. In IIS, go to the Web Service Extensions. Add both versions' ISAPI module separately to the
extensions
list, and allow both.
4. In IIS, go to each website utilizing the PHP versions. Set an ISAPI filter if needed. On the Home
Directory
tab, click Configuration, and add .php, .php3, .phtml, and any other extensions needed (perhaps
.html?) to
be filtered through PHP, and specify the ISAPI module version needed for each website.
You can now run two versions of PHP. This is because the order of where to look for the .ini file
changed
between previous PHP versions and PHP 5.2, as documented at http://us2.php.net/ini:
---------------------------------------------------
php.ini is searched in these locations (in order):
* SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI
and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)
* The PHPRC environment variable. Before PHP 5.2.0 this was checked after the registry key
mentioned below.
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath (Windows Registry location)
* Current working directory (for CLI)
* The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows)
* Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile
time option
----------------------------------------------------
----
Server IP: 216.194.113.175
Probable Submitter: 72.29.106.199
----
Manual Page -- http://www.php.net/manual/en/install.windows.php
Edit -- https://master.php.net/note/edit/71027
Del: integrated -- https://master.php.net/note/delete/71027/integrated
Del: useless -- https://master.php.net/note/delete/71027/useless
Del: bad code -- https://master.php.net/note/delete/71027/bad+code
Del: spam -- https://master.php.net/note/delete/71027/spam
Del: non-english -- https://master.php.net/note/delete/71027/non-english
Del: in docs -- https://master.php.net/note/delete/71027/in+docs
Del: other reasons-- https://master.php.net/note/delete/71027
Reject -- https://master.php.net/note/reject/71027
Search -- https://master.php.net/manage/user-notes.php