philip Mon Mar 28 21:09:02 2005 EDT
Modified files: /phpdoc/en/install/windows iis.xml Log: WS. Getting ready for a big edit.
http://cvs.php.net/diff.php/phpdoc/en/install/windows/iis.xml?r1=1.8&r2=1.9&ty=u Index: phpdoc/en/install/windows/iis.xml diff -u phpdoc/en/install/windows/iis.xml:1.8 phpdoc/en/install/windows/iis.xml:1.9 --- phpdoc/en/install/windows/iis.xml:1.8 Fri Sep 17 08:42:28 2004 +++ phpdoc/en/install/windows/iis.xml Mon Mar 28 21:09:02 2005 @@ -1,362 +1,360 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> - <sect1 id="install.windows.iis"> - <title>Microsoft IIS / PWS</title> +<!-- $Revision: 1.9 $ --> +<sect1 id="install.windows.iis"> + <title>Microsoft IIS / PWS</title> + <para> + This section contains notes and hints specific to IIS (Microsoft + Internet Information Server). We have included installation + instructions for <link linkend="install.windows.iis.iis3">PWS/IIS 3</link>, + <link linkend="install.windows.iis.pws4">PWS 4 or newer</link> and + <link linkend="install.windows.iis.iis4">IIS 4 or newer</link> versions. + </para> + + <note> + <title>Important for CGI users</title> + <para> + Read the <link linkend="faq.installation.forceredirect">faq + on cgi.force_redirect</link> for important details. This + directive needs to be set to <literal>0</literal>. + </para> + </note> + &warn.install.cgi; + + <sect2 id="install.windows.iis.iis3"> + <title>Windows and PWS/IIS 3</title> + + <simpara> + The recommended method for configuring these servers is to use + the REG file included with the distribution + (<filename>pws-php4cgi.reg</filename> in the SAPI folder for PHP 4, or + <filename>pws-php5cgi.reg</filename> in the main folder for PHP 5). + You may want to edit this file and make sure + the extensions and PHP install directories match your + configuration. Or you can follow the steps below to do it + manually. + </simpara> + <warning> <para> - This section contains notes and hints specific to IIS (Microsoft - Internet Information Server). We have included installation - instructions for <link linkend="install.windows.iis.iis3">PWS/IIS 3</link>, - <link linkend="install.windows.iis.pws4">PWS 4 or newer</link> and - <link linkend="install.windows.iis.iis4">IIS 4 or newer</link> versions. + 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. </para> + </warning> - <note> - <title>Important for CGI users</title> - <para> - Read the <link linkend="faq.installation.forceredirect">faq - on cgi.force_redirect</link> for important details. This - directive needs to be set to <literal>0</literal>. - </para> - </note> - &warn.install.cgi; - - <sect2 id="install.windows.iis.iis3"> - <title>Windows and PWS/IIS 3</title> - - <simpara> - The recommended method for configuring these servers is to use - the REG file included with the distribution - (<filename>pws-php4cgi.reg</filename> in the SAPI folder for PHP 4, or - <filename>pws-php5cgi.reg</filename> in the main folder for PHP 5). - You may want to edit this file and make sure - the extensions and PHP install directories match your - configuration. Or you can follow the steps below to do it - manually. - </simpara> - <warning> - <para> - 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. - </para> - </warning> - - <para> - <itemizedlist> - <listitem> - <simpara> - Run Regedit. - </simpara> - </listitem> - <listitem> - <simpara> - Navigate to: <literal>HKEY_LOCAL_MACHINE /System - /CurrentControlSet /Services /W3Svc /Parameters - /ScriptMap</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - On the edit menu select: <literal>New->String Value</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Type in the extension you wish to use for your php - scripts. For example <literal>.php</literal> - </simpara> - </listitem> - <listitem> - <simpara> - Double click on the new string value and enter the path to - <filename>php.exe</filename> in the value data field. ex: - <filename>C:\php\php.exe</filename> for PHP 4, or - <filename>C:\php\php-cgi.exe</filename> for PHP 5. - </simpara> - </listitem> - <listitem> - <simpara> - Repeat these steps for each extension you wish to associate - with PHP scripts. - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - 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 - <filename>C:\myscripts\test.php</filename>) or by double clicking - on them in a directory viewer window. You may wish to skip these - steps as you might prefer the PHP files to load into a text - editor when you double click on them. - </para> - <para> - <itemizedlist> - <listitem> - <simpara> - Navigate to: <literal>HKEY_CLASSES_ROOT</literal> - </simpara> - </listitem> - <listitem> - <simpara> - On the edit menu select: <literal>New->Key</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Name the key to the extension you setup in the previous - section. ex: <literal>.php</literal> - </simpara> - </listitem> - <listitem> - <simpara> - Highlight the new key and in the right side pane, double click - the "default value" and enter <literal>phpfile</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Repeat the last step for each extension you set up in the - previous section. - </simpara> - </listitem> - <listitem> - <simpara> - Now create another <literal>New->Key</literal> under - <literal>HKEY_CLASSES_ROOT</literal> and name it - <literal>phpfile</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Highlight the new key <literal>phpfile</literal> and in the - right side pane, double click the "default value" and enter - <literal>PHP Script</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Right click on the <literal>phpfile</literal> key and select - <literal>New->Key</literal>, name it <literal>Shell</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Right click on the <literal>Shell</literal> key and select - <literal>New->Key</literal>, name it <literal>open</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Right click on the <literal>open</literal> key and select - <literal>New->Key</literal>, name it - <literal>command</literal>. - </simpara> - </listitem> - <listitem> - <simpara> - Highlight the new key <literal>command</literal> and in the - right side pane, double click the "default value" and enter - the path to <filename>php.exe</filename>. ex: - <literal>c:\php\php.exe -q %1</literal>. (don't forget the - <literal>%1</literal>). - </simpara> - </listitem> - <listitem> - <simpara> - Exit Regedit. - </simpara> - </listitem> - <listitem> - <simpara> - If using PWS on Windows, reboot to reload the registry. - </simpara> - </listitem> - </itemizedlist> - </para> - <simpara> - PWS and IIS 3 users now have a fully operational system. IIS 3 - users can use a nifty <ulink url="&url.iiscfg;">tool</ulink> - from Steven Genusa to configure their script maps. - </simpara> - - </sect2> - - <sect2 id="install.windows.iis.pws4"> - <title>Windows and PWS 4 or newer</title> - - <simpara> - When installing PHP on Windows with PWS 4 or newer version, - you have two options. One to set up the PHP CGI binary, - the other is to use the ISAPI module DLL. - </simpara> - - <para> - If you choose the CGI binary, do the following: - <itemizedlist> - <listitem> - <simpara> - Edit the enclosed <filename>pws-php4cgi.reg</filename> / - <filename>pws-php5cgi.reg</filename> file (look into the SAPI folder - for PHP 4, or in the main folder for PHP 5) to reflect the location of - your <filename>php.exe</filename> / <filename>php-cgi.exe</filename>. - Backslashes should be escaped, for example: - <literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script - Map] ".php"="C:\\php\\php.exe"</literal> (change to - <literal>C:\\php\\php-cgi.exe</literal> if you are using PHP 5) - Now merge this registery file into your system; you may do - this by double-clicking it. - </simpara> - </listitem> - <listitem> - <simpara> - In the PWS Manager, right click on a given directory you want - to add PHP support to, and select Properties. Check the 'Execute' - checkbox, and confirm. - </simpara> - </listitem> - </itemizedlist> - </para> - - <para> - If you choose the ISAPI module, do the following: - <itemizedlist> - <listitem> - <simpara> - Edit the enclosed <filename>pws-php4isapi.reg</filename> / - <filename>pws-php5isapi.reg</filename> file (look into the SAPI folder - for PHP 4, or in the main folder for PHP 5) to reflect the location of - your <filename>php4isapi.dll</filename> / - <filename>php5isapi.dll</filename>. Backslashes should be escaped, for example: - <literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script - Map] ".php"="C:\\php\\sapi\\php4isapi.dll"</literal> (or - <literal>C:\\php\\php5isapi.dll</literal> for PHP 5) - Now merge this registery file into your system; you may do - this by double-clicking it. - </simpara> - </listitem> - <listitem> - <simpara> - In the PWS Manager, right click on a given directory you want to - add PHP support to, and select Properties. Check the 'Execute' - checkbox, and confirm. - </simpara> - </listitem> - </itemizedlist> - </para> - - </sect2> - - <sect2 id="install.windows.iis.iis4"> - <title>Windows NT/2000/XP and IIS 4 or newer</title> - - <simpara> - 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 (<filename>php.exe</filename> in PHP 4, or - <filename>php-cgi.exe</filename> in PHP 5) or with the ISAPI module. - </simpara> - - <simpara> - 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/XP). Then - right click on your Web server node (this will most probably - appear as 'Default Web Server'), and select 'Properties'. - </simpara> - - <para> - If you want to use the CGI binary, do the following: - <itemizedlist> - <listitem> - <simpara> - Under 'Home Directory', 'Virtual Directory', or - 'Directory', click on the 'Configuration' button, - and then enter the App Mappings tab. - </simpara> - </listitem> - <listitem> - <simpara> - Click Add, and in the Executable box, type: - <literal>C:\php\php.exe</literal> for PHP 4 or - <literal>C:\php\php-cgi.exe</literal> for PHP 5 (assuming - that you have unziped PHP in <filename>c:\php\</filename>). - </simpara> - </listitem> - <listitem> - <simpara> - 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 complaining that PHP did not output any data. - </simpara> - <simpara> - You must start over from the previous step for each - extension you want associated with PHP scripts. - <literal>.php</literal> and <literal>.phtml</literal> - are common, although <literal>.php3</literal> may be - required for legacy applications. - </simpara> - </listitem> - <listitem> - <simpara> - 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 - <filename>php.exe</filename> / <filename>php-cgi.exe</filename>. - </simpara> - </listitem> - </itemizedlist> - </para> - - <para> - To use the ISAPI module, do the following: - <itemizedlist> - <listitem> - <simpara> - 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 <filename>php4isapi.dll</filename> / - <filename>php5isapi.dll</filename>. - </simpara> - </listitem> - <listitem> - <simpara> - Under 'Home Directory', click on the 'Configuration' button. - Add a new entry to the Application Mappings. Use the path - to the <filename>php4isapi.dll</filename> / - <filename>php5isapi.dll</filename> as the Executable, supply - <literal>.php</literal> as the extension, leave 'Method exclusions' - blank, and check the 'Script engine' checkbox. - </simpara> - </listitem> - <listitem> - <simpara> - Stop IIS completely (NET STOP iisadmin) - </simpara> - </listitem> - <listitem> - <simpara> - Start IIS again (NET START w3svc) - </simpara> - </listitem> - </itemizedlist> - </para> - <para> - If you experience 100% CPU usage after some time, turn off the IIS - setting <literal>Cache ISAPI Application</literal>. - </para> - </sect2> - </sect1> + <para> + <itemizedlist> + <listitem> + <simpara> + Run Regedit. + </simpara> + </listitem> + <listitem> + <simpara> + Navigate to: <literal>HKEY_LOCAL_MACHINE /System + /CurrentControlSet /Services /W3Svc /Parameters + /ScriptMap</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + On the edit menu select: <literal>New->String Value</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Type in the extension you wish to use for your php + scripts. For example <literal>.php</literal> + </simpara> + </listitem> + <listitem> + <simpara> + Double click on the new string value and enter the path to + <filename>php.exe</filename> in the value data field. ex: + <filename>C:\php\php.exe</filename> for PHP 4, or + <filename>C:\php\php-cgi.exe</filename> for PHP 5. + </simpara> + </listitem> + <listitem> + <simpara> + Repeat these steps for each extension you wish to associate + with PHP scripts. + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + 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 + <filename>C:\myscripts\test.php</filename>) or by double clicking + on them in a directory viewer window. You may wish to skip these + steps as you might prefer the PHP files to load into a text + editor when you double click on them. + </para> + <para> + <itemizedlist> + <listitem> + <simpara> + Navigate to: <literal>HKEY_CLASSES_ROOT</literal> + </simpara> + </listitem> + <listitem> + <simpara> + On the edit menu select: <literal>New->Key</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Name the key to the extension you setup in the previous + section. ex: <literal>.php</literal> + </simpara> + </listitem> + <listitem> + <simpara> + Highlight the new key and in the right side pane, double click + the "default value" and enter <literal>phpfile</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Repeat the last step for each extension you set up in the + previous section. + </simpara> + </listitem> + <listitem> + <simpara> + Now create another <literal>New->Key</literal> under + <literal>HKEY_CLASSES_ROOT</literal> and name it + <literal>phpfile</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Highlight the new key <literal>phpfile</literal> and in the + right side pane, double click the "default value" and enter + <literal>PHP Script</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Right click on the <literal>phpfile</literal> key and select + <literal>New->Key</literal>, name it <literal>Shell</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Right click on the <literal>Shell</literal> key and select + <literal>New->Key</literal>, name it <literal>open</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Right click on the <literal>open</literal> key and select + <literal>New->Key</literal>, name it + <literal>command</literal>. + </simpara> + </listitem> + <listitem> + <simpara> + Highlight the new key <literal>command</literal> and in the + right side pane, double click the "default value" and enter + the path to <filename>php.exe</filename>. ex: + <literal>c:\php\php.exe -q %1</literal>. (don't forget the + <literal>%1</literal>). + </simpara> + </listitem> + <listitem> + <simpara> + Exit Regedit. + </simpara> + </listitem> + <listitem> + <simpara> + If using PWS on Windows, reboot to reload the registry. + </simpara> + </listitem> + </itemizedlist> + </para> + <simpara> + PWS and IIS 3 users now have a fully operational system. IIS 3 + users can use a nifty <ulink url="&url.iiscfg;">tool</ulink> + from Steven Genusa to configure their script maps. + </simpara> + </sect2> + + <sect2 id="install.windows.iis.pws4"> + <title>Windows and PWS 4 or newer</title> + + <simpara> + When installing PHP on Windows with PWS 4 or newer version, + you have two options. One to set up the PHP CGI binary, + the other is to use the ISAPI module DLL. + </simpara> + + <para> + If you choose the CGI binary, do the following: + <itemizedlist> + <listitem> + <simpara> + Edit the enclosed <filename>pws-php4cgi.reg</filename> / + <filename>pws-php5cgi.reg</filename> file (look into the SAPI folder + for PHP 4, or in the main folder for PHP 5) to reflect the location of + your <filename>php.exe</filename> / <filename>php-cgi.exe</filename>. + Backslashes should be escaped, for example: + <literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script + Map] ".php"="C:\\php\\php.exe"</literal> (change to + <literal>C:\\php\\php-cgi.exe</literal> if you are using PHP 5) + Now merge this registery file into your system; you may do + this by double-clicking it. + </simpara> + </listitem> + <listitem> + <simpara> + In the PWS Manager, right click on a given directory you want + to add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + </simpara> + </listitem> + </itemizedlist> + </para> + + <para> + If you choose the ISAPI module, do the following: + <itemizedlist> + <listitem> + <simpara> + Edit the enclosed <filename>pws-php4isapi.reg</filename> / + <filename>pws-php5isapi.reg</filename> file (look into the SAPI folder + for PHP 4, or in the main folder for PHP 5) to reflect the location of + your <filename>php4isapi.dll</filename> / + <filename>php5isapi.dll</filename>. Backslashes should be escaped, for example: + <literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script + Map] ".php"="C:\\php\\sapi\\php4isapi.dll"</literal> (or + <literal>C:\\php\\php5isapi.dll</literal> for PHP 5) + Now merge this registery file into your system; you may do + this by double-clicking it. + </simpara> + </listitem> + <listitem> + <simpara> + In the PWS Manager, right click on a given directory you want to + add PHP support to, and select Properties. Check the 'Execute' + checkbox, and confirm. + </simpara> + </listitem> + </itemizedlist> + </para> + </sect2> + + <sect2 id="install.windows.iis.iis4"> + <title>Windows NT/2000/XP and IIS 4 or newer</title> + + <simpara> + 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 (<filename>php.exe</filename> in PHP 4, or + <filename>php-cgi.exe</filename> in PHP 5) or with the ISAPI module. + </simpara> + + <simpara> + 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/XP). Then + right click on your Web server node (this will most probably + appear as 'Default Web Server'), and select 'Properties'. + </simpara> + + <para> + If you want to use the CGI binary, do the following: + <itemizedlist> + <listitem> + <simpara> + Under 'Home Directory', 'Virtual Directory', or + 'Directory', click on the 'Configuration' button, + and then enter the App Mappings tab. + </simpara> + </listitem> + <listitem> + <simpara> + Click Add, and in the Executable box, type: + <literal>C:\php\php.exe</literal> for PHP 4 or + <literal>C:\php\php-cgi.exe</literal> for PHP 5 (assuming + that you have unziped PHP in <filename>c:\php\</filename>). + </simpara> + </listitem> + <listitem> + <simpara> + 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 complaining that PHP did not output any data. + </simpara> + <simpara> + You must start over from the previous step for each + extension you want associated with PHP scripts. + <literal>.php</literal> and <literal>.phtml</literal> + are common, although <literal>.php3</literal> may be + required for legacy applications. + </simpara> + </listitem> + <listitem> + <simpara> + 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 + <filename>php.exe</filename> / <filename>php-cgi.exe</filename>. + </simpara> + </listitem> + </itemizedlist> + </para> + + <para> + To use the ISAPI module, do the following: + <itemizedlist> + <listitem> + <simpara> + 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 <filename>php4isapi.dll</filename> / + <filename>php5isapi.dll</filename>. + </simpara> + </listitem> + <listitem> + <simpara> + Under 'Home Directory', click on the 'Configuration' button. + Add a new entry to the Application Mappings. Use the path + to the <filename>php4isapi.dll</filename> / + <filename>php5isapi.dll</filename> as the Executable, supply + <literal>.php</literal> as the extension, leave 'Method exclusions' + blank, and check the 'Script engine' checkbox. + </simpara> + </listitem> + <listitem> + <simpara> + Stop IIS completely (NET STOP iisadmin) + </simpara> + </listitem> + <listitem> + <simpara> + Start IIS again (NET START w3svc) + </simpara> + </listitem> + </itemizedlist> + </para> + <para> + If you experience 100% CPU usage after some time, turn off the IIS + setting <literal>Cache ISAPI Application</literal>. + </para> + </sect2> +</sect1> <!-- Keep this comment at the end of the file Local variables: