cvs: phpdoc /en/chapters install.apache2.xml

From: Date: Mon, 11 Nov 2002 13:20:48 +0000
Subject: cvs: phpdoc /en/chapters install.apache2.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969349580@lists.php.net to get a copy of this message
betz Mon Nov 11 08:20:48 2002 EDT Added files: /phpdoc/en/chapters install.apache2.xml Log: apache2 related install for Linux and windows

Index: phpdoc/en/chapters/install.apache2.xml +++ phpdoc/en/chapters/install.apache2.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <sect1 id="install.apache2"> <title>Servers-Apache 2.0</title> <para> This section contains notes and hints specific to Apache 2.0 installs of <literal>PHP</literal>, both for <link linkend="install.apache2.unix">Unix</link> and <link linkend="install.apache2.windows">Windows</link> versions. </para> <warning> <para> Do not use Apache 2.0 and <literal>PHP</literal> in a production environment neither on Unix nor on Windows. </para> </warning> <para> You are highly encouraged to take a look at the <ulink url="&url.apache2.docs;">Apache Documentation</ulink> to get a basic understanding of the Apache 2.0 Server. </para> <sect2 id="compat.apache2"> <title>PHP and Apache 2.0 compatibility notes</title> <para> Apache 2.0 support started with PHP 4.2.0. If you want to use Apache 2.0 its recommended to use PHP 4.3.0-dev with the most recent version of Apache 2.0. PHP 4.2.4 and PHP 4.3.0-dev are compatible to Apache 2.0.40 and later. </para> <note> <simpara> PHP 4.2.3 its known to work in conjunction with Apache 2.0.39. Don't try to use this version of <literal>PHP</literal> with any other version of Apache. </simpara> </note> <para> You have several choices to get a version of <literal>PHP</literal> which works together with Apache 2.0. Download the <ulink url="&url.php.snapshots;">latest stable snapshot</ulink> (PHP 4.2.4) or the <ulink url="&url.php.prerelease;">pre-release</ulink> (PHP 4.3.0-devel). Of course, you have always the option to obtain <literal>PHP</literal> through <ulink url="&url.php.anoncvs;">anonymous CVS</ulink>. </para> </sect2> <sect2 id="install.apache2.unix"> <title>PHP and Apache 2 on Linux</title> <para> This quick guide covers only the basics to get started with Apache 2.0 and <literal>PHP</literal>. For more information read the <ulink url="&url.apache2.docs;">Apache Documentation</ulink>. The version numbers have been omitted here, to ensure the instructions are not incorrect. You will need to replace the 'NN' here with the correct values from your files. </para> <example> <title> Installation Instructions (Apache 2 Shared Module Version) </title> <screen> <![CDATA[ 1. gzip -d httpd-2_0_NN.tar.gz 2. tar xvf httpd-2_0_NN.tar 3. gunzip php-NN.tar.gz 4. tar -xvf php-NN.tar 5. cd httpd-2_0_NN 6. ./configure --enable-so 7. make 8. make install Now you have Apache 2.0.NN available under /usr/local/apache2, configured with the standard MPM prefork. To test the installation use your normal procedure for starting the Apache server, e.g: /usr/local/apache2/bin/apachectl start and stop the server to go on with the configuration for PHP: /usr/local/apache2/bin/apachectl stop. 9. cd ../php4-NN 10. ./configure --with-apxs2=/usr/local/apache2/bin/apxs 11. make 12. make install 13. cp php.ini-dist /usr/local/lib/php.ini Edit your php.ini file to set PHP options. If you prefer this file in another location, use --with-config-file-path=/path in step 10. 14. Edit your httpd.conf file and check that these lines are present: LoadModule php4_module modules/libphp4.so AddType application/x-httpd-php .php You can choose any extension you wish here. .php is simply the one we suggest. The path on the right hand side of the LoadModule statement must point to the path of the PHP module on your system. The above statement is correct for the steps shown above. 15. Use your normal procedure for starting the Apache server, e.g: /usr/local/apache2/bin/apachectl start ]]> </screen> </example> <para> Following the steps above you will have a running Apache 2.0 with support for <literal>PHP</literal>. Of course there are many more configuration options available for both, Apache and <literal>PHP</literal>. For more information use <command>./configure --help</command> in the corresponding source tree. In case you wish to build a multithreaded version of Apache 2.0 you must overwrite the standard MPM-Module <filename>prefork</filename> either with <filename>worker</filename> or <filename>perchild</filename>. Append to your configure line in step 6 above either the option <option role="configure">--with-mpm=worker</option> or <option role="configure">--with-mpm=perchild</option>. Take care about the consequences and understand what you are doing. For more information read the Apache documentation about the <ulink url="&url.apache2.mpm;"> MPM-Modules</ulink>. </para> <note> <para> To build a multithreaded version of Apache your system must support threads. This also implies to build <literal>PHP</literal> with experimental Zend Thread Safety (ZTS). Therefore not all extensions might be available. The recommended setup is to build Apache with the standard prefork MPM-Module. </para> </note> </sect2> <sect2 id="install.apache2.windows"> <title>PHP and Apache 2.0 on Windows</title> <para> Consider to read the <ulink url="&url.apache2.windows;"> Windows specific Notes</ulink> for Apache 2.0. </para> <warning> <para> Apache 2.0 is designed to run on Windows NT 4.0 and Windows 2000. At this time, support for Windows 9x is incomplete. Apache 2.0 is not expected to work on those platforms at this time. </para> </warning> <para> Download the most recent version of <ulink url= "&url.apache;"> Apache 2.0</ulink> and a fitting PHP version from the above mentioned places. Follow the <link linkend="install.windows.manual">Manual Installation Steps</link> and come back to go on with the integration of <literal>PHP</literal> and Apache. </para> <para> There are two ways to set up <literal>PHP</literal> to work with Apache 2.0.4x on Windows. One is to use the CGI binary the other is to use the Apache module DLL. In either case you need to stop the Apache server, and edit your <filename>httpd.conf</filename> to configure Apache to work with <literal>PHP</literal>. </para> <para> You need to insert these three lines to your Apache <filename>httpd.conf </filename> configuration file to set up the <emphasis>CGI binary</emphasis>: <example> <title>PHP 4.2.4 and Apache 2.0</title> <programlisting role="apache"> <![CDATA[ ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php.exe" ]]> </programlisting> </example> </para> <note> <para> Starting with PHP 4.3.0 the name of the CGI binary has changed to <filename>php-cgi.exe</filename>. Take care and use the correct Action directive for Apache. </para> </note> <para> <example> <title>PHP 4.3.0 and Apache 2.0</title> <programlisting role="apache"> <![CDATA[ ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php-cgi.exe" ]]> </programlisting> </example> </para> <para> If you would like to use <literal>PHP</literal> as a module in Apache 2.0, be sure to move <filename>php4ts.dll</filename> to your <filename>winnt/system32</filename> directory, overwriting any older file. You need to insert these two lines to your Apache <filename>httpd.conf </filename> configuration file to set up the <emphasis>PHP-Module</emphasis> for Apache 2.0: <example> <title>PHP and Apache 2.0 as Module</title> <programlisting role="apache"> <![CDATA[ LoadModule php4_module c:/php/sapi/php4apache2.dll AddType application/x-httpd-php .php ]]> </programlisting> </example> </para> <note> <para> Remember to substitute the <filename>c:/php/</filename> for your actual path to <literal>PHP</literal> in the above examples. Don't mix up your installation with dll files from <emphasis>different PHP Versions </emphasis>. You have the only choice to use the dll's and extensions that ship with your downloaded PHP version. </para> </note> </sect2> </sect1> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.doc (#969349580) next »