Merging php4/win32/install.txt to this file

- Adding new explanations about extensions, and dlls
 - Removing %s %s from PWS and IIS setups, as it seems it is not needed
 - Adding Netscape Enterprise Server for Windows setup instructions

New paras added, about:

 - Security risks of using the Windows installer
 - Security risks of using the default .ini setup
 - The two ini files available

Perhaps other things I can't remember now :)


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@59897 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2001-10-14 08:24:46 +00:00
parent d862199da4
commit 2a6c2538a1

View file

@ -1,5 +1,5 @@
<?xml encoding="iso-8859-1"?>
<!-- $Revision: 1.82 $ -->
<!-- $Revision: 1.83 $ -->
<chapter id="installation">
<title>Installation</title>
@ -3025,7 +3025,7 @@ $ /usr/local/sbin/php4-enable
<title>Installation on Windows systems</title>
<para>
This section applies to Windows 95/98/Me and
Windows NT/2000/XP. (On XP it is not tested currently).
Windows NT/2000/XP. (The setup is not tested currently on XP).
Do not expect PHP to work on 16 bit platforms such
as Windows 3.1. Sometimes we refer to the supported
platforms as Win32.
@ -3054,7 +3054,9 @@ $ /usr/local/sbin/php4-enable
The Windows PHP installer available from the downloads page at
<ulink url="&url.php;">&url.php;</ulink>, this installs the CGI version
of PHP and, for IIS, PWS, and Xitami, configures the web server as
well.
well. Also note, that while the InstallShield installer is an
easy way to make PHP work, it is restricted in many aspects, as
automatic setup of extensions for example is not supported.
</para>
<simpara>
@ -3083,14 +3085,26 @@ $ /usr/local/sbin/php4-enable
if you need to restart your system, restart the server, or just
start using PHP.
</simpara>
<warning>
<para>
Be aware, that this setup of PHP is not secure. If you would
like to have a secure PHP setup, you'd better go on the manual
way, and set every option carefully. This automatically working
setup gives you an instantly working PHP installation, but it is
not meant to be used on online servers.
</para>
</warning>
</sect2>
<sect2 id="install.windows.manual">
<title>General Installation Steps</title>
<title>Manual Installation Steps</title>
<simpara>
This install guide will help you manually install and configure
PHP on your Windows webserver. The original version
PHP on your Windows webserver. You need to download the
zip binary distriobution from the downloads page at
<ulink url="&url.php;">&url.php;</ulink>. The original version
of this guide was compiled by &link.bob;, and can be found at <ulink
url="&url.win32install;">&url.win32install;</ulink>.
</simpara>
@ -3127,34 +3141,50 @@ $ /usr/local/sbin/php4-enable
Xitami
</para>
</listitem>
<listitem>
<para>
Netscape Enterprise Server, iPlanet
</para>
</listitem>
</itemizedlist>
</para>
<para>
PHP 4 for Windows comes in two flavours - a CGI executable (php.exe),
and several SAPI modules (for example: php4isapi.dll). The latter form
is new to PHP 4, and provides significantly improved performance and
some new functionality. However, please note that the SAPI modules
are <emphasis>NOT</emphasis> yet considered to be production quality.
The reason for this is that the PHP SAPI modules are using the
thread-safe version of the PHP code, which is new to PHP 4, and has
not yet been tested and pounded enough to be considered completely
stable, and there are actually a few known bugs. On the other hand,
some people have reported very good results with the SAPI modules,
even though we're not aware of anyone actually running it on a
production site. In short - your mileage may vary; If you need
absolute stability, trade the performance of the SAPI modules
with the stability of the CGI executable.
</para>
<para>
If you choose one of the SAPI modules and use Windows 95, be sure
to download the DCOM update from the <ulink
url="http://download.microsoft.com/msdownload/dcom/95/x86/en/dcom95.exe">Microsoft
DCOM pages</ulink>. For the ISAPI module, an ISAPI 4.0 compliant Web server
is required (tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is
<emphasis>NOT</emphasis> supported; You should download and
install the Windows NT 4.0 Option Pack with IIS 4.0 if you
want native PHP support.
</para>
some new functionality.
</para>
<warning>
<para>
However, please note that the SAPI modules are <emphasis>NOT</emphasis>
yet considered to be production quality. In particular, with the
ISAPI module, you are likely to encounter serious reliability
problems especially on platforms older than W2K - you may witness
a lot of server 500 errors and suffer from other server modules
such as ASP also failing. You have been warned!
</para>
<para>
The reason for this is that the PHP SAPI modules are using the
thread-safe version of the PHP code, which is new to PHP 4, and has
not yet been tested and pounded enough to be considered completely
stable, and there are actually a few known bugs. On the other hand,
some people have reported very good results with the SAPI modules,
even though we're not aware of anyone actually running it on a
production site. In short - your mileage may vary; If you need
absolute stability, trade the performance of the SAPI modules
with the stability of the CGI executable.
</para>
</warning>
<para>
If you choose one of the SAPI modules and use Windows 95, be sure
to download the DCOM update from the <ulink
url="&url.dcom.update;">Microsoft DCOM pages</ulink>. For the
ISAPI module, an ISAPI 4.0 compliant Web server is required
(tested on IIS 4.0, PWS 4.0 and IIS 5.0). IIS 3.0 is
<emphasis>NOT</emphasis> supported. You should download and
install the Windows NT 4.0 Option Pack with IIS 4.0 if you
want native PHP support.
</para>
<para>
The following steps should be performed on all installations
before the server specific instructions.
@ -3162,10 +3192,26 @@ $ /usr/local/sbin/php4-enable
<listitem>
<para>
Extract the distribution file to a directory of your choice.
&quot;C:\PHP\&quot; is a good start.
&quot;c:\php\&quot; is a good start.
</para>
</listitem>
<listitem>
<para>
You need to ensure that the dlls which PHP uses can be found.
The precise DLLs involved depend on which web server you use
and whether you want to run PHP as a CGI or as a server module.
<filename>php4ts.dll</filename> is always used. If you are
using a server module (e.g. ISAPI or Apache) then you will
need the relevent DLL from the <filename>sapi</filename>
folder. If you are using any PHP extension DLLs then you
will need those as well. To make sure that the DLLs can be
found, you can either copy them to the system directory
(e.g. <filename>winnt/system32</filename> or
<filename>windows/system</filename>) or you can make sure
that they live in the same directory as the main PHP
executable or DLL your web server will use (e.g. php.exe,
php4apache.dll).
</para>
<para>
The PHP binary, the SAPI modules, and some extensions rely on
external DLLs for execution. Make sure that these DLLs in the
@ -3173,7 +3219,7 @@ $ /usr/local/sbin/php4-enable
The best bet to do it is to copy the files below into your
system directory, which is typically:
<simplelist>
<member>c:\windows\system for Windows 95/98</member>
<member>c:\windows\system for Windows 9x/Me</member>
<member>c:\winnt\system32 for Windows NT/2000</member>
</simplelist>
The files to copy are:
@ -3185,52 +3231,72 @@ $ /usr/local/sbin/php4-enable
The files in your distribution's &apos;dlls&apos; directory.
If you have them already installed on your system, overwrite them
only if something doesn't work correctly (Before overwriting them,
it is a good idea to make a back-up).
it is a good idea to make a backup of them, or move them to
another folder - just in case something goes wrong).
</member>
</simplelist>
</para>
</para>
<para>
Download the latest version of the Microsoft Data Access Components
(MDAC) for your platform, especially if you use Microsoft Windows
9x/NT4. MDAC is available at <ulink url="&url.mdac;">&url.mdac;</ulink>.
</para>
</listitem>
<listitem>
<para>
Copy the file, &apos;php.ini-dist&apos; to your
&apos;%WINDOWS%&apos; directory on Windows 95/98 or to your
Copy your choosen ini file (see below) to your
&apos;%WINDOWS%&apos; directory on Windows 9x/Me or to your
&apos;%SYSTEMROOT%&apos; directory under Windows NT or Windows
2000 and rename it to &apos;php.ini&apos;. Your
2000 and rename it to <filename>php.ini</filename>. Your
&apos;%WINDOWS%&apos; or &apos;%SYSTEMROOT%&apos; directory is
typically:
<simplelist>
<member>c:\windows for Windows 95/98</member>
<member>c:\windows for Windows 9x/Me</member>
<member>c:\winnt or c:\winnt40 for NT/2000 servers</member>
</simplelist>
</para>
<para>
There are two ini files distributed in the zip file,
<filename>php.ini-dist</filename> and
<filename>php.ini-optimized</filename>. We advise
you to use <filename>php.ini-optimized</filename>,
because we optimized the default settings in this
file for performance, and security. The best is to
study all the <link linkend="configuration.file">ini
settings</link> and set every element manually yourself.
If you would like to achive the best security, then this
is the way for you, although PHP works fine with these
default ini files.
</para>
</listitem>
<listitem>
<para>
Edit your &apos;php.ini&apos; file:
Edit your new &apos;php.ini&apos; file:
<itemizedlist>
<listitem>
<simpara>
You will need to change the 'extension_dir' setting to
point to your php-install-dir, or where you have placed
your 'php_*.dll' files. ex: c:\php
your 'php_*.dll' files. ex: c:\php\extensions
</simpara>
</listitem>
<listitem>
<simpara>
If you are using OmniHTTPd, do not follow the next step.
Set the 'doc_root' to point to your webservers
document_root. ex: c:\apache\htdocs or c:\webroot
document_root. For example: c:\apache\htdocs or c:\webroot
</simpara>
</listitem>
<listitem>
<simpara>
Choose which extensions you would like to load when PHP
starts. You can uncomment the: 'extension=php_*.dll' lines
in <filename>php.ini</filename> to load these extensions.
You can also load a module dynamically in your script
using <function>dl</function>. See the section about
starts. See the section about
<link linkend="install.windows.extensions">Windows
extensions</link>.
extensions</link>, 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
<filename>php.ini</filename>.
</simpara>
</listitem>
<listitem>
@ -3241,6 +3307,15 @@ $ /usr/local/sbin/php4-enable
on NT/2000 Server.
</simpara>
</listitem>
<listitem>
<simpara>
Note that the <filename>mibs</filename> directory supplied
with the Windows distribution contains support files for
SNMP. This directory should be moved to
<filename>DRIVE:\usr\mibs</filename> (<filename>DRIVE</filename>
being the drive where PHP is installed.)
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
@ -3474,12 +3549,11 @@ $ /usr/local/sbin/php4-enable
<para>
After installing PHP and a webserver on Windows, you will
probably want to install some extensions for added functionality.
The following table describes some of the extensions available. As
described in the manual installation steps, you can choose which
extensions you would like to load when PHP starts by uncommenting the:
'extension=php_*.dll' lines in <filename>php.ini</filename>. You can
also load a module dynamically in your script using
<function>dl</function>.
The following table describes some of the extensions available. You
can choose which extensions you would like to load when PHP starts
by uncommenting the: 'extension=php_*.dll' lines in
<filename>php.ini</filename>. You can also load a module dynamically
in your script using <function>dl</function>.
</para>
<para>
The DLLs for PHP extensions are prefixed with 'php_' in PHP 4 (and
@ -3489,7 +3563,7 @@ $ /usr/local/sbin/php4-enable
<note>
<para>
In PHP 4.0.6 BCMath, Calendar, COM, FTP, MySQL, ODBC, PCRE,
Session, WDDX and XML support is <emphasis>built-in</emphasis>.
Session, WDDX and XML support is <emphasis>built in</emphasis>.
You don't need to load any additional extensions in order to
use these functions. See your distributions
<filename>README.txt</filename> or <filename>install.txt</filename>
@ -3501,20 +3575,21 @@ $ /usr/local/sbin/php4-enable
<para>
Some of these extensions need extra dlls to work. Couple of them can be
found in the distribution package, in the &apos;dlls&apos; folder but
some, e.g. Oracle (php_oci8.dll) require dlls which are not bundled
with the distribution package.
some, for example Oracle (php_oci8.dll) require dlls which are
not bundled with the distribution package.
</para>
<para>
Copy the bundled dlls from &apos;dlls&apos; folder to your Windows
PATH, safe places are:
<simplelist>
<member>c:\windows\system for Windows 95/98</member>
<member>c:\windows\system for Windows 9x/Me</member>
<member>c:\winnt\system32 for Windows NT/2000</member>
</simplelist>
If you have them already installed on your system, overwrite them
only if something doesn't work correctly (Before overwriting them,
it is a good idea to make a back-up).
it is a good idea to make a backup of them, or move them to
another folder - just in case something goes wrong).
</para>
</note>
@ -3791,7 +3866,7 @@ $ /usr/local/sbin/php4-enable
<link linkend="install.apache.windows">Windows</link> versions.
</para>
<sect2 id="install.apache.unix">
<title>Details of installing PHP with Apache on Unix.</title>
<title>Details of installing PHP with Apache on Unix</title>
<para>
You can select arguments to add to the
<command>configure</command> on line 8 below from the <link
@ -3954,14 +4029,14 @@ stop and start:
<sect2 id="install.apache.windows">
<title>Details of installing PHP on Windows with Apache 1.3.x</title>
<title>Installing PHP on Windows with Apache 1.3.x</title>
<simpara>
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
<literal>srm.conf</literal> or <literal>httpd.conf</literal>
<filename>srm.conf</filename> or <filename>httpd.conf</filename>
to configure Apache to work with PHP.
</simpara>
<simpara>
@ -3972,11 +4047,11 @@ stop and start:
</simpara>
<para>
If you unziped the PHP package to C:\PHP\ as described
in the <link linkend="install.windows.manual">General
If you unziped the PHP package to c:\php\ as described
in the <link linkend="install.windows.manual">Manual
Installation Steps</link> section, you need to insert
these lines to your Apache conf file to set up the
CGI binary:
these lines to your Apache configuration file to set
up the CGI binary:
<itemizedlist>
<listitem>
<simpara>
@ -4000,14 +4075,18 @@ stop and start:
</simpara>
</listitem>
</itemizedlist>
Remember to restart the server, for example,
Note that the second line in the list above can be found
in the actual versions of <filename>httpd.conf</filename>,
but it is commented out. After changing the configuration
file, remember to restart the server, for example,
<literal>NET STOP APACHE</literal> followed by
<literal>NET START APACHE</literal>.
<literal>NET START APACHE</literal>, if you run Apache
as a Windows Service, or use your regular shortcuts.
</para>
<para>
If you would like to use PHP as a module in Apache,
you should move <filename>php4ts.dll</filename> to
be sure to move <filename>php4ts.dll</filename> to
the windows/system (for Windows 9x/Me) or winnt/system32
(for Windows NT/2000) directory, overwriting any older file.
Then you should add the following two lines to you Apache
@ -4036,13 +4115,13 @@ stop and start:
("original_php_script.php"); ?></literal>. Substitute
<literal>original_php_script.php</literal> with the name of the
file you wish to show the source of. (This is the only way of
doing so).
doing this, as there is no .phps like feature on Windows).
</simpara>
<note>
<simpara>
On Win-Apache all backslashes in a path statement such
as: "c:\directory\file.ext", must be converted to
forward slashes.
as "c:\directory\file.ext", must be converted to
forward slashes, as "c:/directory/file.ext".
</simpara>
</note>
</sect2>
@ -4163,7 +4242,7 @@ stop and start:
<title>Servers-IIS/PWS</title>
<para>
This section contains notes and hints specific to IIS (Microsoft
Internet Information Server) installing PHP for
Internet Information Server). Installing PHP for
<link linkend="install.iis.iis3">PWS/IIS 3</link>,
<link linkend="install.iis.pws4">PWS 4 or newer</link> and
<link linkend="install.iis.iis4">IIS 4 or newer</link> versions.
@ -4173,8 +4252,8 @@ stop and start:
<simpara>
The recommended method for configuring these servers is to use
the INF file included with the distribution
(php_iis_reg.inf). You may want to edit this file and make sure
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.
@ -4211,15 +4290,14 @@ stop and start:
<listitem>
<simpara>
Type in the extension you wish to use for your php
scripts. ex: <literal>.php</literal>
scripts. For example <literal>.php</literal>
</simpara>
</listitem>
<listitem>
<simpara>
Double click on the new string value and enter the path to
<literal>php.exe</literal> in the value data field. ex:
<literal>c:\php\php.exe %s %s</literal>. The '%s %s' is VERY
important, PHP will not work properly without it.
<literal>c:\php\php.exe</literal>.
</simpara>
</listitem>
<listitem>
@ -4228,9 +4306,22 @@ stop and start:
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>
Now navigate to: <literal>HKEY_CLASSES_ROOT</literal>
Navigate to: <literal>HKEY_CLASSES_ROOT</literal>
</simpara>
</listitem>
<listitem>
@ -4335,7 +4426,7 @@ stop and start:
Edit the enclosed <filename>pws-php4cgi.reg</filename>
file (look into the sapi dir) to reflect the location of
your php.exe. Forward slashes should be escaped, for example:
<literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="C:\\PHP\\php.exe"</literal>
<literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\php.exe"</literal>
</simpara>
</listitem>
<listitem>
@ -4356,7 +4447,7 @@ stop and start:
Edit the enclosed <filename>pws-php4isapi.reg</filename>
file (look into the sapi dir) to reflect the location of
your php4isapi.dll. Forward slashes should be escaped, for example:
<literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="C:\\PHP\\sapi\\php4isapi.dll"</literal>
<literal>[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="c:\\php\\sapi\\php4isapi.dll"</literal>
</simpara>
</listitem>
<listitem>
@ -4402,21 +4493,27 @@ stop and start:
<listitem>
<simpara>
Click Add, and in the Executable box, type:
<literal>c:\php\php.exe %s %s</literal> (assuming
that you have unziped PHP in c:\php\). You MUST
have the %s %s on the end, PHP will not function
properly if you fail to do this.
<literal>c:\php\php.exe</literal> (assuming
that you have unziped PHP in c:\php\).
</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 must repeat step 3 and 4 for each extension you
want associated with PHP scripts.
(<literal>.php</literal> and <literal>.phtml</literal>
are common.)
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.
</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>
@ -4445,19 +4542,19 @@ stop and start:
<simpara>
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.
to the php4isapi.dll 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
Stop IIS completely (NET STOP iisadmin)
</simpara>
</listitem>
<listitem>
<simpara>
Start IIS again
Start IIS again (NET START w3svc)
</simpara>
</listitem>
</itemizedlist>
@ -4468,19 +4565,24 @@ stop and start:
<sect1 id="install.netscape-enterprise">
<title>Servers-Netscape and iPlanet</title>
<para>
To build PHP with NES or iPlanet web servers, enter the proper
install directory for the
<option><link linkend="install.configure.with-nsapi">--with-nsapi</link> = <replaceable>DIR</replaceable></option>
option. The default directory is usually
<filename class="directory">/opt/netscape/suitespot/</filename>.
Please also read <filename>/php-xxx-version/sapi/nsapi/nsapi-readme.txt</filename>.
This section contains notes and hints specific to Netscape and iPlanet
installs of PHP, both for <link linkend="install.netscape.sun">Sun Solaris</link>
and <link linkend="install.netscape.windows">Windows</link> versions.
</para>
<para>
<example id="install.netscape-enterprise.solaris">
<title>
Installation Example for Netscape Enterprise on Solaris
</title>
<programlisting>
<sect2 id="install.netscape.sun">
<title>Installing PHP with Netscape on Sun Solaris</title>
<para>
To build PHP with NES or iPlanet web servers, enter the proper
install directory for the
<option><link linkend="install.configure.with-nsapi">--with-nsapi</link>
= <replaceable>DIR</replaceable></option> option. The default
directory is usually <filename class="directory">/opt/netscape/suitespot/</filename>.
Please also read <filename>/php-xxx-version/sapi/nsapi/nsapi-readme.txt</filename>.
</para>
<para>
<example id="install.netscape-enterprise.solaris">
<title>Installation Example for Netscape Enterprise on Solaris</title>
<programlisting>
Instructions for Sun Solaris 2.6 with Netscape Enterprise Server 3.6
From: bhager@invacare.com
@ -4532,12 +4634,12 @@ download site:
located in:<filename
class="directory">/path/to/server/https-servername/config/</filename>.
</para>
<example id="install.netscape-enterprise.configure">
<title>
Configuration Example for Netscape Enterprise
</title>
<programlisting>
<example id="install.netscape-enterprise.configure">
<title>
Configuration Example for Netscape Enterprise
</title>
<programlisting>
Configuration Instructions for Netscape Enterprise Server
From: bhager@invacare.com
@ -4590,7 +4692,9 @@ From: bhager@invacare.com
&lt;/Object&gt;
</programlisting>
</example>
<para>If you are running Netscape Enterprise 4.x, then you should use the following:</para>
<para>
If you are running Netscape Enterprise 4.x, then you should use the following:
</para>
<example>
<title>Configuration Example for Netscape Enterprise 4.x</title>
<programlisting>
@ -4602,6 +4706,134 @@ Init fn="load-modules" shlib="/path/to/server4/bin/libphp4.so" funcs="php4_init,
Init fn="php4_init" LateInit="yes"
</programlisting>
</example>
</sect2>
<sect2 id="install.netscape.windows">
<title>Installing PHP with Netscape on Windows</title>
<para>
To Install PHP as CGI (for Netscape Enterprise Server,
iPlanet, perhaps Fastrack), do the following:
</para>
<itemizedlist>
<listitem>
<simpara>
Copy <filename>php4ts.dll</filename> to your systemroot
(the directory where you installed windows)
</simpara>
</listitem>
<listitem>
<para>
Make a file association from the command line.
Type the following two lines:
<programlisting>
assoc .php=PHPScript
ftype PHPScript=c:\php\php.exe %1 %*
</programlisting>
</para>
</listitem>
<listitem>
<simpara>
In the Netscape Enterprise Administration Server create
a dummy shellcgi directory and remove it just after (this
step creates 5 important lines in obj.conf and allow the
web server to handle shellcgi scripts).
</simpara>
</listitem>
<listitem>
<simpara>
In the Netscape Enterprise Administration Server create
a new mime type (Category: type,
Content-Type: magnus-internal/shellcgi, File Suffix:php).
</simpara>
</listitem>
<listitem>
<simpara>
Do it for each web server instance you want php to run
</simpara>
</listitem>
</itemizedlist>
<para>
More details about setting up
PHP as a CGI executable can be found here:
<ulink url="&url.netscape.cgi;">&url.netscape.cgi;</ulink>
</para>
<para>
To Install PHP as NSAPI (for Netscape Enterprise Server,
iPlanet, perhaps Fastrack, do the following:
</para>
<itemizedlist>
<listitem>
<simpara>
Copy <filename>php4ts.dll</filename> to your systemroot
(the directory where you installed windows)
</simpara>
</listitem>
<listitem>
<para>
Make a file association from the command line.
Type the following two lines:
<programlisting>
assoc .php=PHPScript
ftype PHPScript=c:\php\php.exe %1 %*
</programlisting>
</para>
</listitem>
<listitem>
<simpara>
In the Netscape Enterprise Administration Server create
a new mime type (Category: type,
Content-Type: magnus-internal/x-httpd-php, File Suffix:php).
</simpara>
</listitem>
<listitem>
<para>
Stop your web service and edit <filename>obj.conf</filename>.
At the end of the Init section, place these two lines
(necessarily after mime type init!):
<programlisting>
Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" shlib="c:/php/sapi/php4nsapi.dll"
Init fn="php4_init" errorString="Failed to initialise PHP!"
</programlisting>
</para>
</listitem>
<listitem>
<para>
In The <literal>&lt; Object name="default" &gt;</literal>
section, place this line necessarily after all 'ObjectType'
and before all 'AddLog' lines:
<programlisting>
Service fn="php4_execute" type="magnus-internal/x-httpd-php"
</programlisting>
</para>
</listitem>
<listitem>
<para>
At the end of the file, create a new object called
<literal>x-httpd-php</literal>, by inserting these lines:
<programlisting>
&lt;Object name="x-httpd-php"&gt;
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
Service fn=php4_execute
&lt;/Object&gt;
</programlisting>
</para>
</listitem>
<listitem>
<simpara>
Restart your web service and apply changes
</simpara>
</listitem>
<listitem>
<simpara>
Do it for each web server instance you want PHP to run
</simpara>
</listitem>
</itemizedlist>
<para>
More details about setting up
PHP as an NSAPI filter can be found here:
<ulink url="&url.netscape.nsapi;">&url.netscape.nsapi;</ulink>
</para>
</sect2>
</sect1>
<sect1 id="install.omnihttpd">
@ -4613,7 +4845,11 @@ Init fn="php4_init" LateInit="yes"
<title>OmniHTTPd 2.0b1 and up for Windows</title>
<simpara>
This has got to be the easiest config there is:
You need to complete the folowing steps to make PHP
work with OmniHTTPd. This is a CGI executable setup.
SAPI is supported by OmniHTTPd, but some tests showed,
that it is not so stable to use PHP as an ISAPI module
in OmniHTTPd.
</simpara>
<para>
@ -4699,18 +4935,18 @@ Init fn="php4_init" LateInit="yes"
<listitem>
<para>
From the List select "Associations" and enter the desired
extension (".php") and the path to the CGI exe
(ex. c:\php\php.exe) or the ISAPI dll file
(ex. c:\php\sapi\php4isapi.dll).
extension (<literal>.php</literal>) and the path to the CGI exe
(ex. <filename>c:\php\php.exe</filename>) or the ISAPI DLL file
(ex. <filename>c:\php\sapi\php4isapi.dll</filename>).
</para>
</listitem>
<listitem>
<para>
Select "Content Types" add the same extension ".php"
and enter the content type. If you choose the CGI exe
file, enter 'wwwserver/shellcgi', if you chosse the
ISAPI module, enter 'wwwserver/isapi' (both without
quotes).
Select "Content Types" add the same extension
(<literal>.php</literal>) and enter the content type.
If you choose the CGI executable file, enter
'wwwserver/shellcgi', if you chosse the ISAPI module,
enter 'wwwserver/isapi' (both without quotes).
</para>
</listitem>
</itemizedlist>
@ -4737,21 +4973,21 @@ Init fn="php4_init" LateInit="yes"
<para>
Make sure the webserver is running, and point
your browser to xitamis admin console
(usually http://127.0.0.1/admin), and click on
Configuration.
(usually <literal>http://127.0.0.1/admin</literal>),
and click on Configuration.
</para>
</listitem>
<listitem>
<para>
Navigate to the Filters, and put the
extension which php should parse (i.e. .php)
extension which PHP should parse (i.e. .php)
into the field File extensions (.xxx).
</para>
</listitem>
<listitem>
<para>
In Filter command or script put the path and name
of your php executable i.e. c:\php\php.exe.
of your php executable i.e. <literal>c:\php\php.exe</literal>.
</para>
</listitem>
<listitem>