[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">
|
---|
[7bc4c361] | 9 | <!ENTITY php-md5sum "fd26455febdddee0977ce226b9108d9c">
|
---|
[4a93a3c] | 10 | <!ENTITY php-size "4.4 MB">
|
---|
| 11 | <!ENTITY php-buildsize "101 MB">
|
---|
[02663ce] | 12 | <!ENTITY php-time "1.29 SBU">
|
---|
[08254fc] | 13 | ]>
|
---|
| 14 |
|
---|
[6683a00] | 15 | <sect1 id="php" xreflabel="PHP-&php-version;">
|
---|
[a0f03b0] | 16 | <sect1info>
|
---|
[5cd0959d] | 17 | <othername>$LastChangedBy$</othername>
|
---|
| 18 | <date>$Date$</date>
|
---|
[a0f03b0] | 19 | </sect1info>
|
---|
[00bb024c] | 20 | <?dbhtml filename="php.html"?>
|
---|
[6683a00] | 21 | <title><acronym>PHP</acronym>-&php-version;</title>
|
---|
[f45b1953] | 22 |
|
---|
[08254fc] | 23 | <sect2>
|
---|
| 24 | <title>Introduction to <application><acronym>PHP</acronym></application></title>
|
---|
| 25 |
|
---|
[7bc4c361] | 26 | <para><application><acronym>PHP</acronym></application> is the
|
---|
| 27 | <acronym>PHP</acronym> Hypertext Preprocessor. Primarily used in dynamic web
|
---|
| 28 | sites, it allows for programming code to be directly embedded into the
|
---|
[08254fc] | 29 | <acronym>HTML</acronym> markup.</para>
|
---|
| 30 |
|
---|
| 31 | <sect3><title>Package information</title>
|
---|
| 32 | <itemizedlist spacing='compact'>
|
---|
[7bc4c361] | 33 | <listitem><para>Download (HTTP):
|
---|
| 34 | <ulink url="&php-download-http;"/></para></listitem>
|
---|
| 35 | <listitem><para>Download (FTP):
|
---|
| 36 | <ulink url="&php-download-ftp;"/></para></listitem>
|
---|
| 37 | <listitem><para>Download MD5 sum: &php-md5sum;</para></listitem>
|
---|
[08254fc] | 38 | <listitem><para>Download size: &php-size;</para></listitem>
|
---|
[7bc4c361] | 39 | <listitem><para>Estimated disk space required:
|
---|
| 40 | &php-buildsize;</para></listitem>
|
---|
| 41 | <listitem><para>Estimated build time:
|
---|
| 42 | &php-time;</para></listitem></itemizedlist>
|
---|
[08254fc] | 43 | </sect3>
|
---|
| 44 |
|
---|
[93c1bf51] | 45 | <sect3><title>Additional downloads</title>
|
---|
| 46 | <itemizedlist spacing="compact">
|
---|
| 47 | <listitem><para>Required patch for Berkeley DB: <ulink
|
---|
| 48 | url="&patch-root;/php-&php-version;-db43-1.patch"/></para>
|
---|
| 49 | </listitem></itemizedlist>
|
---|
| 50 | </sect3>
|
---|
| 51 |
|
---|
[7bc4c361] | 52 | <sect3><title><application><acronym>PHP</acronym></application>
|
---|
| 53 | dependencies</title>
|
---|
[08254fc] | 54 | <sect4><title>Required</title>
|
---|
[7bc4c361] | 55 | <para><xref linkend="apache"/></para>
|
---|
| 56 | </sect4>
|
---|
| 57 |
|
---|
[08254fc] | 58 | <sect4><title>Optional</title>
|
---|
[7bc4c361] | 59 | <para><xref linkend="libxml2"/>,
|
---|
[4a93a3c] | 60 | <xref linkend="libxslt"/>,
|
---|
[cef3a2f] | 61 | <xref linkend="openssl"/>,
|
---|
[4a93a3c] | 62 | <ulink url="http://www.fastio.com/">ClibPDF</ulink>,
|
---|
| 63 | <xref linkend="libjpeg"/>,
|
---|
| 64 | <xref linkend="libtiff"/>,
|
---|
[08254fc] | 65 | <xref linkend="curl"/>,
|
---|
[4a93a3c] | 66 | <ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
|
---|
[dfb9157] | 67 | <ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
|
---|
[4a93a3c] | 68 | <xref linkend="gdbm"/>,
|
---|
[08254fc] | 69 | <xref linkend="db"/>,
|
---|
[4a93a3c] | 70 | <xref linkend="fam"/>,
|
---|
| 71 | <ulink url="http://www.boutell.com/gd/">GD</ulink>,
|
---|
[08254fc] | 72 | <xref linkend="libpng"/>,
|
---|
[4a93a3c] | 73 | X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
|
---|
[08254fc] | 74 | <xref linkend="freetype2"/>,
|
---|
[7bc4c361] | 75 | <ulink
|
---|
| 76 | url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.0.2.tar.gz">
|
---|
| 77 | t1lib</ulink>,
|
---|
[4a93a3c] | 78 | <xref linkend="gmp"/>
|
---|
| 79 | <xref linkend="mysql"/>,
|
---|
[08254fc] | 80 | <xref linkend="pcre"/>,
|
---|
| 81 | <xref linkend="postgresql"/>,
|
---|
[c1e05756] | 82 | <xref linkend="aspell"/>,
|
---|
| 83 | <xref linkend="pkgconfig"/>,
|
---|
[0fb1ed2] | 84 | <xref linkend="html-tidy"/>,
|
---|
[4a93a3c] | 85 | <xref linkend="openldap"/>,
|
---|
[c1e05756] | 86 | <xref linkend="cyrus-sasl"/>,
|
---|
[4a93a3c] | 87 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
| 88 | <ulink url="http://mcrypt.hellug.gr/">libmcrypt</ulink>,
|
---|
| 89 | <ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
|
---|
[c1e05756] | 90 | <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
|
---|
| 91 | <ulink url="http://www.sqlite.org/">SQLite</ulink>,
|
---|
| 92 | <ulink url="http://dmalloc.com/">Dmalloc</ulink>,
|
---|
[ef9c039] | 93 | <ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
|
---|
[ddfee75] | 94 | <ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
|
---|
| 95 | <ulink url="http://www.empress.com/">Empress</ulink>,
|
---|
| 96 | <ulink url="http://www.birdstep.com/">Birdstep</ulink>,
|
---|
| 97 | <ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
|
---|
| 98 | <ulink url="http://www.softwareag.com/">Adabas</ulink>,
|
---|
| 99 | <ulink url="http://www.frontbase.com/">FrontBase</ulink>,
|
---|
| 100 | <ulink url="http://caudium.net/">Caudium</ulink>,
|
---|
| 101 | <ulink url="http://www.openwddx.org/">WDDX</ulink>,
|
---|
[7bc4c361] | 102 | <ulink url="http://partners.adobe.com/asn/acrobat/forms.jsp">
|
---|
| 103 | FDF Toolkit</ulink>,
|
---|
[2077998d] | 104 | <ulink url="http://www.hyperwave.com/">Hyperwave</ulink>,
|
---|
| 105 | <ulink url="http://www.mainstreetsoftworks.com/">Monetra</ulink>,
|
---|
[08254fc] | 106 | <xref linkend="expat"/> and
|
---|
[7bc4c361] | 107 | <ulink url="../server/mail.html">MTA</ulink></para>
|
---|
| 108 | </sect4>
|
---|
[08254fc] | 109 | </sect3>
|
---|
| 110 |
|
---|
| 111 | </sect2>
|
---|
| 112 |
|
---|
| 113 | <sect2>
|
---|
| 114 | <title>Installation of <application><acronym>PHP</acronym></application></title>
|
---|
| 115 |
|
---|
[4a93a3c] | 116 | <note><para>You can use <application><acronym>PHP</acronym></application>
|
---|
| 117 | for server-side scripting, command line scripting or client-side
|
---|
| 118 | <acronym>GUI</acronym> applications. The book provides instructions for
|
---|
| 119 | setting up <application><acronym>PHP</acronym></application> for
|
---|
| 120 | server-side scripting as it is the most common form.</para></note>
|
---|
| 121 |
|
---|
[93c1bf51] | 122 | <para>If you have Berkeley DB installed and wish to utilize it, apply
|
---|
| 123 | the following patch:</para>
|
---|
| 124 |
|
---|
[abc0c08] | 125 | <screen><userinput><command>patch -Np1 -i ../php-&php-version;-db43-1.patch</command></userinput></screen>
|
---|
[93c1bf51] | 126 |
|
---|
[08254fc] | 127 | <para>Install <application><acronym>PHP</acronym></application> by
|
---|
| 128 | running the following commands:</para>
|
---|
| 129 |
|
---|
[4a93a3c] | 130 | <screen><userinput><command>./configure --prefix=/usr \
|
---|
| 131 | --sysconfdir=/etc \
|
---|
| 132 | --with-apxs2 \
|
---|
| 133 | --with-config-file-path=/etc \
|
---|
| 134 | --with-zlib \
|
---|
[5056a3b] | 135 | --enable-bcmath \
|
---|
[4a93a3c] | 136 | --with-bz2 \
|
---|
[990f983] | 137 | --enable-calendar \
|
---|
[dfb9157] | 138 | --enable-dba \
|
---|
[5056a3b] | 139 | --enable-exif \
|
---|
[4a93a3c] | 140 | --enable-ftp \
|
---|
| 141 | --with-gettext \
|
---|
| 142 | --with-iconv \
|
---|
[36c668d] | 143 | --with-ncurses \
|
---|
[c1e05756] | 144 | --with-readline \
|
---|
[36c668d] | 145 | --disable-libxml &&
|
---|
[08254fc] | 146 | make &&
|
---|
| 147 | make install &&
|
---|
| 148 | cp php.ini-recommended /etc/php.ini</command></userinput></screen>
|
---|
| 149 |
|
---|
[84e42bc] | 150 | <para>Remove the <parameter>--disable-libxml</parameter> switch if you
|
---|
[dbf1c23] | 151 | have <xref linkend="libxml2"/> installed otherwise
|
---|
| 152 | <command>pear</command> will not be built.</para>
|
---|
| 153 |
|
---|
[08254fc] | 154 | <note><para><acronym>PHP</acronym> has many more configure options that
|
---|
| 155 | will enable support for certain things. You can use
|
---|
| 156 | <command>./configure --help</command> to see a full list of the
|
---|
| 157 | available options. Also, use of the
|
---|
| 158 | <ulink url="http://www.php.net/"><acronym>PHP</acronym> web site</ulink>
|
---|
| 159 | is highly recommended, as their online docs are very good.</para></note>
|
---|
| 160 |
|
---|
| 161 | </sect2>
|
---|
| 162 |
|
---|
| 163 | <sect2>
|
---|
| 164 | <title>Configuring <application><acronym>PHP</acronym></application></title>
|
---|
| 165 |
|
---|
| 166 | <sect3><title>Config files</title>
|
---|
| 167 | <para><filename>/etc/php.ini</filename>,
|
---|
| 168 | <filename>/etc/pear.conf</filename></para>
|
---|
| 169 | </sect3>
|
---|
| 170 |
|
---|
| 171 | <sect3><title>Configuration Information</title>
|
---|
| 172 |
|
---|
| 173 | <para>To enable <acronym>PHP</acronym> support in the
|
---|
| 174 | <application>Apache</application> web server,
|
---|
[4a93a3c] | 175 | a new LoadModule (this one should be handled automatically by the
|
---|
[7bc4c361] | 176 | <command>make install</command> command) and AddType directives must be added
|
---|
| 177 | to the <filename>httpd.conf</filename> file:</para>
|
---|
[08254fc] | 178 |
|
---|
[4a93a3c] | 179 | <screen><userinput>LoadModule php5_module lib/apache/libphp5.so
|
---|
| 180 | AddType application/x-httpd-php .php</userinput></screen>
|
---|
[08254fc] | 181 |
|
---|
[7bc4c361] | 182 | <para>Also, it can be useful to add an entry for
|
---|
| 183 | <filename>index.php</filename> to the DirectoryIndex directive of the
|
---|
| 184 | <filename>httpd.conf</filename> file.</para>
|
---|
[08254fc] | 185 |
|
---|
| 186 | </sect3>
|
---|
| 187 |
|
---|
| 188 | </sect2>
|
---|
| 189 |
|
---|
| 190 | <sect2>
|
---|
| 191 | <title>Contents</title>
|
---|
| 192 |
|
---|
| 193 | <para>The <application><acronym>PHP</acronym></application> package contains
|
---|
[dbf1c23] | 194 | <command>pear</command>,
|
---|
[08254fc] | 195 | <command>php</command>,
|
---|
| 196 | <command>php-config</command>,
|
---|
| 197 | <command>phpextdist</command> and
|
---|
| 198 | <command>phpize</command>.
|
---|
| 199 | </para>
|
---|
| 200 |
|
---|
| 201 | </sect2>
|
---|
| 202 |
|
---|
| 203 | <sect2><title>Description</title>
|
---|
| 204 |
|
---|
| 205 | <sect3><title>php</title>
|
---|
| 206 | <para><command>php</command> is a command line interface that enables
|
---|
| 207 | you to parse and execute <acronym>PHP</acronym> code.</para></sect3>
|
---|
| 208 |
|
---|
[6ea7ff9] | 209 | <sect3><title>pear</title>
|
---|
[7bc4c361] | 210 | <para><command>pear</command> is the <acronym>PHP</acronym> Extension and
|
---|
| 211 | Application Repository (<acronym>PEAR</acronym>) package
|
---|
| 212 | manager.</para></sect3>
|
---|
[6ea7ff9] | 213 |
|
---|
[08254fc] | 214 | </sect2>
|
---|
[f45b1953] | 215 |
|
---|
| 216 | </sect1>
|
---|