找回密码
 立即注册
搜索
查看: 232|回复: 8

拜托:我英文不行,麻烦英文好的给翻译一下PHP说明书中的一段。

[复制链接]

602

主题

4540

回帖

6994

积分

管理员

积分
6994
发表于 2003-4-24 01:48:05 | 显示全部楼层 |阅读模式
Installing PHP on Windows with IIS/PWS

  This section contains notes and hints specific to IIS (Microsoft
  Internet Information Server). Installing PHP for PWS/IIS 3 and
  PWS/IIS 4 or newer versions.

  Windows and PWS/IIS 3 - including PWS on Win 9x/ME

   The recommended method for configuring these servers is to use
   the REG file incuded with the distribution (pws-php4cgi.reg).
   You may want to edit this file and make sure the extensions and PHP
   install directories match your configuration - once you have done
   this, just double click on the file and it will update your registry.
   Alternatively, you can follow the steps below to do it manually.

   WARNING:
    These steps involve working directly with the Windows
    registry. One error here can leave your system in an unstable
    state. We highly recommend that you back up your registry
    first. The PHP Development team will not be held responsible if
    you damage your registry.

   Run Regedit.
   Navigate to:
    HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3Svc/Parameters/ScriptMap
   On the edit menu select: New->String Value.
   Type in the extension you wish to use for your php scripts. ex: .php
   Double click on the new string value and enter the path to
   php.exe in the value data field.
   ex: c:\php\php.exe
   Repeat these steps for each extension you wish to associate
   with PHP scripts.

   The following steps do not affect the web server installation and only
   apply if you want your php scripts to be executed when they are run
   from the command line (ex. run c:\myscripts\test.php) or by double
   clicking on them in a directory viewer window. You may wish to skip
   this step as you might prefer the php files to load into a text
   editor when you double click on them.

   Now navigate to: HKEY_CLASSES_ROOT
   On the edit menu select: New->Key
   Name the key to the extension you setup in the previous
   section. ex: .php
   Highlight the new key and in the right side pane, double click
   the "default value" and enter phpfile.
   Repeat the last step for each extension you set up in the
   previous section.
   Now create another New->Key under
   HKEY_CLASSES_ROOT and name it phpfile
   Highlight the new key 'phpfile' and in the
   right side pane, double click the "default value" and enter
   PHP Script.
   Right click on the 'phpfile' key and select
   New->Key, name it Shell.
   Right click on the 'Shell' key and select
   New->Key, name it open.
   Right click on the 'open' key and select
   New->Key, name it command.
   Highlight the new key 'command' and in the
   right side pane, double click the "default value" and enter
   the path to php.exe ex: c:\php\php.exe -q %1
   (don't forget the '%1').
   Exit Regedit.
   If using PWS on Windows, reboot to reload the registry.
   PWS and IIS 3 users now have a fully operational system. IIS 3
   users can use a nifty tool available at
   http://www.genusa.com/iis/iiscfg.html
   from Steven Genusa to configure their script maps.

  Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions

   To install PHP on an NT/2000/XP Server running IIS 4 or newer,
   follow these instructions. You have two options to set up
   PHP, using the CGI binary (php.exe) or with the ISAPI module.

   In either case, you need to start the Microsoft Management
   Console (may appear as 'Internet Services Manager', either
   in your Windows NT 4.0 Option Pack branch or the Control
   Panel=>Administrative Tools under Windows 2000). Then
   right click on your Web server node (this will most probably
   appear as 'Default Web Server'), and select 'Properties'.

   If you want to use the CGI binary, do the following:
    Under 'Home Directory', 'Virtual Directory', or
    'Directory', click on the 'Configuration' button,
    and then enter the App Mappings tab.

    Click Add, and in the Executable box, type:
    c:\php\php.exe (assuming that you have unzipped PHP in c:\php\).

    In the Extension box, type the file name extension you want
    associated with PHP scripts. Leave 'Method exclusions'
    blank, and check the Script engine checkbox. You may also
    like to check the 'check that file exists' box - for a small
    performance penalty, IIS (or PWS) will check that the script
    file exists and sort out authentication before firing up php.
    This means that you will get sensible 404 style error messages
    instead of cgi errors complaing that php did not output any data.

    You must repeat from 'Click Add...' for each extension you
    want associated with PHP scripts.
    (.php is recommended. although .phtml and .php3 may be
    required for legacy applications.)

    Set up the appropriate security. (This is done in Internet
    Service Manager), and if your NT Server uses NTFS file system,
    add execute rights for I_USR_ to the directory that contains
    php.exe

    !NOTE!: Since 4.1.2, the php.ini setting cgi.force_redirect defaults to '1'
    which effectively prevents the cgi from working within IIS. You need to set
    up at least a minimal php.ini file with the following directive:

      cgi.force_redirect = 0

    If it doesn't work immidiately, make sure you have the php.ini file in the
    right place (%SYSTEMROOT%\php.ini).


   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.

    Under 'Home Directory', click on the 'Configuration' button.
    Add a new entry to the Application Mappings. Use the path
    to the php4isapi.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)

43

主题

346

回帖

527

积分

高级会员

积分
527
发表于 2003-4-24 02:18:25 | 显示全部楼层
小于,你的这个我看的懂,不过翻译起来比较.....(翻译我不在行),要翻译的话你可能要把希望放在别人身上.不过怎么做..我懂.
如果你想怎么做的话,我给你网址,你自己看看
http://www.ysps.tp.edu.tw/about/download/php4nt/php_4_nt.htm
不过,这里面写少了一个东西,如果你编译不成功的话,你要在php.ini里面找一个叫cgi.force_redirect = 1,把它改为0就好了.
你试试看吧,这个是iis+php的.
回复

使用道具 举报

345

主题

2965

回帖

4634

积分

荣誉版主

海水

积分
4634
发表于 2003-4-24 11:08:12 | 显示全部楼层
正在翻译,不过只能抽时间做这个事情,希望最迟今晚能将译文粗稿贴出来。
回复

使用道具 举报

345

主题

2965

回帖

4634

积分

荣誉版主

海水

积分
4634
发表于 2003-4-24 11:18:50 | 显示全部楼层
是不是现在不需要翻译了?
回复

使用道具 举报

584

主题

6472

回帖

7093

积分

网站编辑

人模狗样

积分
7093
发表于 2003-4-25 20:37:24 | 显示全部楼层
今晚无事,本来想试着翻译一下。
当我在google里搜索文中一些缩写时,查到了译文,不知是否有用。

IIS/PWS 服务器
本节包括 IIS(Microsoft Internet Information Server)的说明和提示。以及 PWS/IIS 3,PWS 4 以及更新版本 和 IIS 4 以及更新版本 上 PHP 的安装说明。

Windows 和 PWS/IIS 3
推荐使用PHP发行包中包含的注册表文件(pws-php4cgi.reg)来配置服务器。如果你可能需要编辑这个文件,确认扩展库和 PHP 的安装目录符合你的设置,请双击该文件升级(我不知道怎么翻译update)注册表。
或者你可以按照以下步骤手工进行。

警告
以下步骤涉及到直接修改 Windows 注册表,如果出错会使你的系统不稳定。
我们强烈推荐你先备份注册表文件。PHP 开发小组将不对你损坏了注册表负责。



运行 Regedit。

找到HKEY_LOCAL_MACHINE /System /CurrentControlSet /Services /W3Svc /Parameters /ScriptMap。

在编辑菜单下选择:新建->字符串值(New->String Value)。

输入你想 PHP 脚本使用的文件后缀,例如 .php。

双击这个新的字符串值,并且在数据栏中输入 php.exe 的路径,例如:c:\php\php.exe。

如果你希望其他后缀(例如 .php3)也和 PHP 关联,重复以上步骤。


以下步骤并不影响 Web 服务器安装,并且仅适用于你的 PHP 脚本运行于命令行方式下(例如运行 c:\myscripts\test.php)或者在资源管理器中双击 PHP 文件。你可能更希望双击 PHP 文件时用文本编辑器打开,那么可以跳过这一步。



找到:HKEY_CLASSES_ROOT。

在编辑菜单中选择:新建->主键(New->Key)。

给该主键命名为你前一节中设置的后缀,例如:.php。

选中该主键,在右边一栏中双击“默认”("Default")并输入 phpfile。

对于你前一节中设置的其它后缀,重复以上步骤。

现在再在 HKEY_CLASSES_ROOT 下面新建一个主键(New->Key),命名为 phpfile。

选中主键 phpfile,在右边一栏中双击“默认”("Default")并输入 PHP Script。

右键点击主键 phpfile,选择新建->主键(New->Key),命名为 Shell。

右键点击主键 Shell,选择新建->主键(New->Key),命名为 open。

右键点击主键 open,选择新建->主键(New->Key),命名为command。

选中主键 command,在右边一栏中双击“默认”("Default")并且输入 php.exe 的路径,例如 c:\php\php.exe -q %1(别忘了 %1)。

退出 Regedit。

如果使用 PWS for Windows,重新启动计算机使注册表生效。


PWS和IIS 3 的用户现在就拥有一个完全操作正常的 PHP 系统了。IIS 3 用户还可以使用由 Steven Genusa 提供的一个极好的工具来配置脚本映射。

Windows 和 PWS 4 或更新版本
在 PWS 4 或者更新版本中安装 PHP 有两个选择。一种是 CGI 方式,还有一种是使用 ISAPI 模块的 DLL。

如果你选择 CGI 方式,按照以下步骤:


编辑 PHP 发行包中 SAPI 目录下的 pws-php4cgi.reg文件,在里面输入正确的 php.exe 的路径。反斜线必须双写,例如: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe",然后双击此文件将其合并(Merge)到注册表中。

在个人 Web 管理器中,右键点击你希望加入 PHP 支持的目录,选择“属性”(Properties),选中“执行“(Execute)多选框,并确认。


如果你选择 ISAPI 模块,按照以下步骤:


编辑 PHP 发行包中 SAPI 目录下的 pws-php4isapi.reg 文件,在里面输入正确的 php4isapi.dll 的路径。反斜线必须双写,例如: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll",然后双击此文件将其合并(Merge)到注册表中。

在个人 Web 管理器中,右键点击你希望加入 PHP 支持的目录,选择“属性”(Properties),选中“执行”(Execute)多选框,并确认。


无论哪种方式都需要重新启动计算机以使改变设置生效。

Windows NT/2000/XP 和 IIS 4 或更新版本
要在 NT/2000/XP 中的 IIS 4 或更新版本中安装 PHP,按照以下说明进行。有两种选择安装 PHP,CGI 方式(php.exe)或者 ISAPI 模块方式。

无论哪种方式,都需要打开管理中心(Microsoft Management Console,NT 4.0 Option Pack 中的 'Internet Services Manager',或者 2000/XP 中的控制面板 -> 管理工具(Control Panel->Administrative Tools))。用右键点击你的 Web Server 节点(多半是 'Default Web Site'),选择“属性”(Properties)。

如果你选择 CGI 方式,按照以下步骤:


在“主目录”(Home Directory),“虚拟目录”(Virtual Directory)或者“目录”(Directory)标签栏中,点击“配置”(Configuration)按钮,然后选择“应用程序映射”(App Mappings)标签栏。

点击“添加”(Add)按钮,在“可执行文件”(Executable)框中输入:c:\php\php.exe(假定你将 PHP 解压缩到了 c:\php\)。

在“文件后缀”(Extension)框中输入你要使用的 PHP 后缀。'Method exclusions' 空着,选中“脚本引擎”(Script engine)。你也可以选中“检查文件是否存在”(check that file exists)- 略微损失一点性能,IIS 会先检查脚本文件是否存在。这样会输出 404 的错误信息而不是 PHP 没有输出任何数据的 cgi 错误。

对于其它你想使用的 PHP 后缀重复以上两个步骤。通常使用的有 .php 和 .phtml,对于一些老的程序还需要 .php3。

设置适当的安全级别(在Internet Service Manager 中完成)。如果你使用了 NTFS,还需要在 php.exe 所在的目录中给 I_USR_ 用户加上“执行”的权限。


如果你选择ISAPI模块,按照以下步骤:


如果你不用 PHP 进行 HTTP 认证的话,你可以(也应该)跳过这一步。在 ISAPI Filters 中,加入一个新的 ISAPI filter。用 PHP 作为过滤器的名字,并且提供 php4isapi.dll 所在的路径。

在“主目录”(Home Directory)中点击“配置”(Configuration)按钮,在应用程序映射(Application Mappings)中添加一个新的条目。用 php4isapi.dll 的路径作为可执行文件(Executable),用 .php 作为文件后缀,选中“脚本引擎”(Script Engine),而 'Method exclusions' 为空。

完全停止 IIS 服务(NET STOP iisadmin)

重新启动IIS服务(NET START w3svc)

我晕!早知道网上有,就不翻译了,前天晚上还真翻译完了。不过,既然lixiwen兄弟已经贴出来了,就不再贴我翻的那个了。

另外,如果想在帖子中不出现表情符号的话,可以在“选项”中选中“在帖子中禁止表情符号”这一项。
——FreeBell注
回复

使用道具 举报

584

主题

6472

回帖

7093

积分

网站编辑

人模狗样

积分
7093
发表于 2003-4-25 20:49:50 | 显示全部楼层
faint,怎么会出现表情符号??
请小于将出现的两个表情符号都用":\\"代替
回复

使用道具 举报

584

主题

6472

回帖

7093

积分

网站编辑

人模狗样

积分
7093
发表于 2003-4-25 21:17:54 | 显示全部楼层
这个是地址:http://www.mamiyami.com/doc/php/install.iis.html
这个是“网页快照”,呵呵
(图片太大,分三次)

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

584

主题

6472

回帖

7093

积分

网站编辑

人模狗样

积分
7093
发表于 2003-4-25 21:18:35 | 显示全部楼层
第二页

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

584

主题

6472

回帖

7093

积分

网站编辑

人模狗样

积分
7093
发表于 2003-4-25 21:19:14 | 显示全部楼层
第三页

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海浩社区

GMT+8, 2025-9-21 12:22 , Processed in 0.087360 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表