ronabop Sun Jan 14 00:42:09 2001 EDT Modified files: /phpdoc/en/chapters install.xml Log: Massive Overhaul, many changes. Please check and review carefully.
Index: phpdoc/en/chapters/install.xml diff -u phpdoc/en/chapters/install.xml:1.27 phpdoc/en/chapters/install.xml:1.28 --- phpdoc/en/chapters/install.xml:1.27 Wed Jan 10 13:11:15 2001 +++ phpdoc/en/chapters/install.xml Sun Jan 14 00:42:08 2001 @@ -12,89 +12,103 @@ <sect1 id="install.unix"> <title>Installation on UNIX systems</title> - <para> - This section will guide you through the configuration and - installation of PHP. + This section will guide you through the general configuration and + installation of PHP on unix systems. Be sure to investigate any + sections specific to your platform or web server before you begin + the process. </para> - <para> Prerequisite knowledge and software: - <itemizedlist> <listitem> <simpara> Basic UNIX skills (being able to operate "make" and a C - compiler) + compiler, if compiling) </simpara> </listitem> <listitem> <simpara> - An ANSI C compiler + An ANSI C compiler (if compiling) </simpara> </listitem> <listitem> <simpara> + flex (for compiling) + </simpara> + </listitem> + <listitem> + <simpara> + bison (for compiling) + </simpara> + </listitem> + <listitem> + <simpara> A web server </simpara> </listitem> + <listitem> + <simpara> + Any module specific components (such as gd, pdf libs, etc.) + </simpara> + </listitem> </itemizedlist> </para> + <para> + There are several ways to install PHP for the Unix platform, either + with a compile and configure process, or through various + pre-packaged methods. The user compile and configuration processes + are much more complex, so the documentation is more focused on those + procedures. + </para> + <para> - There are several ways to compile and configure PHP for the Unix - platform. The entire configuration process is controlled by the + The initial PHP setup and configuration process is controlled by the use of commandline options to the <filename>configure</filename> script. This page outlines the usage of the most common options, but there are many others to play with. Check out the <link linkend="install.configure">Complete list of configure - options</link> for an exhaustive rundown. + options</link> for an exhaustive rundown. There are several ways + to install PHP: <itemizedlist> <listitem> <simpara> - As an <link linkend="install.unix.apache-module">Apache module</link> + As an <link linkend="install.apache">Apache module</link> </simpara> </listitem> <listitem> <simpara> - As an <link linkend="install.unix.fhttpd">fhttpd module</link> + As an <link linkend="install.fhttpd">fhttpd module</link> </simpara> </listitem> <listitem> <simpara> For use with <link - linkend="install.unix.otherhttpd">AOLServer, NSAPI, + linkend="install.otherhttpd">AOLServer, NSAPI, phttpd, Pi3Web, Roxen, thttpd, or Zeus.</link> </simpara> </listitem> <listitem> <simpara> - As a <link linkend="install.unix.commandline">CGI executable</link> + As a <link linkend="install.commandline">CGI executable</link> </simpara> </listitem> </itemizedlist> </para> <sect2 id="install.unix.apache-module"> - <title>Apache Module</title> + <title>Apache Module Quick Reference</title> - <para> - PHP can be compiled in a number of different ways as an Apache - module. First we show the quick instructions. Following this is - a list of various examples with explanations, to provide an - overview of how to accomplish certain things. - </para> - <para> - You can select arguments to add to the - <command>configure</command> on line 8 below from the <link - linkend="install.configure">Complete list of configure - options</link>. + PHP can be compiled in a number of different ways, but one of + the most popular is as an Apache module. The following is a quick + installation overview. </para> <example id="install.unix.apache-module.quick"> <title> - Quick Installation Instructions (Apache Module Version) + Quick Installation Instructions for PHP 4 (Apache Module Version) </title> <programlisting> 1. gunzip apache_1.3.x.tar.gz @@ -108,168 +122,19 @@ 9. make 10. make install 11. cd ../apache_1.3.x -12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a - for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a +12. ./configure --activate-module=src/modules/php4/libphp4.a 13. make 14. make install - - Instead of this step you may prefer to simply copy the httpd binary - overtop of your existing binary. Make sure you shut down your - server first though. - 15. cd ../php-x.x.x -16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini - for PHP 4: cp php.ini-dist /usr/local/lib/php.ini - - You can edit your .ini file to set PHP options. If - you prefer this file in another location, use - --with-config-file-path=/path in step 8. - +16. cp php.ini-dist /usr/local/lib/php.ini 17. Edit your httpd.conf or srm.conf file and add: - - For PHP 3: AddType application/x-httpd-php3 .php3 - For PHP 4: AddType application/x-httpd-php .php - - You can choose any extension you wish here. .php is simply the one - we suggest. You can even include .html . - + AddType application/x-httpd-php .php -18. Use your normal procedure for starting the Apache server. (You must +18. Use your normal procedure for restarting the Apache server. (You must stop and restart the server, not just cause the server to reload by use a HUP or USR1 signal.) - </programlisting> - </example> - - <para> - <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 either the <filename>php.ini</filename> file or - directly using <function>dl</function>. - </para> - <para> - When choosing to build PHP in different ways, you should consider - the advantages and drawbacks of each method. Building as a shared - object will mean that you can compile apache separately, and don't - have to recompile everything as you add to, or change, PHP. - Building PHP into apache (static method) means that PHP will - load and run faster. For more information, see the Apache - <ulink url="&url.apachedso;">webpage on DSO support</ulink>. - </para> - </sect2> - - <sect2 id="install.unix.fhttpd"> - <title>fhttpd Module</title> - <para> - To build PHP as an fhttpd module, answer "yes" to "Build as an - fhttpd module?" (the <option><link - linkend="install.configure.with-fhttpd"> - --with-fhttpd</link>=<replaceable>DIR</replaceable></option> - option to configure) and specify the fhttpd source base - directory. The default directory is <filename - class="directory">/usr/local/src/fhttpd</filename>. If you are - running fhttpd, building PHP as a module will give better - performance, more control and remote execution capability. - </para> - </sect2> - - <sect2 id="install.unix.otherhttpd"> - <title>Other web servers</title> - <para> - PHP can be built to support a large number of web servers. Please - see <link linkend="install.configure.servers">Server-related - options</link> for a full list of server-related configure - options. - </para> - </sect2> - - <sect2 id="install.unix.commandline"> - <title>CGI/Commandline version</title> - <para> - The default is to build PHP as a CGI program. This creates a - commandline interpreter, which can be used for CGI processing, or - for non-web-related PHP scripting. If you are running a web - server PHP has module support for, you should generally go for - that solution for performance reasons. However, the CGI version - enables Apache users to run different PHP-enabled pages under - different user-ids. Please make sure you read through the <link - linkend="security">Security chapter</link> if you are going to - run PHP as a CGI. - </para> - </sect2> - - <sect2 id="database-support-options"> - <title>Database Support Options</title> - <para> - PHP has native support for a number of databases (as well as - ODBC). To enable support for the various databases, options are - given to the <filename>configure</filename> script at compile - time. Read the <link linkend="install.configure.databases">list - of all database-related options</link> for more information. - </para> - - <para> - For a list of all possible options to - <filename>configure</filename>, please see the <link - linkend="install.configure">Complete list of configure - options</link>. - </para> + </programlisting> + </example> </sect2> <sect2 id="install.building"> @@ -281,38 +146,299 @@ the <link linkend="install-problems">Problems section</link>. </simpara> </sect2> + </sect1> - <sect2 id="install.testing"> - <title>Testing</title> + <sect1 id="install.linux"> + <title>Linux installs</title> + <para> + This section contains notes and hints specific to Linux installs + of PHP. + </para> + <sect2 id="install.linux.packages"> + <title>Using Packages</title> <simpara> - If you have built PHP as a CGI program, you may test your build - by typing <command>make test</command>. It is always a good idea - to test your build. This way you may catch a problem with PHP on - your platform early instead of having to struggle with it later. + Many linux distributions have some sort of package installation, + such as rpm files. This can greatly assist in building a standard + configuration, but if you need to have a different set of features + (such as a secure server, or a different database driver), you may + need to build php and/or your webserver. If you are unfamiliar + with building and compiling your own software, it's worth + investigating whether or not somebody has already built a packaged + version of PHP with the features you need. </simpara> </sect2> + </sect1> - <sect2 id="install.benchmarking"> - <title>Benchmarking</title> + <sect1 id="install.hpux"> + <title>HP-UX installs</title> + <para> + This section contains notes and hints specific to HP-UX installs + of PHP. + </para> + <example id="install.hpux"> + <title> + Installation Instructions for HP-UX 10 + </title> + <programlisting> +From: [EMAIL PROTECTED] +04-Jan-2001 09:49 +(These tips are for php v4.0.4 and apache v1.3.9) + +So you want to install PHP and Apache on a HP-UX 10.20 box? + +1. You need gzip, download a binary distribution from +http://hpux.connect.org.uk/ftp/hpux/Gnu/gzip-1.2.4a/gzip-1.2.4a-sd-10.20.depot.Z +uncompress the file and install using swinstall + +2. You need gcc, download a binary distribution from +http://gatekeep.cs.utah.edu/ftp/hpux/Gnu/gcc-2.95.2/gcc-2.95.2-sd-10.20.depot.gz +gunzip this file and install gcc using swinstall. + +3. You need the gnu binutils, you can download a binary distribution from +http://hpux.connect.org.uk/ftp/hpux/Gnu/binutils-2.9.1/binutils-2.9.1-sd-10.20.depot.gz + +gunzip and install using swinstall. + + +3. You now need bison, you can download a binary distribution from +http://hpux.connect.org.uk/ftp/hpux/Gnu/bison-1.28/bison-1.28-sd-10.20.depot.gz +install as above. + +4. You now need flex, you need to download the source from one of the +http://www.gnu.org mirrors. It is in the non-gnu directory of the ftp site. +Download the file, gunzip, then tar -xvf it. Go into the newly created flex +directory and do a ./configure, then a make, and then a make install + +If you have errors here, it's probably because gcc etc. are not in your +PATH so add them to your PATH. + +Right, now into the hard stuff. + +5.Download the PHP and apache sources. + +6.gunzip and tar -xvf them. + +We need to hack a couple of files so that they can compile ok. + +7. Firstly the configure file needs to be hacked because it seems to lose +track of the fact that you are a hpux machine, there will be a +better way of doing this but a cheap and cheerful hack is to put + lt_target=hpux10.20 +on line 47286 of the configure script. + +8. Next, the apache GuessOS file needs to be hacked. Under +apache_1.3.9/src/helpers change line 89 from + "echo "hp${HPUXMACH}-hpux${HPUXVER}"; exit 0" +to: + "echo "hp${HPUXMACH}-hp-hpux${HPUXVER}"; exit 0" + +9. You cannot install PHP as a shared object under HP-UX so you must compile +it as a static, just follow the instructions at the Apache page. + +10. PHP and apache should have compiled OK, but apache won't start. you need +to create a new user for apache, eg www, or apache. You then change lines 252 +and 253 of the conf/httpd.conf in apache so that instead of + User nobody + Group nogroup +you have something like + User www + Group sys + +This is because you can't run apache as nobody under hp-ux. +Apache and PHP should then work. + +Hope this helps somebody, +Paul Mckay. + </programlisting> + </example> +</sect2> + +</sect1> + +<sect1 id="install.solaris"> +<title>Solaris installs</title> +<para> + This section contains notes and hints specific to Solaris installs + of PHP. +</para> +<sect2 id="install.solaris.required"> + <title>Required software</title> + <para> + Solaris installs often lack C compilers and their related tools. + The required software is as follows: + <itemizedlist> + <listitem> <simpara> - If you have built PHP 3 as a CGI program, you may benchmark your - build by typing <command>make bench</command>. Note that if safe - mode is on by default, the benchmark may not be able to finish if - it takes longer then the 30 seconds allowed. This is because the - <function>set_time_limit</function> can not be used in safe - mode. Use the <link - linkend="ini.max-execution-time">max_execution_time</link> - configuration setting to control this time for your own - scripts. <command>make bench</command> ignores the <link - linkend="configuration.file">configuration file</link>. + gcc (recommended, other C compilers may work) + </simpara> + </listitem> + <listitem> + <simpara> + make + </simpara> + </listitem> + <listitem> + <simpara> + flex + </simpara> + </listitem> + <listitem> + <simpara> + bison + </simpara> + </listitem> + <listitem> + <simpara> + m4 + </simpara> + </listitem> + <listitem> + <simpara> + autoconf + </simpara> + </listitem> + <listitem> + <simpara> + automake + </simpara> + </listitem> + <listitem> + <simpara> + perl + </simpara> + </listitem> + <listitem> + <simpara> + gzip + </simpara> + </listitem> + <listitem> + <simpara> + tar + </simpara> + </listitem> + </itemizedlist> + In addition, you will need to install (and possibly compile) any + additional software specific to your configuration (such as Oracle + or MySQL. + </para> + </sect2> + + <sect2 id="install.solaris.packages"> + <title>Using Packages</title> + <simpara> + You can simplify the solaris install process by using pkgadd to + install most of your needed components. + </simpara> + </sect2> + </sect1> + + <sect1 id="install.macosx"> + <title>Mac OS X installs</title> + <para> + This section contains notes and hints specific to Mac OS X installs + of PHP. + </para> + <sect2 id="install.macosx.packages"> + <title>Using Packages</title> + <simpara> + There are a few pre-packaged and pre-compiled versions of PHP for + Mac OS X. This can greatly assist in building a standard + configuration, but if you need to have a different set of features + (such as a secure server, or a different database driver), you may + need to build php and/or your webserver. If you are unfamiliar + with building and compiling your own software, it's worth + investigating whether or not somebody has already built a packaged + version of PHP with the features you need. + <ulink url="&url.lightyear;">Lightyear Design</ulink> offers a + pre-built version of PHP for OS X, as does + <ulink url="&url.tenon;">Tenon Intersystems</ulink> </simpara> - <note> - <simpara> - <command>make bench</command> is only available for PHP 3. - </simpara> - </note> </sect2> + <sect2 id="install.macosx.compile"> + <title>Compiling for OS X server</title> + <simpara> + There are two slightly different versions of Mac OS X, client and + server. The following is for OS X server. + </simpara> + <example id="install.macosx.compile"> + <title> + Mac OS X server install + </title> + <programlisting> +1. Get the latest distributions of Apache and PHP +2. Untar them, and run the configure program on Apache like so. + ./configure --exec-prefix=/usr \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --libexecdir=/System/Library/Apache/Modules \ + --iconsdir=/System/Library/Apache/Icons \ + --includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \ + --enable-shared=max \ + --enable-module=most \ + --target=apache + +4. You may also want to add this line: + setenv OPTIM=-O2 + If you want the compiler to do some optimization. + +5. Next, go to the php4 source directory and configure it. + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --with-xml \ + --with-apache=/src/apache_1.3.12 + + If you have any other addiitons (MySQL, GD, etc.), be sure to add + them here. For the --with-apache string, put in the path to your + apache source directory, for example "/src/apache_1.3.12". +6. make +7. make install + This will add a directory to your Apache source directory under + src/modules/php4. + +8. Now, reconfigure Apache to build in PHP4. + ./configure --exec-prefix=/usr \ + --localstatedir=/var \ + --mandir=/usr/share/man \ + --libexecdir=/System/Library/Apache/Modules \ + --iconsdir=/System/Library/Apache/Icons \ + --includedir=/System/Library/Frameworks/Apache.framework/Versions/1.3/Headers \ + --enable-shared=max \ + --enable-module=most \ + --target=apache \ + --activate-module=src/modules/php4/libphp4.a + + You may get a message telling you that libmodphp4.a is out of date. + If so, go to the src/modules/php4 directory inside your apache + source directory and run this command: + + ranlib libmodphp4.a + + Then go back to the root of the apache source directory and run the + above configure command again. That'll bring the link table up to + date. +9. make +10. make install + +11. copy and rename the php.ini-dist file to your "bin" directory from your + php4 source directory: + cp php.ini-dist /usr/local/bin/php.ini + + or (if your don't have a local directory) + + cp php.ini-dist /usr/bin/php.ini + </programlisting> + </example> + + Other examples for + <ulink url="&url.stepwise.macosx-client;">Mac OS X client</ulink> + and + <ulink url="&url.stepwise.macosx-client;">Mac OS X server</ulink> + are available at <ulink url="&url.stepwise;">Stepwise</ulink>. + </simpara> + </sect2> </sect1> <sect1 id="install.configure"> @@ -1673,7 +1799,7 @@ </para> <para> PHP 4: Sets the path in which to look for <filename>php.ini</filename>. - Defaults to <filename>/usr/local/lib</filename> + Defaults to <filename>/usr/local/lib</filename> </para> </listitem> </varlistentry> @@ -2126,14 +2252,14 @@ PHP 3, PHP 4: Disable the URL-aware fopen wrapper that allows accessing files via http or ftp. </para> - <warning> - <para> - This switch is only available for PHP versions up to 4.0.3, newer - versions provide an INI parameter called + <warning> + <para> + This switch is only available for PHP versions up to 4.0.3, newer + versions provide an INI parameter called <parameter>allow_url_fopen</parameter> instead of forcing you to decide upon this feature at compile time. - </para> - </warning> + </para> + </warning> </listitem> </varlistentry> @@ -2637,42 +2763,97 @@ <sect1 id="install-windows95-nt"> <title>Installation on Windows 95/98/NT systems</title> - - <simpara> - This install guide will help you install and configure PHP on your - Windows 9x/NT webservers. This guide was compiled by - &link.bob;. The latest revision can be found at <ulink - url="&url.win32install;">&url.win32install;</ulink>. - </simpara> <para> - This guide provides installation support for: + There are two main ways to set up PHP for windows, either + manually or with an installshield installer. <itemizedlist> <listitem> - <para> - Personal Web Server (Newest version recommended) - </para> + <simpara> + <link linkend="install.windows.installer">Installshield</link> + directions are here. + </simpara> </listitem> <listitem> - <para> - Internet Information Server 3 or 4 - </para> + <simpara> + <link linkend="install.windows.manual">Manual Setup</link> + directions are also available.. + </simpara> </listitem> - <listitem> - <para> - Apache 1.3.x - </para> - </listitem> - <listitem> - <para> - Omni HTTPd 2.0b1 - </para> - </listitem> </itemizedlist> </para> - <sect2 id="install.windows.general"> - <title>General Installation Steps</title> + <sect2 id="install.windows.installer"> + <title>Windows Installshield</title> + + <para> + The Windows PHP installer available from the downloads page at + <ulink url="&url.php;">&url.php;</ulink> installs the CGI version + of PHP and, for IIS, PWS, and Xitami, configures the web server as + well. + </para> + + <simpara> + Install your choosen http server on your system and make sure it + all works. + </simpara> + + <simpara> + Run the installer exe file and follow the instructions provided by + the installation wizard. Two types of installation are supported - + standard, which provides sensible defaults for all the settings it + can, and advanced, which asks questions as it goes along. + </simpara> + + <simpara> + The installation wizard gathers enough information to set up the + <filename>php.ini</filename> file and configure the web server to + use PHP. For IIS and also PWS on NT Workstation, a list of all the + nodes on the server with script map settings is displayed, and you + can choose those nodes to which you wish to add the PHP script + mappings. + </simpara> + <simpara> + Once the installation has completed the installer will inform you + if you need to restart your system, restart the server, or just + start using PHP. + </simpara> + + </sect2> + + <sect2 id="install.windows.manual"> + <title>General Installation Steps</title> + <simpara> + This install guide will help you manually install and configure + PHP on your Windows 9x/NT webservers. This guide was compiled by + &link.bob;. The original version can be found at <ulink + url="&url.win32install;">&url.win32install;</ulink>. + </simpara> + <para> + This guide provides manual installation support for: + <itemizedlist> + <listitem> + <para> + Personal Web Server (Newest version recommended) + </para> + </listitem> + <listitem> + <para> + Internet Information Server 3 or 4 + </para> + </listitem> + <listitem> + <para> + Apache 1.3.x + </para> + </listitem> + <listitem> + <para> + Omni HTTPd 2.0b1 + </para> + </listitem> + </itemizedlist> + </para> <para> The following steps should be performed on all installations before the server specific instructions. @@ -2687,16 +2868,16 @@ <listitem> <para> Copy the file, 'php.ini-dist' to your - '%WINDOWS%' directory on Windows 95/98 or to your - '%SYSTEMROOT%' directory under Windows NT or Windows - 20000 and rename it to 'php.ini'. Your - '%WINDOWS%' or '%SYSTEMROOT%' directory is + '%WINDOWS%' directory on Windows 95/98 or to your + '%SYSTEMROOT%' directory under Windows NT or Windows + 20000 and rename it to 'php.ini'. Your + '%WINDOWS%' or '%SYSTEMROOT%' directory is typically: <simplelist> <member>c:\windows for Windows 95/98</member> <member>c:\winnt or c:\winnt40 for NT/2000 servers</member> </simplelist> - </para> + </para> </listitem> <listitem> <para> @@ -2742,19 +2923,391 @@ </listitem> </itemizedlist> </para> + </listitem> + </itemizedlist> + </para> + <simpara> + The DLLs for PHP extensions are prefixed with 'php_'. This + prevents confusion between PHP extensions and their supporting + libraries. + </simpara> + + </sect2> + + </sect1> + + <sect1 id="install-windows95-nt"> + <title>Installation of Windows Modules</title> + <para> + After installing PHP and a webserver on windows, you will + probably want to tune your specific modules. The following + table describes the current windows modules. As described in + the manual installation steps, you can choose which modules you + would like to load when PHP starts by uncommenting the: + 'extension=php_*.dll' lines. Some modules require you to have + additional libraries installed on your system for the + module to work correctly. The PHP + <ulink url="&url.php.faq;">FAQ</ulink> has more information on + where to get supporting libraries. You can also load a + module dynamically in your script using: + <command>dl("php_*.dll");</command> + </para> + <sect2 id="install.windows.modules"> + <title>PHP Modules</title> + <para> + <table> + <title>PHP Modules</title> + <tgroup cols="2"> + <tbody> + <row> + <entry>php_calendar.dll</entry> + <entry>Calendar conversion functions</entry> + </row> + <row> + <entry>php_crypt.dll</entry> + <entry>Crypt functions</entry> + </row> + <row> + <entry>php_dbase.dll</entry> + <entry>DBase functions</entry> + </row> + <row> + <entry>php_dbm.dll</entry> + <entry>GDBM emulation via Berkely DB2 library</entry> + </row> + <row> + <entry>php_filepro.dll</entry> + <entry>READ ONLY access to filepro databases</entry> + </row> + <row> + <entry>php_gd.dll</entry> + <entry>GD Library functions for gif manipulation</entry> + </row> + <row> + <entry>php_hyperwave.dll</entry> + <entry>HyperWave functions</entry> + </row> + <row> + <entry>php_imap4r2.dll</entry> + <entry>IMAP 4 functions</entry> + </row> + <row> + <entry>php_ldap.dll</entry> + <entry>LDAP functions</entry> + </row> + <row> + <entry>php_msql1.dll</entry> + <entry>mSQL 1 client</entry> + </row> + <row> + <entry>php_msql2.dll</entry> + <entry>mSQL 2 client</entry> + </row> + <row> + <entry>php_mssql.dll</entry> + <entry>MSSQL client (requires MSSQL DB-Libraries</entry> + </row> + <row> + <entry>php3_mysql.dll (Built into PHP 4)</entry> + <entry>MySQL functions</entry> + </row> + <row> + <entry>php_nsmail.dll</entry> + <entry>Netscape mail functions</entry> + </row> + <row> + <entry>php_oci73.dll</entry> + <entry>Oracle functions</entry> + </row> + <row> + <entry>php_snmp.dll</entry> + <entry>SNMP get and walk functions (NT only!)</entry> + </row> + <row> + <entry>php_zlib.dll</entry> + <entry>ZLib functions</entry> + </row> + </tbody> + </tgroup> + </table> + </para> + + </sect2> + + </sect1> + + <sect1 id="install.apache"> + <title>Apache Server installs</title> + <para> + This section contains notes and hints specific to Apache installs + of PHP, both for <link linkend="install.apache.unix">Unix</link> and + <link linkend="install.apache.windows">Windows</link> versions. + </para> + <sect2 id="install.apache.unix"> + <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 + linkend="install.configure">Complete list of configure + options</link>. + </para> + + <example id="install.apache.unix.longer"> + <title> + Installation Instructions (Apache Module Version) + </title> + <programlisting> +1. gunzip apache_1.3.x.tar.gz +2. tar xvf apache_1.3.x.tar +3. gunzip php-x.x.x.tar.gz +4. tar xvf php-x.x.x.tar +5. cd apache_1.3.x +6. ./configure --prefix=/www +7. cd ../php-x.x.x +8. ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars +9. make +10. make install +11. cd ../apache_1.3.x +12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a + for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a +13. make +14. make install + + Instead of this step you may prefer to simply copy the httpd binary + overtop of your existing binary. Make sure you shut down your + server first though. + +15. cd ../php-x.x.x +16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini + for PHP 4: cp php.ini-dist /usr/local/lib/php.ini + + You can edit your .ini file to set PHP options. If + you prefer this file in another location, use + --with-config-file-path=/path in step 8. + +17. Edit your httpd.conf or srm.conf file and add: + + For PHP 3: AddType application/x-httpd-php3 .php3 + For PHP 4: AddType application/x-httpd-php .php + + You can choose any extension you wish here. .php is simply the one + we suggest. You can even include .html . + + +18. Use your normal procedure for starting the Apache server. (You must + stop and restart the server, not just cause the server to reload by + use a HUP or USR1 signal.) + </programlisting> + </example> + + <para> + Different examples of compiling PHP for apache are as follows: + <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 either the <filename>php.ini</filename> file or + directly using <function>dl</function>. + </para> + <para> + When choosing to build PHP in different ways, you should consider + the advantages and drawbacks of each method. Building as a shared + object will mean that you can compile apache separately, and don't + have to recompile everything as you add to, or change, PHP. + Building PHP into apache (static method) means that PHP will + load and run faster. For more information, see the Apache + <ulink url="&url.apachedso;">webpage on DSO support</ulink>. + </para> + </sect2> + + + <sect2 id="install.apache.windows"> + <title>Details of installing Windows 9x/NT and Apache 1.3.x</title> + + <simpara> + You must edit your <literal>srm.conf</literal> or + <literal>httpd.conf</literal> to configure Apache to work with + the PHP CGI binary. + </simpara> + <simpara> + Although there can be a few variations of configuring PHP under + Apache, this one is simple enough to be used by the + newcomer. Please consult the Apache Docs for further + configuration directives. + </simpara> + + <para> + <itemizedlist> + <listitem> + <simpara> + <literal> + ScriptAlias /php/ "c:/path-to-php-dir/" + </literal> + </simpara> + </listitem> + <listitem> + <simpara> + <literal> + AddType application/x-httpd-php .php + </literal> + </simpara> + </listitem> + <listitem> + <simpara> + <literal> + AddType application/x-httpd-php .phtml + </literal> + </simpara> + </listitem> + <listitem> + <simpara> + <literal> + Action application/x-httpd-php "/php/php.exe" + </literal> + </simpara> </listitem> - </itemizedlist></para> + </itemizedlist> + </para> + <simpara> - The DLLs for PHP extensions are prefixed with 'php_'. This - prevents confusion between PHP extensions and their supporting - libraries. + To use the source code highlighting feature, simply create a PHP + script file and stick this code in: <literal><?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 only one way of + doing it). <emphasis>Note:</emphasis> On Win-Apache all back + slashes in a path statement such as: "c:\directory\file.ext", + must be converted to forward slashes. </simpara> + </sect2> + </sect1> + <sect1 id="install.commandline"> + <title>CGI/Commandline Server Installs</title> + <para> + The default is to build PHP as a CGI program. This creates a + commandline interpreter, which can be used for CGI processing, or + for non-web-related PHP scripting. If you are running a web + server PHP has module support for, you should generally go for + that solution for performance reasons. However, the CGI version + enables Apache users to run different PHP-enabled pages under + different user-ids. Please make sure you read through the <link + linkend="security">Security chapter</link> if you are going to + run PHP as a CGI. + </para> + + <sect2 id="install.commandline.testing"> + <title>Testing</title> + <simpara> + If you have built PHP as a CGI program, you may test your build + by typing <command>make test</command>. It is always a good idea + to test your build. This way you may catch a problem with PHP on + your platform early instead of having to struggle with it later. + </simpara> </sect2> - <sect2 id="install.windows.iis3"> - <title>Windows 95/98/NT and PWS/IIS 3</title> + <sect2 id="install.commandline.benchmarking"> + <title>Benchmarking</title> + <simpara> + If you have built PHP 3 as a CGI program, you may benchmark your + build by typing <command>make bench</command>. Note that if safe + mode is on by default, the benchmark may not be able to finish if + it takes longer then the 30 seconds allowed. This is because the + <function>set_time_limit</function> can not be used in safe + mode. Use the <link + linkend="ini.max-execution-time">max_execution_time</link> + configuration setting to control this time for your own + scripts. <command>make bench</command> ignores the <link + linkend="configuration.file">configuration file</link>. + </simpara> + <note> + <simpara> + <command>make bench</command> is only available for PHP 3. + </simpara> + </note> + </sect2> + </sect1> + + <sect1 id="install.fhttpd"> + <title>fhttpd Server Installs</title> + <para> + To build PHP as an fhttpd module, answer "yes" to "Build as an + fhttpd module?" (the <option><link + linkend="install.configure.with-fhttpd"> + --with-fhttpd</link>=<replaceable>DIR</replaceable></option> + option to configure) and specify the fhttpd source base + directory. The default directory is <filename + class="directory">/usr/local/src/fhttpd</filename>. If you are + running fhttpd, building PHP as a module will give better + performance, more control and remote execution capability. + </para> + </sect1> + <sect1 id="install.iis"> + <title>IIS/PWS Server installs</title> + <para> + This section contains notes and hints specific to IIS installs + of PHP, both for <link linkend="install.iis.iis3">IIS3</link> and + <link linkend="install.iis.iis4">IIS4</link> versions. + </para> + <sect2 id="install.iis.iis3"> + <title>Windows 95/98/NT and PWS/IIS 3</title> + <simpara> The recommended method for configuring these servers is to use the INF file included with the distribution @@ -2894,14 +3447,13 @@ </para> <simpara> PWS and IIS 3 users now have a fully operational system. IIS 3 - users can use a nifty <ulink - url="&url.iiscfg;">tool</ulink> from - Steven Genusa to configure their script maps. + users can use a nifty <ulink url="&url.iiscfg;">tool</ulink> + from Steven Genusa to configure their script maps. </simpara> - + </sect2> - <sect2 id="install.windowsnt.iis4"> + <sect2 id="install.iis.iis4"> <title>Windows NT and IIS 4</title> <simpara> @@ -2959,69 +3511,143 @@ </para> </sect2> + + </sect1> - <sect2 id="install.windows.apache"> - <title>Windows 9x/NT and Apache 1.3.x</title> - - <simpara> - You must edit your <literal>srm.conf</literal> or - <literal>httpd.conf</literal> to configure Apache to work with - the PHP CGI binary. - </simpara> - <simpara> - Although there can be a few variations of configuring PHP under - Apache, this one is simple enough to be used by the - newcomer. Please consult the Apache Docs for further - configuration directives. - </simpara> + <sect1 id="install.netscape-enterprise"> + <title>Netscape and iPlanet Enterprise Server Installs</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 /php-xxx-version/sapi/nsapi/nsapi-readme.txt. + </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: [EMAIL PROTECTED] + +1. Install the following packages from www.sunfreeware.com or another +download site: + flex-2_5_4a-sol26-sparc-local + gcc-2_95_2-sol26-sparc-local + gzip-1.2.4-sol26-sparc-local + perl-5_005_03-sol26-sparc-local + bison-1_25-sol26-sparc-local + make-3_76_1-sol26-sparc-local + m4-1_4-sol26-sparc-local + autoconf-2.13 + automake-1.4 + mysql-3.23.24-beta (if you want mysql support) + tar-1.13 (GNU tar) + +2. Make sure your path includes the proper directories + PATH=.:/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin + export PATH + +3. gunzip php-x.x.x.tar.gz (if you have a .gz dist, otherwise go to 4) +4. tar xvf php-x.x.x.tar +5. cd ../php-x.x.x + +6. For the following step, make sure /opt/netscape/suitespot/ is where +your netscape server is installed. Otherwise, change to correct path: + /configure --with-mysql=/usr/local/mysql --with-nsapi=/opt/netscape/suitespot/ +--enable-track-vars --enable-libgcc +7. make +8. make install + </programlisting> + </example> + After performing the base install and reading the appropriate + readme file, you may need to performs some additional + configuration steps. + </para> <para> - <itemizedlist> - <listitem> - <simpara> - <literal> - ScriptAlias /php/ "c:/path-to-php-dir/" - </literal> - </simpara> - </listitem> - <listitem> - <simpara> - <literal> - AddType application/x-httpd-php .php - </literal> - </simpara> - </listitem> - <listitem> - <simpara> - <literal> - AddType application/x-httpd-php .phtml - </literal> - </simpara> - </listitem> - <listitem> - <simpara> - <literal> - Action application/x-httpd-php "/php/php.exe" - </literal> - </simpara> - </listitem> - </itemizedlist> + Firstly you may need to add some paths to the LD_LIBRARY_PATH + environment for netscape to find all the shared libs. This can + best done in the start script for your netscape server. + Windows users can probably skip this step. The start + script is often located in: + <filename + class="directory">/path/to/server/https-servername/start</filename> </para> - - <simpara> - To use the source code highlighting feature, simply create a PHP - script file and stick this code in: <literal><?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 only one way of - doing it). <emphasis>Note:</emphasis> On Win-Apache all back - slashes in a path statement such as: "c:\directory\file.ext", - must be converted to forward slashes. - </simpara> + <para> + You may also need to edit the configuration files that are + located in:<filename + class="directory">/path/to/server/https-servername/config/</filename>. + <para> - </sect2> + <example id="install.netscape-enterprise.configure"> + <title> + Configuration Example for Netscape Enterprise + </title> + <programlisting> +Configuration Instructions for Netscape Enterprise Server +from: [EMAIL PROTECTED] + +1. Add the following line to mime.types: + type=magnus-internal/x-httpd-php exts=php + +2. Add the following to obj.conf, shlib will vary depending on +your OS, for unix it will be something like +/opt/netscape/suitespot/bin/libphp4.so. +You should place the following lines after mime types init. + Init fn="load-modules" funcs="php4_init,php4_close,php4_execute,php4_auth_trans" +shlib="/php4/nsapiPHP4.dll" + Init fn=php4_init errorString="Failed to initialize PHP!" + + <Object name="default"> + . + . + . + .#NOTE this next line should happen after all 'ObjectType' and before all +'AddLog' lines + Service fn="php4_execute" type="magnus-internal/x-httpd-php" + . + . + </Object> + + + <Object name="x-httpd-php"> + ObjectType fn="force-type" type="magnus-internal/x-httpd-php" + Service fn=php4_execute + </Object> + + + Authentication configuration + + PHP authentication cannot be used with any other authentication. ALL +AUTHENTICATION IS + PASSED TO YOUR PHP SCRIPT. To configure PHP Authentication for the entire server, +add + the following line: + + <Object name="default"> + AuthTrans fn=php4_auth_trans + . + . + . + . + </Object> + + To use PHP Authentication on a single directory, add the following: + + <Object ppath="d:\path\to\authenticated\dir\*"> + AuthTrans fn=php4_auth_trans + </Object> + </programlisting> + </example> + </para> + </sect1> - <sect2 id="install.windows.omnihttpd"> + <sect1 id="install.omnihttpd"> + <title>Omni HTTPd Server installs</title> + <para> + This section contains notes and hints specific Omni HTTPd. + </para> + <sect2 id="install.omnihttpd.windows"> <title>Omni HTTPd 2.0b1 for Windows</title> <simpara> @@ -3072,125 +3698,17 @@ </simpara> </sect2> - - <sect2 id="install.windows.installer"> - <title>Windows Installshield</title> - - <para> - The Windows PHP installer available from the downloads page at - <ulink url="&url.php;">&url.php;</ulink> installs the CGI version of - PHP and, for IIS, PWS, and Xitami, configures the web server as well. - </para> - - <simpara> - Install your choosen http server on your system and make sure it all works. - </simpara> - - <simpara> - Run the installer exe file and follow the instructions provided by the - installation wizard. Two types of installation are supported - standard, - which provides sensible defaults for all the settings it can, and - advanced, which asks questions as it goes along. - </simpara> - - <simpara> - The installation wizard gathers enough information to set up the - <filename>php.ini</filename> file and configure the web server to use PHP. - For IIS and also PWS on NT Workstation, a list of all the nodes on the server - with script map settings is displayed, and you can choose those nodes to which - you wish to add the PHP script mappings. - </simpara> - - <simpara> - Once the installation has completed the installer will inform you if you - need to restart your system, restart the server, or just start using PHP. - </simpara> - </sect2> - - <sect2 id="install.windows.modules"> - <title>PHP Modules</title> - - <para> - <table> - <title>PHP Modules</title> - <tgroup cols="2"> - <tbody> - <row> - <entry>php_calendar.dll</entry> - <entry>Calendar conversion functions</entry> - </row> - <row> - <entry>php_crypt.dll</entry> - <entry>Crypt functions</entry> - </row> - <row> - <entry>php_dbase.dll</entry> - <entry>DBase functions</entry> - </row> - <row> - <entry>php_dbm.dll</entry> - <entry>GDBM emulation via Berkely DB2 library</entry> - </row> - <row> - <entry>php_filepro.dll</entry> - <entry>READ ONLY access to filepro databases</entry> - </row> - <row> - <entry>php_gd.dll</entry> - <entry>GD Library functions for gif manipulation</entry> - </row> - <row> - <entry>php_hyperwave.dll</entry> - <entry>HyperWave functions</entry> - </row> - <row> - <entry>php_imap4r2.dll</entry> - <entry>IMAP 4 functions</entry> - </row> - <row> - <entry>php_ldap.dll</entry> - <entry>LDAP functions</entry> - </row> - <row> - <entry>php_msql1.dll</entry> - <entry>mSQL 1 client</entry> - </row> - <row> - <entry>php_msql2.dll</entry> - <entry>mSQL 2 client</entry> - </row> - <row> - <entry>php_mssql.dll</entry> - <entry>MSSQL client (requires MSSQL DB-Libraries</entry> - </row> - <row> - <entry>php3_mysql.dll (Built into PHP 4)</entry> - <entry>MySQL functions</entry> - </row> - <row> - <entry>php_nsmail.dll</entry> - <entry>Netscape mail functions</entry> - </row> - <row> - <entry>php_oci73.dll</entry> - <entry>Oracle functions</entry> - </row> - <row> - <entry>php_snmp.dll</entry> - <entry>SNMP get and walk functions (NT only!)</entry> - </row> - <row> - <entry>php_zlib.dll</entry> - <entry>ZLib functions</entry> - </row> - </tbody> - </tgroup> - </table> - </para> - - </sect2> + </sect1> + <sect1 id="install.otherhttpd.details"> + <title>Other web servers</title> + <para> + PHP can be built to support a large number of web servers. Please + see <link linkend="install.configure.servers">Server-related + options</link> for a full list of server-related configure + options. + </para> </sect1> <sect1 id="install-problems">