Dear all: I am trying to test some script on my 2000 Pro station before I Install to my 2000Advanced Server. But problem occured. Here is what I did:
1: Unzipped file to c:\php and rename php.ini-dis to php.ini ->
2: edited doc_root = "c:\Inetpub\wwwroot" & extension_dir = "c:\php\ext" in php.ini ->
3: Add the path (c:\php) to PATH in Environment Variables ->
4: moved the php5ts.dll to c:\WINNT.
5: Now I ran the test script (Today is <? print strftime("%m/%d/%Y"); ?>) named it test.php and put it in wwwroot folder.
6: In I.E. typed in http://localhost/test.php, DOESN'T WORK!!! IT came up message exactly as follow:
<p>This PHP CGI binary was compiled with force-cgi-redirect enabled. This
means that a page will only be served up if the REDIRECT_STATUS CGI variable is
set, e.g. via an Apache Action directive.</p>
<p>For more information as to <i>why</i> this behaviour exists, see the <a href="http://php.net/security.cgi-bin">manual page for CGI security</a>.</p>
<p>For more information about changing this behaviour or re-enabling this webserver,
consult the installation file that came with this distribution, or visit
<a href="http://php.net/install.windows">the manual page</a>.</p>
I don't know what did I do wrong, please give me some advices! Appreciated it!
Mak
Problems Installing PHP on IIS 5 in 2000Pro
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
You need to edit your php.ini file. Find this section:
and change the 1 to 0. Restart your server and you should be golden.
Code: Select all
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
; cgi.force_redirect = 1
cgi.force_redirect = 0- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA