a number of changes:

- removed the sapi warning now that the module is safe
	- tidied up a number of comments in the Apache-Win section.
	- moved some para type tags to simpara,
	- removed some completely ridiculous statements
	- reworked some grammer errors.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@67273 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
James Cox 2002-01-08 08:21:50 +00:00
parent c9304ff35c
commit f868097bdb

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.106 $ -->
<!-- $Revision: 1.107 $ -->
<chapter id="installation">
<title>Installation</title>
@ -2685,27 +2685,13 @@ $ /usr/local/sbin/php4-enable
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>
<simpara>
The SAPI modules have been significantly improved in the 4.1 release,
however, you may find that you encounter possible server errors or
other server modules such as ASP failing, in older systems.
</simpara>
</warning>
<para>
<simpara>
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
@ -2714,19 +2700,19 @@ $ /usr/local/sbin/php4-enable
<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>
</simpara>
<para>
The following steps should be performed on all installations
before the server specific instructions.
<itemizedlist>
<listitem>
<para>
<simpara>
Extract the distribution file to a directory of your choice.
<filename>c:\php\</filename> is a good start.
</para>
</simpara>
</listitem>
<listitem>
<para>
<simpara>
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.
@ -2741,7 +2727,7 @@ $ /usr/local/sbin/php4-enable
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>
</simpara>
<para>
The PHP binary, the SAPI modules, and some extensions rely on
external DLLs for execution. Make sure that these DLLs in the
@ -3581,6 +3567,11 @@ stop and start:
<filename>srm.conf</filename> or <filename>httpd.conf</filename>
to configure Apache to work with PHP.
</simpara>
<simpara>
It is worth noting here that now the sapi module has been
made more stable under windows, we recommend it's use above
the CGI binary, since it is more transparent and secure.
</simpara>
<simpara>
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
@ -3619,16 +3610,16 @@ stop and start:
</itemizedlist>
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.
</para>
but it is commented out. Remember also to substitute the
<filename>c:/php/</filename> for your actual path to PHP.
</para>
<warning>
<para>
By using this CGI setup, your server are open
to several possible attacks. Please also read
our <link linkend="security.cgi-bin">security section
about CGI setups</link> to get some
ideas, about how to defend yourself from attacks.
By using the CGI setup, your server is open
to several possible attacks. Please read
our <link linkend="security.cgi-bin">CGI security
section</link> to learn how to defend yourself from attacks.
</para>
</warning>
@ -3657,34 +3648,52 @@ stop and start:
</itemizedlist>
</para>
<para>
<simpara>
After changing the configuration
file, remember to restart the server, for example,
<literal>NET STOP APACHE</literal> followed by
<literal>NET START APACHE</literal>, if you run Apache
as a Windows Service, or use your regular shortcuts.
</para>
</simpara>
<note>
<simpara>
In Apache 1.3.22 for Windows, the default configuration file
(<filename>httpd.conf-dist-win</filename>) has
a <literal>ClearModuleList</literal> directive included
by default. If this directive is used, it is required
to put an <literal>AddModule mod_php4.c</literal> to
the <literal>AddModule</literal> list, as else PHP will
not be registered as an Apache module.
You may find after using the windows installer for Apache
that you need to define the <literal>AddModule</literal>
directive for <filename>mod_php4.c</filename> in the
configuration file (<filename>httpd.conf</filename>).
This is done by adding <literal>AddModule mod_php4.c</literal>
to the <literal>AddModule</literal> list, near the beginning
of the configuration file. This is especially important if
the <literal>ClearModuleList</literal> directive is defined.
Failure to do this may mean PHP will not be registered as an
Apache module.
</simpara>
</note>
<simpara>
To use the source code highlighting feature, simply create a PHP
script file and stick this code in: <literal>&lt;?php show_source
("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 this, as there is no .phps like feature on Windows).
</simpara>
<para>
There are 2 ways you can use the source code highlighting feature,
however their ability to work depends on your installation.
If you have configured Apache to use PHP as an isapi module, then by
adding the following line to your configuration file you can use
this feature:
<itemizedlist>
<listitem>
<simpara>
<literal>
AddType application/x-httpd-php-source .phps
</literal>
</simpara>
</listitem>
</itemizedlist>
If you chose to configure Apache to use PHP as a CGI binary, you
will need to use the <function>show_source</function> function. To
do this simply create a PHP script file and add this code:
<literal>&lt;?php show_source ("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.
</para>
<note>
<simpara>
On Win-Apache all backslashes in a path statement such