开发者

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:

  1. Added C:\PHP to my system PATH
  2. Ran this for the registry:

    Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\PHP] "IniFilePath"="C:\PHP"

  1. Added the PHP ISAPI to the ISAPI and CGI Restrictions as being allowed
  2. 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.

  1. 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

  1. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜