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