Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2952

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>Servers-IIS/PWS</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Installation"
HREF="installation.html"><LINK
REL="PREVIOUS"
TITLE="Servers-fhttpd"
HREF="install.fhttpd.html"><LINK
REL="NEXT"
TITLE="Servers-Netscape and iPlanet"
HREF="install.netscape-enterprise.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="install.fhttpd.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 3. Installation</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="install.netscape-enterprise.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="install.iis"
></A
>Servers-IIS/PWS</H1
><P
>&#13;    This section contains notes and hints specific to IIS (Microsoft
    Internet Information Server). Installing PHP for
    <A
HREF="install.iis.html#install.iis.iis3"
>PWS/IIS 3</A
>,
    <A
HREF="install.iis.html#install.iis.pws4"
>PWS 4 or newer</A
> and
    <A
HREF="install.iis.html#install.iis.iis4"
>IIS 4 or newer</A
> versions.
   </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Important for CGI users: </B
>
     Read the <A
HREF="faq.installation.html#faq.installation.forceredirect"
>faq
     on cgi.force_redirect</A
> for important details.  This
     directive needs to be set to <TT
CLASS="literal"
>0</TT
>.
    </P
></BLOCKQUOTE
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="install.iis.iis3"
></A
>Windows and PWS/IIS 3</H2
><P
>&#13;     The recommended method for configuring these servers is to use
     the REG file included 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. Or you can follow the steps below to do it
     manually.
    </P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Warning</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>&#13;      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.
     </P
></TD
></TR
></TABLE
></DIV
><P
>&#13;     <P
></P
><UL
><LI
><P
>&#13;        Run Regedit.
       </P
></LI
><LI
><P
>&#13;        Navigate to: <TT
CLASS="literal"
>HKEY_LOCAL_MACHINE /System
         /CurrentControlSet /Services /W3Svc /Parameters
         /ScriptMap</TT
>.
       </P
></LI
><LI
><P
>&#13;        On the edit menu select: <TT
CLASS="literal"
>New-&#62;String Value</TT
>.
       </P
></LI
><LI
><P
>&#13;        Type in the extension you wish to use for your php
        scripts. For example <TT
CLASS="literal"
>.php</TT
>
       </P
></LI
><LI
><P
>&#13;        Double click on the new string value and enter the path to
        <TT
CLASS="literal"
>php.exe</TT
> in the value data field. ex:
        <TT
CLASS="literal"
>c:\php\php.exe</TT
>.
       </P
></LI
><LI
><P
>&#13;        Repeat these steps for each extension you wish to associate
        with PHP scripts.
       </P
></LI
></UL
>
    </P
><P
>&#13;     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
     <TT
CLASS="filename"
>c:\myscripts\test.php</TT
>) 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.
    </P
><P
>&#13;     <P
></P
><UL
><LI
><P
>&#13;        Navigate to: <TT
CLASS="literal"
>HKEY_CLASSES_ROOT</TT
>
       </P
></LI
><LI
><P
>&#13;        On the edit menu select: <TT
CLASS="literal"
>New-&#62;Key</TT
>.
       </P
></LI
><LI
><P
>&#13;        Name the key to the extension you setup in the previous
        section. ex: <TT
CLASS="literal"
>.php</TT
>
       </P
></LI
><LI
><P
>&#13;        Highlight the new key and in the right side pane, double click 
        the "default value" and enter <TT
CLASS="literal"
>phpfile</TT
>.
       </P
></LI
><LI
><P
>&#13;        Repeat the last step for each extension you set up in the
        previous section.
       </P
></LI
><LI
><P
>&#13;        Now create another <TT
CLASS="literal"
>New-&#62;Key</TT
> under
        <TT
CLASS="literal"
>HKEY_CLASSES_ROOT</TT
> and name it
        <TT
CLASS="literal"
>phpfile</TT
>.
       </P
></LI
><LI
><P
>&#13;        Highlight the new key <TT
CLASS="literal"
>phpfile</TT
> and in the
        right side pane, double click the "default value" and enter
        <TT
CLASS="literal"
>PHP Script</TT
>.
       </P
></LI
><LI
><P
>&#13;        Right click on the <TT
CLASS="literal"
>phpfile</TT
> key and select
        <TT
CLASS="literal"
>New-&#62;Key</TT
>, name it <TT
CLASS="literal"
>Shell</TT
>.
       </P
></LI
><LI
><P
>&#13;        Right click on the <TT
CLASS="literal"
>Shell</TT
> key and select
        <TT
CLASS="literal"
>New-&#62;Key</TT
>, name it <TT
CLASS="literal"
>open</TT
>.
       </P
></LI
><LI
><P
>&#13;        Right click on the <TT
CLASS="literal"
>open</TT
> key and select
        <TT
CLASS="literal"
>New-&#62;Key</TT
>, name it
        <TT
CLASS="literal"
>command</TT
>. 
       </P
></LI
><LI
><P
>&#13;        Highlight the new key <TT
CLASS="literal"
>command</TT
> and in the
        right side pane, double click the "default value" and enter
        the path to <TT
CLASS="literal"
>php.exe</TT
>. ex:
        <TT
CLASS="literal"
>c:\php\php.exe -q %1</TT
>. (don't forget the
        <TT
CLASS="literal"
>%1</TT
>). 
       </P
></LI
><LI
><P
>&#13;        Exit Regedit.
       </P
></LI
><LI
><P
>&#13;        If using PWS on Windows, reboot to reload the registry.
       </P
></LI
></UL
>
    </P
><P
>&#13;     PWS and IIS 3 users now have a fully operational system. IIS 3
     users can use a nifty <A
HREF="http://www.genusa.com/iis/iiscfg.html"
TARGET="_top"
>tool</A
>
     from Steven Genusa to configure their script maps.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="install.iis.pws4"
></A
>Windows and PWS 4 or newer</H2
><P
>&#13;     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.
    </P
><P
>&#13;     If you choose the CGI binary, do the following:
     <P
></P
><UL
><LI
><P
>&#13;        Edit the enclosed <TT
CLASS="filename"
>pws-php4cgi.reg</TT
>
        file (look into the SAPI dir) to reflect the location of
        your <TT
CLASS="filename"
>php.exe</TT
>.  Backslashes should be 
        escaped, for example:
        <TT
CLASS="literal"
>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe"</TT
>
        Now merge this registery file into your system; you may do 
        this by double-clicking it.
       </P
></LI
><LI
><P
>&#13;        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.
       </P
></LI
></UL
>
    </P
><P
>&#13;     If you choose the ISAPI module, do the following:
     <P
></P
><UL
><LI
><P
>&#13;        Edit the enclosed <TT
CLASS="filename"
>pws-php4isapi.reg</TT
>
        file (look into the SAPI dir) to reflect the location of
        your <TT
CLASS="filename"
>php4isapi.dll</TT
>.  Backslashes should 
        be escaped, for example:
        <TT
CLASS="literal"
>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll"</TT
>
        Now merge this registery file into your system; you may do 
        this by double-clicking it.
       </P
></LI
><LI
><P
>&#13;        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. 
       </P
></LI
></UL
>
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="install.iis.iis4"
></A
>Windows NT/2000/XP and IIS 4 or newer</H2
><P
>&#13;     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.
    </P
><P
>&#13;     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=&#62;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'.
    </P
><P
>&#13;     If you want to use the CGI binary, do the following:
     <P
></P
><UL
><LI
><P
>&#13;        Under 'Home Directory', 'Virtual Directory', or
        'Directory', click on the 'Configuration' button,
        and then enter the App Mappings tab.
       </P
></LI
><LI
><P
>&#13;        Click Add, and in the Executable box, type:
        <TT
CLASS="literal"
>c:\php\php.exe</TT
> (assuming
        that you have unziped PHP in c:\php\).
        </P
></LI
><LI
><P
>&#13;        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.
       </P
><P
>&#13;        You must start over from the previous step for each
        extension you want associated with PHP scripts.
        <TT
CLASS="literal"
>.php</TT
> and <TT
CLASS="literal"
>.phtml</TT
>
        are common, although <TT
CLASS="literal"
>.php3</TT
> may be
        required for legacy applications.
       </P
></LI
><LI
><P
>&#13;        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
        <TT
CLASS="literal"
>php.exe</TT
>.
       </P
></LI
></UL
>
    </P
><P
>&#13;     To use the ISAPI module, do the following:
     <P
></P
><UL
><LI
><P
>&#13;        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.
       </P
></LI
><LI
><P
>&#13;        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
        <TT
CLASS="literal"
>.php</TT
> as the extension, leave Method
        exclusions blank, and check the Script engine checkbox.
       </P
></LI
><LI
><P
>&#13;        Stop IIS completely (NET STOP iisadmin)
       </P
></LI
><LI
><P
>&#13;        Start IIS again (NET START w3svc)
       </P
></LI
></UL
>
    </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="install.fhttpd.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="install.netscape-enterprise.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Servers-fhttpd</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="installation.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Servers-Netscape and iPlanet</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>