mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Replaced Configuration and Apache Module with the new text from Rasmus.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29535 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d4b6291ea6
commit
ce78b15a5e
1 changed files with 64 additions and 48 deletions
|
@ -86,61 +86,77 @@
|
|||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>Configuration</title>
|
||||
|
||||
<para>
|
||||
There are two ways of configuring PHP.
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
Using the "setup" script that comes with PHP. This script
|
||||
asks you a series of questions (almost like the "install"
|
||||
script of PHP/FI 2.0) and runs "configure" in the end. To run
|
||||
this script, type <command>./setup</command>.
|
||||
</para>
|
||||
<para>
|
||||
This script will also create a file called "do-conf", this
|
||||
file will contain the options passed to configure. You can
|
||||
edit this file to change just a few options without having to
|
||||
re-run setup. Then type <command>./do-conf</command> to run
|
||||
configure with the new options.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
Running configure by hand. To see what options you have, type
|
||||
<command>./configure --help</command>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
<para>
|
||||
Details about some of the different configuration options are
|
||||
listed below.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="with-apache">
|
||||
<title>Apache module</title>
|
||||
|
||||
<title>Apache Module</title>
|
||||
<para>
|
||||
To build PHP as an Apache module, answer "yes" to "Build as an
|
||||
Apache module?" (the <option><link linkend="with-apache">
|
||||
--with-apache</link>=<replaceable>DIR</replaceable></option>
|
||||
option to configure) and specify the Apache distribution base
|
||||
directory. If you have unpacked your Apache distribution in
|
||||
<filename
|
||||
class="directory">/usr/local/www/apache_1.2.4</filename>, this is
|
||||
your Apache distribution base directory. The default directory
|
||||
is <filename
|
||||
class="directory">/usr/local/etc/httpd</filename>.
|
||||
PHP can be compiled in a number of different ways. Here is a
|
||||
quick summary:
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
./configure --with-apxs --with-pgsql
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
This will create a <filename>libphp4.so</filename> shared library
|
||||
that is loaded into Apache using a LoadModule line in Apache's
|
||||
<filename>httpd.conf</filename> file. The PostgreSQL support is
|
||||
embedded into this <filename>libphp4.so</filename> library.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
./configure --with-apxs --with-pgsql=shared
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
This will again create a <filename>libphp4.so</filename> shared
|
||||
library for Apache, but it will also create a
|
||||
<filename>pgsql.so</filename> shared library that is loaded into
|
||||
PHP either by using the extension directive in
|
||||
<filename>php.ini</filename> file or by loading it explicitly in
|
||||
a script using the <function>dl</function> function.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
./configure --with-apache=/path/to/apache_source --with-pgsql
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
This will create a <filename>libmodphp4.a</filename> library, a
|
||||
<filename>mod_php4.c</filename> and some accompanying files and
|
||||
copy this into the <literal>src/modules/php4</literal> directory
|
||||
in the Apache source tree. Then you compile Apache using
|
||||
<literal>--activate-module=src/modules/php4/libphp4.a</literal>
|
||||
and the Apache build system will create
|
||||
<filename>libphp4.a</filename> and link it statically into the
|
||||
<filename>httpd</filename> binary. The PostgreSQL support is
|
||||
included directly into this <filename>httpd</filename> binary, so
|
||||
the final result here is a single <filename>httpd</filename>
|
||||
binary that includes all of Apache and all of PHP.
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
<programlisting>
|
||||
./configure --with-apache=/path/to/apache_source --with-pgsql=shared
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
<para>
|
||||
Same as before, except instead of including PostgreSQL support
|
||||
directly into the final <filename>httpd</filename> you will get a
|
||||
<filename>pgsql.so</filename> shared library that you can load
|
||||
into PHP from eihter the <filename>php.ini</filename> file or
|
||||
directly using <function>dl</function>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="with-fhttpd">
|
||||
<title>fhttpd module</title>
|
||||
<title>fhttpd Module</title>
|
||||
|
||||
<para>
|
||||
To build PHP as an fhttpd module, answer "yes" to "Build as an
|
||||
|
|
Loading…
Reference in a new issue