PHP配置文件不会加载IIS7 x64

时间:2009-05-22 20:16:00

标签: php iis-7 fastcgi

使用Fast CGI我无法读取php.ini文件。请参阅下面的phpinfo。

System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001
Build Date Mar 5 2009 19:43:24
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build=d:\php-sdk\snap_5_2\vc6\x86\php_build" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--with-pdo-oci=D:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared" "--enable-htscanner=shared"
Server API CGI/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)

我的php.ini文件驻留在我的c:\ php和我的c:\ windows中我确保它在网络服务的两个地方都有读取权限。

我添加了各种注册表设置,环境变量,并遵循网络上发现的多个教程,目前还没有骰子。每次都重新启动。

我的原始安装是使用MS“Web平台安装程序”,但我已重新启动。

1 个答案:

答案 0 :(得分:1)

当我在加载php.ini文件时遇到问题时,我发现以下设置是完成它的关键。

--with-config-file-path=<path-to-php.ini> --sysconfdir=<path-to-php.ini>

在我的情况下(在Linux上)它是

./configure .....   --with-config-file-path=/etc --sysconfdir=/etc