[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY php-download-http "http://us2.php.net/distributions/php-&php-version;.tar.bz2">
|
---|
| 8 | <!ENTITY php-download-ftp "ftp://ftp.isu.edu.tw/pub/Unix/Web/PHP/distributions/php-&php-version;.tar.bz2">
|
---|
[4a93a3c] | 9 | <!ENTITY php-size "4.4 MB">
|
---|
| 10 | <!ENTITY php-buildsize "101 MB">
|
---|
| 11 | <!ENTITY php-time "1.42 SBU">
|
---|
[08254fc] | 12 | ]>
|
---|
| 13 |
|
---|
[6683a00] | 14 | <sect1 id="php" xreflabel="PHP-&php-version;">
|
---|
[00bb024c] | 15 | <?dbhtml filename="php.html"?>
|
---|
[6683a00] | 16 | <title><acronym>PHP</acronym>-&php-version;</title>
|
---|
[f45b1953] | 17 |
|
---|
[08254fc] | 18 | <sect2>
|
---|
| 19 | <title>Introduction to <application><acronym>PHP</acronym></application></title>
|
---|
| 20 |
|
---|
| 21 | <para><application><acronym>PHP</acronym></application> is the PHP
|
---|
| 22 | Hypertext Preprocessor. Primarily used in dynamic web sites, it allows for
|
---|
| 23 | programming code to be directly embedded into the
|
---|
| 24 | <acronym>HTML</acronym> markup.</para>
|
---|
| 25 |
|
---|
| 26 | <sect3><title>Package information</title>
|
---|
| 27 | <itemizedlist spacing='compact'>
|
---|
| 28 | <listitem><para>Download (HTTP): <ulink url="&php-download-http;"/></para></listitem>
|
---|
| 29 | <listitem><para>Download (FTP): <ulink url="&php-download-ftp;"/></para></listitem>
|
---|
| 30 | <listitem><para>Download size: &php-size;</para></listitem>
|
---|
| 31 | <listitem><para>Estimated Disk space required: &php-buildsize;</para></listitem>
|
---|
| 32 | <listitem><para>Estimated build time: &php-time;</para></listitem></itemizedlist>
|
---|
| 33 | </sect3>
|
---|
| 34 |
|
---|
| 35 | <sect3><title><application><acronym>PHP</acronym></application> dependencies</title>
|
---|
| 36 | <sect4><title>Required</title>
|
---|
| 37 | <para>
|
---|
[4a93a3c] | 38 | <xref linkend="apache"/>
|
---|
[08254fc] | 39 | </para></sect4>
|
---|
| 40 | <sect4><title>Optional</title>
|
---|
| 41 | <para>
|
---|
[4a93a3c] | 42 | <xref linkend="libxml2"/>,
|
---|
| 43 | <xref linkend="libxslt"/>,
|
---|
[08254fc] | 44 | <xref linkend="openssl"/>,
|
---|
| 45 | <xref linkend="bc"/>,
|
---|
[4a93a3c] | 46 | <ulink url="http://www.fastio.com/">ClibPDF</ulink>,
|
---|
| 47 | <xref linkend="libjpeg"/>,
|
---|
| 48 | <xref linkend="libtiff"/>,
|
---|
[08254fc] | 49 | <xref linkend="curl"/>,
|
---|
[4a93a3c] | 50 | <ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
|
---|
| 51 | <xref linkend="gdbm"/>,
|
---|
[08254fc] | 52 | <xref linkend="db"/>,
|
---|
[4a93a3c] | 53 | <xref linkend="fam"/>,
|
---|
| 54 | <ulink url="http://www.boutell.com/gd/">GD</ulink>,
|
---|
[08254fc] | 55 | <xref linkend="libpng"/>,
|
---|
[4a93a3c] | 56 | X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
|
---|
[08254fc] | 57 | <xref linkend="freetype2"/>,
|
---|
[4a93a3c] | 58 | <ulink url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.0.2.tar.gz">t1lib</ulink>,
|
---|
| 59 | <xref linkend="gmp"/>
|
---|
| 60 | <xref linkend="mysql"/>,
|
---|
[08254fc] | 61 | <xref linkend="pcre"/>,
|
---|
| 62 | <xref linkend="postgresql"/>,
|
---|
[4a93a3c] | 63 | <xref linkend="openldap"/>,
|
---|
| 64 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
| 65 | <ulink url="http://mcrypt.hellug.gr/">libmcrypt</ulink>,
|
---|
| 66 | <ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
|
---|
[08254fc] | 67 | <xref linkend="expat"/> and
|
---|
[4a93a3c] | 68 | <ulink url="../server/mail.html">MTA</ulink>
|
---|
[08254fc] | 69 | </para></sect4>
|
---|
| 70 | </sect3>
|
---|
| 71 |
|
---|
| 72 | </sect2>
|
---|
| 73 |
|
---|
| 74 | <sect2>
|
---|
| 75 | <title>Installation of <application><acronym>PHP</acronym></application></title>
|
---|
| 76 |
|
---|
[4a93a3c] | 77 | <note><para>You can use <application><acronym>PHP</acronym></application>
|
---|
| 78 | for server-side scripting, command line scripting or client-side
|
---|
| 79 | <acronym>GUI</acronym> applications. The book provides instructions for
|
---|
| 80 | setting up <application><acronym>PHP</acronym></application> for
|
---|
| 81 | server-side scripting as it is the most common form.</para></note>
|
---|
| 82 |
|
---|
[08254fc] | 83 | <para>Install <application><acronym>PHP</acronym></application> by
|
---|
| 84 | running the following commands:</para>
|
---|
| 85 |
|
---|
[4a93a3c] | 86 | <screen><userinput><command>./configure --prefix=/usr \
|
---|
| 87 | --sysconfdir=/etc \
|
---|
| 88 | --with-apxs2 \
|
---|
| 89 | --with-config-file-path=/etc \
|
---|
| 90 | --with-zlib \
|
---|
| 91 | --with-bz2 \
|
---|
| 92 | --enable-ftp \
|
---|
| 93 | --with-gettext \
|
---|
| 94 | --with-iconv \
|
---|
[36c668d] | 95 | --with-ncurses \
|
---|
| 96 | --disable-libxml &&
|
---|
[08254fc] | 97 | make &&
|
---|
| 98 | make install &&
|
---|
| 99 | cp php.ini-recommended /etc/php.ini</command></userinput></screen>
|
---|
| 100 |
|
---|
| 101 | <note><para><acronym>PHP</acronym> has many more configure options that
|
---|
| 102 | will enable support for certain things. You can use
|
---|
| 103 | <command>./configure --help</command> to see a full list of the
|
---|
| 104 | available options. Also, use of the
|
---|
| 105 | <ulink url="http://www.php.net/"><acronym>PHP</acronym> web site</ulink>
|
---|
| 106 | is highly recommended, as their online docs are very good.</para></note>
|
---|
| 107 |
|
---|
| 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2>
|
---|
| 111 | <title>Configuring <application><acronym>PHP</acronym></application></title>
|
---|
| 112 |
|
---|
| 113 | <sect3><title>Config files</title>
|
---|
| 114 | <para><filename>/etc/php.ini</filename>,
|
---|
| 115 | <filename>/etc/pear.conf</filename></para>
|
---|
| 116 | </sect3>
|
---|
| 117 |
|
---|
| 118 | <sect3><title>Configuration Information</title>
|
---|
| 119 |
|
---|
| 120 | <para>To enable <acronym>PHP</acronym> support in the
|
---|
| 121 | <application>Apache</application> web server,
|
---|
[4a93a3c] | 122 | a new LoadModule (this one should be handled automatically by the
|
---|
| 123 | <command>make install</command> command) and AddType directives must be added to the
|
---|
[08254fc] | 124 | <filename>httpd.conf</filename> file:</para>
|
---|
| 125 |
|
---|
[4a93a3c] | 126 | <screen><userinput>LoadModule php5_module lib/apache/libphp5.so
|
---|
| 127 | AddType application/x-httpd-php .php</userinput></screen>
|
---|
[08254fc] | 128 |
|
---|
| 129 | <para>Also, it can be useful to add an entry for index.php to the
|
---|
| 130 | DirectoryIndex directive of the <filename>httpd.conf</filename>
|
---|
| 131 | file.</para>
|
---|
| 132 |
|
---|
| 133 | </sect3>
|
---|
| 134 |
|
---|
| 135 | </sect2>
|
---|
| 136 |
|
---|
| 137 | <sect2>
|
---|
| 138 | <title>Contents</title>
|
---|
| 139 |
|
---|
| 140 | <para>The <application><acronym>PHP</acronym></application> package contains
|
---|
[6ea7ff9] | 141 | <command>pear</command> (requires <xref linkend="libxml2"/>),
|
---|
[08254fc] | 142 | <command>php</command>,
|
---|
| 143 | <command>php-config</command>,
|
---|
| 144 | <command>phpextdist</command> and
|
---|
| 145 | <command>phpize</command>.
|
---|
| 146 | </para>
|
---|
| 147 |
|
---|
| 148 | </sect2>
|
---|
| 149 |
|
---|
| 150 | <sect2><title>Description</title>
|
---|
| 151 |
|
---|
| 152 | <sect3><title>php</title>
|
---|
| 153 | <para><command>php</command> is a command line interface that enables
|
---|
| 154 | you to parse and execute <acronym>PHP</acronym> code.</para></sect3>
|
---|
| 155 |
|
---|
[6ea7ff9] | 156 | <sect3><title>pear</title>
|
---|
| 157 | <para><command>pear</command> is the PHP Extension and Application
|
---|
| 158 | Repository (<acronym>PEAR</acronym>) package manager.</para></sect3>
|
---|
| 159 |
|
---|
[08254fc] | 160 | </sect2>
|
---|
[f45b1953] | 161 |
|
---|
| 162 | </sect1>
|
---|