Click to See Complete Forum and Search --> : Help with IIS 5 and PHP (latest version)


Anon
04-11-2002, 08:11 PM
I am trying to configue an IIS 5 server to run PHP

I used the first method in the install.txt file for setting it up (not the ISAPI module way)

when loading a PHP file I get the following error, can you help?

Security Alert! PHP CGI cannot be accessed directly

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. This variable is set, for example, by Apache's Action directive redirect.

it then goes on about security breaches etc.

thanks in advance

Anon
04-11-2002, 09:50 PM
I have seen that before. It's something missing or not set right in the php.ini file. I couldn't tell you what it was though. My hunch is that you probably downloaded your php from php.net. I would recommend that you get the one from http://www.php4win.de
It comes with very complete php.ini (has wayyyy more settings in it) and I have never had that error message with their version on IIS.

(Sorry I'm new to this so I can't really tell you what variable needs to be added/changed in the .ini file) :(

Anon
04-12-2002, 08:45 AM
In the php.ini file change cgi.force_redirect=1 to cgi.force_redirect=0. That should fix it.