开发者

PHP and IIS Configuration

Recently i configured Wordpress blog in IIS... I works fine. and Now i try configure the another package(PHP)... it loads the Index page when click on any link it says **

unable to find includes/dbsettings.php

**

But the file is there in the location and someone said there is problem in path mapping php.ini file....i not PHP Dev..

Same package my friend installed works fine for him..So an开发者_JAVA百科y1 reply to fix will be thankful.

and i find 3 copies of PHP.ini configuration file in my system

C:\WordPress\php\php.ini C:\Program Files\PHP\php.ini C:\WINDOWS\php.ini

i dont know which configuraton file does IIS takes..

reply :)


Just a tip: directory separator isn't the same under Win/Linux. Maybe there's some includes that using the Linux one (/) but under Win you need to use: \

If your newly uploaded package isn't written properly maybe there's something about /'s.

More info here.


As far as your question about which configuration file is used, the explanation below is from http://www.php.net/manual/en/configuration.file.php. It is php-cgi.exe that looks for it, not IIS. Note that one of the places it looks is the PHPRC environment variable, which may be set in the IIS config file "applicationhost.config".

php.ini is searched for in these locations (in order): ◦ SAPI module specific location (PHPIniDir directive in Apache 2, -c command line option in CGI and CLI, php_ini parameter in NSAPI, PHP_INI_PATH environment variable in THTTPD)
◦ The PHPRC environment variable. Before PHP 5.2.0, this was checked after the registry key mentioned below.
◦ As of PHP 5.2.0, the location of the php.ini file can be set for different versions of PHP. The following registry keys are examined in order: [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y.z], [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x.y] and [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x], where x, y and z mean the PHP major, minor and release versions. If there is a value for IniFilePath in any of these keys, the first one found will be used as the location of the php.ini (Windows only).
◦[HKEY_LOCAL_MACHINE\SOFTWARE\PHP], value of IniFilePath (Windows only).
◦ Current working directory (except CLI).
◦ The web server's directory (for SAPI modules), or directory of PHP (otherwise in Windows).
◦ Windows directory (C:\windows or C:\winnt) (for Windows), or --with-config-file-path compile time option.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜