- 论坛徽章:
- 0
|
我在www.php.net 上下载了php-4.3.10-Win32.zip,解压在c:\php里然后按照install.txt的说明安装php.
1 Note: In PHP 4, you should move all files located in the dll and
sapi folders to the main folder (e.g. C:\php).
我把c:\php\sapi和c:\php\ddls 目录里的文件都移到了c:\php\
2To make php4ts.dll / php5ts.dll available you have three options: copy
the file to the Windows system directory, copy the file to the web
server's directory, or add your PHP directory, C:\php to the PATH. For
better maintenance, we advise you to follow the last option, add
C:\php to the PATH, because it will be simpler to upgrade PHP in the
future. Read more about how to add your PHP directory to PATH in the
corresponding FAQ entry.
我把win2003的环境变量path 加了 c:\php
3The next step is to set up a valid configuration file for PHP,
php.ini. There are two ini files distributed in the zip file,
php.ini-dist and php.ini-recommended. We advise you to use
php.ini-recommended, because we optimized the default settings in this
file for performance, and security. Read this well documented file
carefully because it has changes from php.ini-dist that will
drastically affect your setup. Some examples are display_errors being
off and magic_quotes_gpc being off. In addition to reading these,
study the ini settings and set every element manually yourself. If you
would like to achieve the best security, then this is the way for you,
although PHP works fine with these default ini files. Copy your chosen
ini-file to a directory that PHP is able to find and rename it to
php.ini. PHP searches for php.ini in the following locations (in
order):
* PHPIniDir directive (Apache 2 module only)
* HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath
* The PHPRC environment variable
* Directory of PHP (for CLI), or the web server's directory (for
SAPI modules)
* Windows directory (C:\windows or C:\winnt)
我把php.ini-recommended改为了php.ini ,然后放到了 c:\windws\目录中。
4 Note: If you're using NTFS on Windows NT, 2000, XP or 2003, make
sure that the user running the web server has read permissions to
your php.ini (e.g. make it readable by Everyone).
设置php.ini 的权限为everyone 可读。
5The following steps are optional:
* Edit your new php.ini file. If you plan to use OmniHTTPd, do not
follow the next step. Set the doc_root to point to your web
servers document_root. For example:
doc_root = c:\inetpub // for IIS/PWS
在php.ini中设置doc_root = c:\inetpub
6 * Choose the extensions you would like to load when PHP starts. See
the section about Windows extensions, about how to set up one, and
what is already built in. Note that on a new installation it is
advisable to first get PHP working and tested without any
extensions before enabling them in php.ini.
* On PWS and IIS, you can set the browscap configuration setting to
point to: c:\windows\system\inetsrv\browscap.ini on Windows 9x/Me,
c:\winnt\system32\inetsrv\browscap.ini on NT/2000, and
c:\windows\system32\inetsrv\browscap.ini on XP. For an up-to-date
browscap.ini, read the following FAQ.
设置 php.ini中browscap = c:\windows\system32\inetsrv\browscap.ini
7Windows NT/2000/XP and IIS 4 or newer
To use the ISAPI module, do the following:
* If you don't want to perform HTTP Authentication using PHP, you
can (and should) skip this step. Under ISAPI Filters, add a new
ISAPI filter. Use PHP as the filter name, and supply a path to the
php4isapi.dll / php5isapi.dll.
* Under 'Home Directory', click on the 'Configuration' button. Add a
new entry to the Application Mappings. Use the path to the
php4isapi.dll / php5isapi.dll as the Executable, supply .php as
the extension, leave 'Method exclusions' blank, and check the
'Script engine' checkbox.
* Stop IIS completely (NET STOP iisadmin)
* Start IIS again (NET START w3svc)
打开iis, 我增加了一个新站点php, 端口8080,然后到isapi 页,添加一个新的isapi ,名字为php,可执行文件为C:\php\php4isapi.dll, 然后到了主目录页,
点击配置,点击添加 ,可执行文件为C:\php\php4isapi.dll, 扩展名为.php,动作为:全部动作,并选中了脚本引擎选项。
然后再command窗口中,输入 stop net iisadmin
net start w3svc .
不知道哪里配置的不对,配置完了不好用。
在iis的 isapi 筛选器中显示的状态:未加载。
不知道怎么回事?请高手指点!
谢谢!!! |
|