home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 2004 July / APC0407D2.iso / workshop / apache / files / php-4.3.6-installer.exe / INSTALL.TXT < prev    next >
Encoding:
Text File  |  2004-04-14  |  32.1 KB  |  795 lines

  1. PHP/Windows Installation Notes
  2. ==============================
  3.  
  4. Installation on Windows 9x/Me/NT/2000/XP systems
  5. =============================================
  6.  
  7. There are two main ways to install PHP for Windows: either
  8. manually or by using the InstallShield installer.
  9.  
  10.  
  11. Windows InstallShield
  12. =====================
  13.  
  14.  The Windows PHP installer is available from the downloads page at
  15.  www.php.net. This installs the CGI version of PHP and, for IIS, PWS,
  16.  and Xitami, configures the web server as well.
  17.  Note that this version does *NOT* install any extensions or server
  18.  api versions of PHP.
  19.  
  20.  Install your selected HTTP server on your system and make sure
  21.  that it works.
  22.  
  23.  Run the executable installer and follow the instructions provided by
  24.  the installation wizard. Two types of installation are supported -
  25.  standard, which provides sensible defaults for all the settings it
  26.  can, and advanced, which asks questions as it goes along.
  27.  
  28.  The installation wizard gathers enough information to set up the
  29.  php.ini file and configure the web server to use PHP.
  30.  For IIS and also PWS on NT Workstation, a list of all the
  31.  nodes on the server with script map settings is displayed, and you
  32.  can choose those nodes to which you wish to add the PHP script
  33.  mappings.
  34.  
  35.  Once the installation has completed the installer will inform you
  36.  if you need to restart your system, restart the server, or just
  37.  start using PHP.
  38.  
  39. Windows Manual installation from zip binary distribution
  40. ========================================================
  41.  
  42.  This install guide will help you manually install and configure
  43.  PHP on your Windows 9x/Me/NT/2000/XP webservers. This guide was compiled by
  44.  Bob Silva. The original version can be found at
  45.  http://www.umesd.k12.or.us/php/win32install.html
  46.  
  47.  This guide provides manual installation support for:
  48.   Personal Web Server 3 and 4 or newer
  49.   Internet Information Server 3 and 4 or newer
  50.   Apache 1.3.x
  51.   Apache 2.0.x  (experimental)
  52.   OmniHTTPd 2.0b1 and up
  53.   Oreilly Website Pro
  54.   Xitami
  55.   SunONE Webserver, Netscape Enterprise Server, iPlanet
  56.  
  57.  PHP 4 for Windows comes in two flavours - a CGI executable (php.exe),
  58.  and several SAPI modules (for exapmle php4isapi.dll). The latter form
  59.  is new to PHP 4, and provides significantly improved performance and
  60.  some new functionality. However, please note that the SAPI modules
  61.  are *NOT* yet considered to be production quality.
  62.  In particular, with the ISAPI module, you are likely to encounter serious
  63.  reliability problems especially on platforms older than W2K - you may
  64.  witness a lot of server 500 errors and suffer from other server modules
  65.  such as ASP also failing. You have been warned!
  66.  
  67.  The reason for this is that the PHP SAPI modules are using the
  68.  thread-safe version of the PHP code, which is new to PHP 4, and has
  69.  not yet been tested and pounded enough to be considered completely
  70.  stable, and there are actually a few known bugs. On the other hand,
  71.  some people have reported very good results with the SAPI modules,
  72.  and there a few reports of problems with the Apache module version.
  73.  In short - your mileage may vary;  If you need
  74.  absolute stability, trade the performance of the SAPI modules
  75.  with the stability of the CGI executable.
  76.  
  77.  If you choose one of the SAPI modules and use Windows 95, be sure
  78.  to download the DCOM update from
  79.  http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe"
  80.  For the ISAPI module, an ISAPI 4.0 compliant Web server
  81.  is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is
  82.  *NOT* supported; You should download and install the Windows NT 4.0
  83.  Option Pack with IIS 4.0 if you want native PHP support.
  84.  
  85.  The following steps should be performed on all installations
  86.  before the server specific instructions.
  87.  
  88.   Extract the distribution file to a directory of your choice.
  89.   C:\PHP\ is a good start.
  90.  
  91.   You need to ensure that the dlls which php uses can be found. The precise
  92.   dlls involved depend on which web server you use and whether you want to
  93.   run php as a cgi or as a server module. php4ts.dll is always used. If you are
  94.   using a server module (e.g. isapi or apache) then you will need the relevent
  95.   dll from the sapi folder. If you are using any php extension dlls then you
  96.   will need those as well. To make sure that the dlls can be found, you can
  97.   either copy them to the system directory (e.g. winnt/system32 or 
  98.   windows/system) or you can make sure that they live in the same directory
  99.   as the main php executable or dll your web server will use (e.g. php.exe,
  100.   php4apache.dll).
  101.  
  102.   Copy the file, php.ini-dist to your %WINDOWS% directory on
  103.   Windows 95/98 or to your %SYSTEMROOT% directory under Windows NT,
  104.   Windows 2000 or Windows XP and rename it to php.ini. Your %WINDOWS% or
  105.   %SYSTEMROOT% directory is typically:
  106.    c:\windows for Windows 95/98
  107.    c:\winnt or c:\winnt40 for NT/2000/XP servers
  108.   We will refer to %SYSTEMROOT% for both %WINDOWS% or
  109.   %SYSTEMROOT% throughout the text.
  110.  
  111.   Edit your php.ini file:
  112.  
  113.    You will need to change the 'extension_dir' setting to
  114.    point to your php-install-dir, or where you have placed
  115.    your 'php_*.dll' files. ex: c:\php
  116.  
  117.    If you are using OmniHTTPd, do not follow the next step.
  118.    Set the 'doc_root' to point to your webservers
  119.    document_root. ex: c:\apache\htdocs or c:\webroot
  120.  
  121.    Choose which extensions you would like to load when PHP
  122.    starts, noting that several extensions are already built
  123.    into the Windows release, see the section about
  124.    Windows extensions for details of the built-in extensions.
  125.    You can uncomment the: 'extension=php_*.dll' lines
  126.    in php.ini to load these extensions.
  127.  
  128.    Note that on a new installation it is advisable to first get
  129.    PHP working and tested without any extensions before enabling
  130.    them in php.ini.
  131.  
  132.    On PWS and IIS, you can set the browscap.ini
  133.    to point to: 'c:\windows\system\inetsrv\browscap.ini' on
  134.    Windows 9x/Me and 'c:\winnt\system32\inetsrv\browscap.ini'
  135.    on NT/2000/XP Server. 
  136.  
  137.    More information on the capabilities of browscap can be found here:
  138.  
  139.    http://www.php.net/manual/en/function.get-browser.php
  140.  
  141.    Note that the mibs directory supplied with the Windows distribution
  142.    contains support files for SNMP. This directory should be moved to
  143.    DRIVE:\usr\mibs (DRIVE being the drive where PHP is installed.)
  144.  
  145.  
  146. Installation of Windows extensions
  147. ==================================
  148.  
  149.  After installing PHP and a webserver on Windows, you will
  150.  probably want to install some extensions for added functionality.
  151.  The following table describes some of the extensions available. As
  152.  described in the manual installation steps, you can choose which
  153.  extensions you would like to load when PHP starts by uncommenting the:
  154.  extension=php_*.dll' lines in php.ini.
  155.  
  156.  
  157.  ATTENTION! ATTENTION! ATTENTION!
  158.    Some extra DLLs are required for some PHP extensions. Please copy the
  159.    bundled dlls from the 'dlls/' directory in distribution package to your
  160.    windows/system (Win9.x) or winnt/system32 (WinNT, Win2000, XP) directory.
  161.    If you already have these DLLs installed on your system,
  162.    overwrite them only if something is not working correctly.
  163.    Before overwriting them, it is a good idea to backup them or move them to
  164.    another folder - just in case something goes wrong.
  165.  
  166.    Download the latest version of the Microsoft Data Access Components (MDAC)
  167.    for your platform, especially Microsoft Windows 9x/NT4 users.
  168.    MDAC is available at http://www.microsoft.com/data/ .
  169.  
  170.    Also note that some extensions need 3rd party libraries, 
  171.    e.g. php_oci8.dll needs the Oracle 8 client libraries to be installed
  172.    on your system. These are not bundled with PHP distribution.
  173.  ATTENTION! ATTENTION! ATTENTION!
  174.  
  175.  
  176.  The DLLs for PHP extensions are prefixed with 'php_'.  This
  177.  prevents confusion between PHP extensions and their supporting
  178.  libraries.
  179.  
  180.  Note:
  181.  In PHP 4.0.5 MySQL, ODBC, FTP, Calendar, BCMath, COM, PCRE,
  182.  Session, WDDX and XML support is built-in. You don't need to
  183.  load any additional extensions in order to use these functions.
  184.  
  185.  Examples of PHP Extensions
  186.  
  187.   php_dbase.dll     dBase functions
  188.   php_filepro.dll   Read-only access to Filepro databases
  189.   php_gd.dll        GD library functions for GIF manipulation
  190.   php_hyperwave.dll HyperWave functions
  191.   php_imap.dll      IMAP functions
  192.   php_ldap.dll      LDAP functions
  193.   php_mssql.dll     MSSQL client (requires MSSQL DB-Libraries)
  194.   php_snmp.dll      SNMP get and walk functions (NT only!)
  195.   php_zlib.dll      ZLib compression functions
  196.  
  197.  For more information see the section about Windows extensions at
  198.  http://www.php.net/manual/en/install.windows.php#install.windows.extensions
  199.  
  200.  
  201. Web server configuration
  202. ========================
  203.  
  204.  Installing PHP on Windows with Apache 1.3.x
  205.  
  206.  ------------------------------------------------------------
  207.  ATTENTION: Apache 2 Users
  208.  
  209.    At this time, support for Apache 2 is experimental.  It's
  210.    highly recommended you use PHP with Apache 1.3.x and not
  211.    Apache 2.  Documentation for installing Apache 2 on windows 
  212.    can be seen here:
  213.  
  214.       http://www.php.net/manual/en/install.apache2.php
  215.  
  216.    With the basic difference being that when installing as a 
  217.    module you'll use php4apache2.dll instead of php4apache.dll
  218.    Both files are included within this release.
  219.   ------------------------------------------------------------
  220.  
  221.  
  222.   There are two ways to set up PHP to work with Apache 1.3.x
  223.   on Windows. One is to use the CGI binary (php.exe),
  224.   the other is to use the Apache module dll. In either case
  225.   you need to stop the Apache server, and edit your
  226.   httpd.conf or srm.conf to configure Apache to work with PHP.
  227.   We'll refer to either of these files with httpd.conf in the
  228.   text.
  229.  
  230.   Although there can be a few variations of configuring PHP
  231.   under Apache, these are simple enough to be used by the
  232.   newcomer. Please consult the Apache Docs for further
  233.   configuration directives.
  234.  
  235.  
  236.   Installing PHP for Apache as module
  237.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  238.  
  239.   Now that version 4.1 introduces a safer sapi module, we recommend
  240.   that you configure PHP as a module in Apache.
  241.  
  242.   To accomplish this, you have to load the php4apache.dll in your
  243.   Apache httpd.conf.
  244.  
  245.   !! NOTE !!
  246.   Whereever you load php4apache.dll from, php4apache.dll also
  247.   needs the php4ts.dll also included in the PHP4 distribution.
  248.   php4apache.dll depends on php4ts.dll which is loaded as soon as
  249.   Apache loads php4apache.dll. If php4ts.dll can't be found, you
  250.   usually get an error like (also see the "Problems?" section at
  251.   the end of the file):
  252.  
  253.     Cannot load c:/php/sapi/php4apache.dll into server
  254.  
  255.   So where does php4ts.dll has to be to be properly loaded ?
  256.   php4ts.dll is searched in the following order:
  257.  
  258.   1) in the directory where apache.exe is start from
  259.   2) in the directory where php4apache.dll is loaded from
  260.   3) in your %SYSTEMROOT%\System32, %SYSTEMROOT%\system and
  261.      %SYSTEMROOT% directory.
  262.      Note: %SYSTEMROOT%\System32 only applies to Windows NT/2000/XP)
  263.   4) in your whole %PATH%
  264.  
  265.   Note: What is %SYSTEMROOT% ? Depending on your Windows
  266.         installation this may be for example c:\winnt or C:\windows
  267.  
  268.   Usually you would just copy it over to %SYSTEMROOT%\System32.
  269.   But if you want to have multiple PHP installations (for
  270.   whatever reason) this is a bad idea. For this circumstance the
  271.   safest thing is to let php4ts.dll reside in the same directory
  272.   where php4apache.dll is loaded from (see point 2 above).
  273.  
  274.  
  275.   After you've set up the file layout properly, you're ready to
  276.   finally configure Apache to load the PHP4 module. Just add the
  277.   following lines to your httpd.conf:
  278.  
  279.    LoadModule php4_module c:/php/sapi/php4apache.dll
  280.    AddModule mod_php4.c
  281.    AddType application/x-httpd-php .php
  282.  
  283.   Note: Especially newer versions of Apache do not need the
  284.         AddModule directive anymore, your milage may vary.
  285.  
  286.  
  287.   Where do I have to put the php.ini ?
  288.    The php.ini files is only searched in two places:
  289.    1) in your Apache installation directory (e.g. c:\apache\apache)
  290.    2) in your %SYSTEMROOT% directory.
  291.   
  292.  
  293.   Installing PHP for Apache as CGI binary
  294.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  295.  
  296.   If you wish to install PHP as a CGI binary, read this first:
  297.  
  298.     http://www.cert.org/advisories/CA-1996-11.html
  299.  
  300.   and then if you are really sure, insert these lines to your conf file: 
  301.  
  302.    ScriptAlias /php/ "c:/php/"
  303.    AddType application/x-httpd-php .php
  304.    Action application/x-httpd-php "/php/php.exe"
  305.  
  306.   Note, we consider installing PHP like this suicidal.
  307.  
  308.   As a further precaution, we recommend you change the "/php/"
  309.   ScriptAlias to something more random, to prevent the binary being
  310.   called directly, which is a security risk.
  311.  
  312.   Remember when you have finished to restart the server, for example,
  313.    NET STOP APACHE
  314.   followed by
  315.    NET START APACHE
  316.  
  317.   To use the source code highlighting feature, add the following
  318.   line to your apache httpd.conf file:
  319.  
  320.     AddType application/x-httpd-php-source .phps
  321.  
  322.   Note, this will only work when you install php as a sapi module.
  323.   If you wish to use this feature with the cgi binary, create a new
  324.   file, and use the show_source("path/to/original_file.php"); function.
  325.  
  326.  
  327.   Forward or backslash in pathnames ?
  328.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  329.   On Win-Apache, path names can contain either forward- or backslashes.
  330.   Example:
  331.  
  332.     LoadModule php4_module C:\php\sapi\php4apache.dll
  333.  
  334.   works as good as 
  335.  
  336.     LoadModule php4_module C:/php/sapi/php4apache.dll
  337.  
  338.   You even can mix the slash-style:
  339.  
  340.     LoadModule php4_module C:\php/sapi\php4apache.dll
  341.  
  342. ----------------------------------------------------------
  343.  
  344.  Installing PHP on Windows with IIS/PWS
  345.  
  346.   This section contains notes and hints specific to IIS (Microsoft
  347.   Internet Information Server). Installing PHP for PWS/IIS 3 and
  348.   PWS/IIS 4 or newer versions.
  349.  
  350.   Windows and PWS/IIS 3 - including PWS on Win 9x/ME
  351.  
  352.    The recommended method for configuring these servers is to use
  353.    the REG file incuded with the distribution (pws-php4cgi.reg).
  354.    You may want to edit this file and make sure the extensions and PHP
  355.    install directories match your configuration - once you have done
  356.    this, just double click on the file and it will update your registry.
  357.    Alternatively, you can follow the steps below to do it manually.
  358.  
  359.    WARNING:
  360.     These steps involve working directly with the Windows
  361.     registry. One error here can leave your system in an unstable
  362.     state. We highly recommend that you back up your registry
  363.     first. The PHP Development team will not be held responsible if
  364.     you damage your registry.
  365.  
  366.    Run Regedit.
  367.    Navigate to:
  368.     HKEY_LOCAL_MACHINE/System/CurrentControlSet/Services/W3Svc/Parameters/ScriptMap
  369.    On the edit menu select: New->String Value.
  370.    Type in the extension you wish to use for your php scripts. ex: .php
  371.    Double click on the new string value and enter the path to
  372.    php.exe in the value data field.
  373.    ex: c:\php\php.exe
  374.    Repeat these steps for each extension you wish to associate
  375.    with PHP scripts.
  376.  
  377.    The following steps do not affect the web server installation and only
  378.    apply if you want your php scripts to be executed when they are run
  379.    from the command line (ex. run c:\myscripts\test.php) or by double
  380.    clicking on them in a directory viewer window. You may wish to skip
  381.    this step as you might prefer the php files to load into a text
  382.    editor when you double click on them.
  383.  
  384.    Now navigate to: HKEY_CLASSES_ROOT
  385.    On the edit menu select: New->Key
  386.    Name the key to the extension you setup in the previous
  387.    section. ex: .php
  388.    Highlight the new key and in the right side pane, double click
  389.    the "default value" and enter phpfile.
  390.    Repeat the last step for each extension you set up in the
  391.    previous section.
  392.    Now create another New->Key under
  393.    HKEY_CLASSES_ROOT and name it phpfile
  394.    Highlight the new key 'phpfile' and in the
  395.    right side pane, double click the "default value" and enter
  396.    PHP Script.
  397.    Right click on the 'phpfile' key and select
  398.    New->Key, name it Shell.
  399.    Right click on the 'Shell' key and select
  400.    New->Key, name it open.
  401.    Right click on the 'open' key and select
  402.    New->Key, name it command.
  403.    Highlight the new key 'command' and in the
  404.    right side pane, double click the "default value" and enter
  405.    the path to php.exe ex: c:\php\php.exe -q %1
  406.    (don't forget the '%1').
  407.    Exit Regedit.
  408.    If using PWS on Windows, reboot to reload the registry.
  409.    PWS and IIS 3 users now have a fully operational system. IIS 3
  410.    users can use a nifty tool available at
  411.    http://www.genusa.com/iis/iiscfg.html
  412.    from Steven Genusa to configure their script maps.
  413.  
  414.   Windows NT/2000/XP and IIS 4 or newer and PWS 4 on NT Workstation or W2K non server editions
  415.  
  416.    To install PHP on an NT/2000/XP Server running IIS 4 or newer,
  417.    follow these instructions. You have two options to set up
  418.    PHP, using the CGI binary (php.exe) or with the ISAPI module.
  419.  
  420.    In either case, you need to start the Microsoft Management
  421.    Console (may appear as 'Internet Services Manager', either
  422.    in your Windows NT 4.0 Option Pack branch or the Control
  423.    Panel=>Administrative Tools under Windows 2000). Then
  424.    right click on your Web server node (this will most probably
  425.    appear as 'Default Web Server'), and select 'Properties'.
  426.  
  427.    If you want to use the CGI binary, do the following:
  428.     Under 'Home Directory', 'Virtual Directory', or
  429.     'Directory', click on the 'Configuration' button,
  430.     and then enter the App Mappings tab.
  431.  
  432.     Click Add, and in the Executable box, type:
  433.     c:\php\php.exe (assuming that you have unzipped PHP in c:\php\).
  434.  
  435.     In the Extension box, type the file name extension you want
  436.     associated with PHP scripts. Leave 'Method exclusions'
  437.     blank, and check the Script engine checkbox. You may also
  438.     like to check the 'check that file exists' box - for a small
  439.     performance penalty, IIS (or PWS) will check that the script
  440.     file exists and sort out authentication before firing up php.
  441.     This means that you will get sensible 404 style error messages
  442.     instead of cgi errors complaing that php did not output any data.
  443.  
  444.     You must repeat from 'Click Add...' for each extension you
  445.     want associated with PHP scripts.
  446.     (.php is recommended. although .phtml and .php3 may be
  447.     required for legacy applications.)
  448.  
  449.     Set up the appropriate security. (This is done in Internet
  450.     Service Manager), and if your NT Server uses NTFS file system,
  451.     add execute rights for I_USR_ to the directory that contains
  452.     php.exe
  453.  
  454.     !NOTE!: Since 4.1.2, the php.ini setting cgi.force_redirect defaults to '1'
  455.     which effectively prevents the cgi from working within IIS. You need to set
  456.     up at least a minimal php.ini file with the following directive:
  457.  
  458.       cgi.force_redirect = 0
  459.  
  460.     If it doesn't work immidiately, make sure you have the php.ini file in the
  461.     right place (%SYSTEMROOT%\php.ini).
  462.  
  463.  
  464.    To use the ISAPI module, do the following:
  465.  
  466.     If you don't want to perform HTTP Authentication using PHP,
  467.     you can (and should) skip this step. Under ISAPI Filters,
  468.     add a new ISAPI filter. Use PHP as the filter name, and
  469.     supply a path to the php4isapi.dll.
  470.  
  471.     Under 'Home Directory', click on the 'Configuration' button.
  472.     Add a new entry to the Application Mappings. Use the path
  473.     to the php4isapi.dll as the Executable, supply .php as the
  474.     extension, leave Method exclusions blank, and check the
  475.     Script engine checkbox.
  476.  
  477.     Stop IIS completely (net stop iisadmin)
  478.     Start IIS again  (net start w3svc)
  479.  
  480. ----------------------------------------------------------
  481.  
  482.  Installing PHP on Windows with OmniHTTPd Server
  483.  
  484.   This section contains notes and hints specific to
  485.   OmniHTTPd 2.0b1 and up for Windows
  486.  
  487.   This has got to be the easiest config there is:
  488.  
  489.   Step 1: Install OmniHTTPd server.
  490.   Step 2: Right click on the blue OmniHTTPd icon in the system
  491.           tray and select 'Properties'
  492.   Step 3: Click on 'Web Server Global Settings'
  493.   Step 4: On the 'External' tab, enter:
  494.           virtual = .php | actual = c:\path-to-php-dir\php.exe
  495.           and use the Add button.
  496.   Step 5: On the Mime tab, enter:
  497.           virtual = wwwserver/stdcgi | actual = .php
  498.           and use the Add button.
  499.   Step 6: Click 'OK'
  500.  
  501.   Repeat steps 2 - 6 for each extension you want to associate with PHP.
  502.   NOTE:
  503.    Some OmniHTTPd packages come with built in PHP support.
  504.    You can choose at setup time to do a custom setup, and
  505.    uncheck the PHP component. We recommend you to use the latest
  506.    PHP binaries. Some OmniHTTPd servers come with PHP 4 beta
  507.    distributions, so you should choose not to set up
  508.    the built in support, but install your own. If the server
  509.    is already on your machine, use the Replace button in Step
  510.    4 and 5 to set the new, correct information.
  511.  
  512. ----------------------------------------------------------
  513.  
  514.  Installing PHP on Windows with Oreilly Website Pro
  515.  
  516.   This section contains notes and hints specific to Oreilly
  517.   Website Pro 2.5 and up for Windows
  518.  
  519.   This list describes how to set up the PHP CGI binary
  520.   or the ISAPI module to work with Oreilly Website Pro
  521.   on Windows.
  522.  
  523.    Edit the Server Properties and select the tab "Mapping".
  524.  
  525.    From the List select "Associations" and enter the desired
  526.    extension (".php") and the path to the CGI exe (ex. c:\php\php.exe)
  527.    or the ISAPI dll file (ex. c:\php\sapi\php4isapi.dll).
  528.  
  529.    Select "Content Types" add the same extension ".php"
  530.    and enter the content type. If you choose the CGI exe
  531.    file, enter 'wwwserver/shellcgi', if you chose the
  532.    ISAPI module, enter 'wwwserver/isapi' (both without quotes).
  533.  
  534. ----------------------------------------------------------
  535.  
  536.  Installing PHP on Windows with Xitami
  537.  
  538.   This section contains notes and hints specific to Xitami.
  539.  
  540.   This list describes how to set up the PHP CGI binary
  541.   to work with Xitami on Windows.
  542.  
  543.    Make sure the webserver is running, and point
  544.    your browser to xitamis admin console
  545.    (usually http://127.0.0.1/admin), and click on
  546.    Configuration.
  547.  
  548.    Navigate to the Filters, and put the
  549.    extension which php should parse (i.e. .php)
  550.    into the field File extensions (.xxx).
  551.  
  552.    In Filter command or script put the path and name
  553.    of your php executable i.e. c:\php\php.exe.
  554.  
  555.    Press the 'Save' icon.
  556.  
  557. ----------------------------------------------------------
  558.  
  559.  Installing PHP on Windows with Netscape/iPlanet/SunONE servers.
  560.  
  561.  
  562.   These instructions are targetted at Netscape Enterprise Web Server and
  563.   SUN/Netscape Alliance iPlanet Web Server/SunONE Webserver.
  564.   On other web servers your milage may vary.
  565.   
  566.   Netscape/iPlanet/SunONE config files are located in:
  567.   
  568.       <path-to-server>\https-servername\config
  569.   
  570.   
  571.   Add the following line to mime.types (you can do that by the administration server):
  572.   
  573.       type=magnus-internal/x-httpd-php    exts=php
  574.   
  575.   
  576.   Place the following two lines after mime.types init in
  577.   <path-to-server>\https-servername\config\obj.conf (for servers < 6) or
  578.   for iPlanet/SunONE Web Server 6.0 and above however at the end of the
  579.   <path-to-server>\https-servername\config\magnus.conf file:
  580.   
  581.       Init fn="load-modules" funcs="php4_init,php4_execute,php4_auth_trans" shlib="c:/path/to/PHP4/php4nsapi.dll"
  582.       Init fn=php4_init errorString="Failed to initialize PHP!" [php_ini="c:/path/to/php.ini"]
  583.    
  584.   In obj.conf (for virtual server classes [SunONE 6.0+] in their vserver.obj.conf):
  585.   
  586.       <Object name="default">
  587.       .
  588.       .
  589.       .
  590.       # NOTE this next line should happen after all 'ObjectType' and before
  591.       # all 'AddLog' lines
  592.       # You can modify some entries in php.ini request specific by adding it to the Service
  593.       # directive, e.g. doc_root="/path"
  594.       # For boolean ini-keys please use 0/1 as value, NOT "On","Off",... (this will not work
  595.       # correctly), e.g. zlib.output_compression=1 instead of zlib.output_compression="On"
  596.   
  597.       Service fn="php4_execute" type="magnus-internal/x-httpd-php" [inikey=value ...]
  598.       .
  599.       .
  600.       .
  601.       </Object>
  602.   
  603.   This is only needed if you want to configure a directory that only consists of
  604.   PHP scripts (same like a cgi-bin directory):
  605.   
  606.       <Object name="x-httpd-php">
  607.       ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
  608.       Service fn="php4_execute" [inikey=value ...]
  609.       </Object>
  610.   
  611.   After that you can configure a directory in the Administration server and assign it
  612.   the style "x-httpd-php". All files in it will get executed as PHP. This is nice to
  613.   hide PHP usage by renaming files to .html
  614.  
  615. ----------------------------------------------------------
  616.  
  617.  Installing PHP on The Sambar Server
  618.  
  619.   This section contains notes and hints specific to Sambar
  620.  
  621.    Find the file called mappings.ini (config directory) in your Sambar
  622.    install directory
  623.  
  624.    Open mappings.ini and add the following line under [isapi]
  625.  
  626.    *.php = c:\php\php4isapi.dll
  627.     Note: The above assumes that PHP was installed in c:\php
  628.  
  629.    Restart the server
  630.  
  631. ----------------------------------------------------------
  632.  
  633. Problems?
  634. =========
  635.  
  636.  Read the FAQ
  637.  
  638.   Some problems are more common than others.  The most common ones
  639.   are listed in the PHP FAQ, found at www.php.net/FAQ.php
  640.  
  641.  Common problems with Windows
  642.  
  643.   The following problems often occur with IIS/PWS, but some points may
  644.   also apply to other servers.
  645.  
  646.   For test purposes it is best to use just a simple test script. One
  647.   containing just the following line will suffice:
  648.   <?php phpinfo();?>
  649.  
  650.   You have installed PHP, but when try to access a php script file via your
  651.   browser, you get a blank screen:
  652.  
  653.    Do a 'view source' in the web browser and you will probably find that you
  654.    can see the source code of your php script. This means that the web server
  655.    did not send the script to php for interpretation. Something is wrong with
  656.    the server configuration - double check the server configuration against
  657.    the php installation instructions.
  658.  
  659.   You have installed PHP, but when try to access a php script file via your
  660.   browser, you get a server 500 error:
  661.  
  662.    Something went wrong when the server tried to run PHP. To get to see a
  663.    sensible error message, from the command line, change to the directory
  664.    containing php.exe and run "php.exe -i" (without quotes).
  665.    If php has any problems running, then a suitable error message will be displayed
  666.    which will give you a clue as to what needs to be done next.
  667.    If you get a screen full of html codes (the output of the phpinfo() function) then
  668.    php is working ok, and your problem may be related to your server configuration
  669.    which you should double check.
  670.  
  671.   You have installed PHP, but when try to access a php script file via your
  672.   browser, you get the error:
  673.    cgi error:
  674.    The specified CGI application misbehaved by not returning a complete set of
  675.    HTTP headers. The headers it did return are:
  676.  
  677.    This error message means that php failed to output anything at all.
  678.    From the command line hange to the directory containing php.exe. Run
  679.    php.exe -i
  680.    If php has any problems running, then a suitable
  681.    error message will be displayed which will give you a clue as to what needs to
  682.    be done next. If you get a screen full of html codes (the output of the
  683.    phpinfo() function) then php is working ok.
  684.  
  685.    Once php is working at the command line, try accessing the php script via the browser again.
  686.    If it still fails then it could be one of the following:
  687.  
  688.    file permissions on your php script, php.exe, php4ts.dll, php.ini or any php
  689.    extensions you are trying to load are such that the anonymous internet user
  690.    ISUR_<machinename> cannot access them.
  691.  
  692.    The script file does not exist (or possibly isn't where you think it is
  693.    relative to your web root directory). Note that for IIS you can trap this error by ticking
  694.    the 'check file exists' box when setting up the script mappings in the Internet Services
  695.    Manager. If a script file does not exist then the server will return a 404 error instead.
  696.    There is also the additional benefit that IIS will do any authentication required for you
  697.    based on the NTLanMan permissions on your script file.
  698.  
  699.  
  700.  You have inherent problems loading the right DLL?
  701.   Sometimes, loading the right DLL can be a pain on Windows.
  702.   Advanced Windows users may use a tool called strace (named
  703.   after the famous Unix application) to trace file access on the
  704.   system (however, it only works on NT-alike Windows, read:
  705.   NT/2000/XP). It can be found at
  706.   http://razor.bindview.com/tools/desc/strace_readme.html . Read
  707.   the instruction there carefully!
  708.  
  709.   Example scenery:
  710.  
  711.    Apache/PHP4 as module. Though I've properly configured
  712.    php4apache.dll in httpd.conf, I always get:
  713.  
  714.    Syntax error on line 1025 of c:/apache/apache/conf/httpd.conf:
  715.    Cannot load c:/php/php-4.2.1-win32/sapi/php4apache.dll into server
  716.  
  717.    But c:/php/php-4.2.1-win32/sapi/php4apache.dll definitely
  718.    exists:
  719.  
  720.    dir c:\php\php-4.2.1-win32\sapi\php4apache.dll
  721.     Directory of c:\php\php-4.2.1-win32\sapi
  722.     13.05.2002  00:01               24.576 php4apache.dll
  723.  
  724.    'strace'ing the apache.exe binary revealed the following:
  725.    c:
  726.    cd \apache\apache
  727.    strace apache >strace.txt
  728.  
  729.    Then looking into strace.txt:
  730.    [...]
  731. 729 3348 3248 NtOpenSection (0xe, {24, 24, 0x40, 0, 0, "php4ts.dll"}, ... ) == STATUS_OBJECT_NAME_NOT_FOUND
  732. 731 3348 3248 NtQueryAttributesFile ({24, 0, 0x40, 0, 0, "\??\c:\php\php-4.2.1-win32\sapi\php4ts.dll"}, 1234824, ... ) == STATUS_OBJECT_NAME_NOT_FOUND
  733. 733 3348 3248 NtQueryAttributesFile ({24, 108, 0x40, 0, 0, "php4ts.dll"}, 1234824, ... ) == STATUS_OBJECT_NAME_NOT_FOUND
  734. 735 3348 3248 NtQueryAttributesFile ({24, 0, 0x40, 0, 0, "\??\C:\WINNT\System32\php4ts.dll"}, 1234824, ... ) == STATUS_OBJECT_NAME_NOT_FOUND
  735.    [...]
  736.  
  737.    This went on quiet some time for all directories in the %PATH%
  738.    environment variable. The solution finally was to copy
  739.    php4ts.dll in any of the directories searched by the System (I
  740.    prefered to use c:\php\php-4.2.1-win32\sapi).
  741.  
  742.    Note: This does not only apply to php4ts.dll but in fact to every
  743.          DLL which gets loaded through PHP too. So, if you've
  744.          problems running your PHP CLI application because it
  745.          can't load a certain library but you're sure it's there,
  746.          try this tool.
  747.  
  748.  
  749.  I'm using IIS/CGI and everytime I try to access a php file I get
  750.  "Security Alert! The PHP CGI cannot be accessed directly."
  751.  
  752.   Since 4.1.2, the php.ini setting cgi.force_redirect defaults to '1' which
  753.   effectively prevents the cgi from working within IIS. You need to set up at
  754.   least a minimal php.ini file with the following directive:
  755.  
  756.     cgi.force_redirect = 0
  757.  
  758.   If it doesn't work immidiately, make sure you have the php.ini file in the
  759.   right place (%SYSTEMROOT%\php.ini).
  760.  
  761.  
  762.  Other problems
  763.   If you are still stuck, someone on the PHP installation mailing list may be
  764.   able to help you. You should check out the archive first, in case
  765.   someone already answered someone else who had the same problem as
  766.   you. The archives are available from the support page on www.php.net
  767.   To subscribe to the PHP installation mailing list, send an empty mail to:
  768.  
  769.   php-install-subscribe@lists.php.net
  770.  
  771.   The mailing list address is php-install@lists.php.net
  772.  
  773.   If you want to get help on the mailing list, please try to be
  774.   precise and give the necessary details about your environment
  775.   (which operating system, what PHP version, what web server, if
  776.   ou are running PHP as CGI or a server module, etc.), and
  777.   referably enough code to make others able to reproduce and test
  778.   our problem.
  779.  
  780. Bug reports
  781. ===========
  782.  
  783.  If you think you have found a bug in PHP, please report it.  The
  784.  PHP developers probably don't know about it, and unless you
  785.  report it, chances are it won't be fixed.
  786.  
  787.  1) Read about Bugs-Dos-And-Donts
  788.      http://bugs.php.net/bugs-dos-and-donts.php
  789.  
  790.  2) If you think you've found a bug, read
  791.      http://bugs.php.net/bugs-dos-and-donts.php
  792.  
  793.  3) Feel welcome to file a report at
  794.      http://bugs.php.net/
  795.