PHP5 ISAPI on Windows 7 (64 bit)
I'm getting this message:
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.
However, I've set cgi.force_redirect equal to 0, and have reset IIS. I've done 开发者_JAVA技巧the following as well:
- Added C:\PHP to my system PATH
Ran this for the registry:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\PHP] "IniFilePath"="C:\PHP"
- Added the PHP ISAPI to the ISAPI and CGI Restrictions as being allowed
- Added the PHP ISAPI as an ISAPI module mapped to *.php
However, I keep getting that error message. I've tried everything!
I believe that you need to edit the php.ini file and set:
cgi.force_redirect = 0
EDIT BASED on comments
In the same php.ini you will find
extension_dir = "c:\php5\ext\"
change the directory to where you want it to be.
- The following bug report has people complaining about the same problem, and they ended up putting the php.ini in their c:\windows directory.
http://bugs.php.net/bug.php?id=42849&thanks=3
- Another option is to set a PHPRC environment variable with the location to php.ini ex. "c:\php"
The following link shows you the order in which the locations of php.ini are searched:
http://us2.php.net/manual/en/configuration.file.php
精彩评论