note 63572 added to install.windows.iis
| From: | EvilPuppetMaster at osu1 dot php dot net | Date: | Fri, 24 Mar 2006 03:39:29 +0000 |
| Subject: | note 63572 added to install.windows.iis | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-106510@lists.php.net to get a copy of this message | ||
After having recently gone through a long process of trial and error installing both php4 and php5
on a single machine under IIS. I eventually did get it working so I thought I'd share what I
learnt.
Basically, as far as I can tell there is no way to get both versions working using the ISAPI dlls
unfortunately. You can however get them working using one as ISAPI and the other as CGI. And
probably both as CGI too, although I didn't try that.
You'll need to know how to do a manual install of PHP anyway, see the instructions for how to
do that. Make sure you follow the steps about your PATH env variable and Allowing extensions on IIS
6. Keep your php.inis in the relevant php directory and make sure they are not in your windows or
system32 folders. And all that other hoopla.
The crucial part is your php.ini files. The problem being that both versions will look at your PHPRC
setting and get the ini file path from that. So you'll end up with both versions running off
the same INI which is no good. The way around this is to use the CGI for one version and ISAPI for
the other.
The ISAPI dll never seems to look in it's own directory for the ini file, but the CGI exe does.
You can use that quirk to your advantage by naming the INI file for the ISAPI version
'php-isapi.ini' and setting the PHPRC environment variable to that path. Then for the CGI
version keep the php.ini in the same directory as php.exe.
Then set your virtual server to use either the ISAPI module for one version, or the CGI module for
the other version, and it should work. Test using phpinfo() to ensure each version is getting
it's ini file from the correct place.
Basically it seems that the ISAPI module will look in the path set in PHPRC first, and choose the
php-isapi.ini file. The CGI module will look in PHPRC first too, but it upon seeing no php.ini it
will then move on to search it's own directory, where it finds php.ini.
----
Server IP: 203.220.0.234
Probable Submitter: 61.29.12.150
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/install.windows.iis.php
Edit -- http://master.php.net/note/edit/63572
Del: integrated -- http://master.php.net/note/delete/63572/integrated
Del: useless -- http://master.php.net/note/delete/63572/useless
Del: bad code -- http://master.php.net/note/delete/63572/bad+code
Del: spam -- http://master.php.net/note/delete/63572/spam
Del: non-english -- http://master.php.net/note/delete/63572/non-english
Del: in docs -- http://master.php.net/note/delete/63572/in+docs
Del: other reasons-- http://master.php.net/note/delete/63572
Reject -- http://master.php.net/note/reject/63572
Search -- http://master.php.net/manage/user-notes.php