Tagged php.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3985 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Manuel Canales Esparcia 2005-05-05 19:47:31 +00:00
parent a3a476d805
commit db81e4cb63

View File

@ -13,123 +13,134 @@
]>
<sect1 id="php" xreflabel="PHP-&php-version;">
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="php.html"?>
<title><acronym>PHP</acronym>-&php-version;</title>
<indexterm zone="php">
<primary sortas="a-PHP">PHP</primary></indexterm>
<?dbhtml filename="php.html"?>
<sect2>
<title>Introduction to <application><acronym>PHP</acronym></application></title>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<para><application><acronym>PHP</acronym></application> is the
<acronym>PHP</acronym> Hypertext Preprocessor. Primarily used in dynamic web
sites, it allows for programming code to be directly embedded into the
<acronym>HTML</acronym> markup.</para>
<title>PHP-&php-version;</title>
<sect3><title>Package information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP):
<ulink url="&php-download-http;"/></para></listitem>
<listitem><para>Download (FTP):
<ulink url="&php-download-ftp;"/></para></listitem>
<listitem><para>Download MD5 sum: &php-md5sum;</para></listitem>
<listitem><para>Download size: &php-size;</para></listitem>
<listitem><para>Estimated disk space required:
&php-buildsize;</para></listitem>
<listitem><para>Estimated build time:
&php-time;</para></listitem></itemizedlist>
</sect3>
<indexterm zone="php">
<primary sortas="a-PHP">PHP</primary>
</indexterm>
<sect3><title>Additional downloads</title>
<itemizedlist spacing="compact">
<listitem><para>Required patch for Berkeley DB: <ulink
url="&patch-root;/php-&php-version;-db43-1.patch"/></para>
</listitem></itemizedlist>
</sect3>
<sect2 role="package">
<title>Introduction to PHP</title>
<sect3><title><application><acronym>PHP</acronym></application>
dependencies</title>
<sect4><title>Required</title>
<para><xref linkend="apache"/></para>
</sect4>
<para><application>PHP</application> is the PHP Hypertext Preprocessor.
Primarily used in dynamic web sites, it allows for programming code to be
directly embedded into the HTML markup.</para>
<sect4><title>Optional</title>
<para><xref linkend="libxml2"/>,
<xref linkend="libxslt"/>,
<xref linkend="openssl"/>,
<ulink url="http://www.fastio.com/">ClibPDF</ulink>,
<xref linkend="libjpeg"/>,
<xref linkend="libtiff"/>,
<xref linkend="curl"/>,
<ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
<ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
<xref linkend="gdbm"/>,
<xref linkend="db"/>,
<xref linkend="fam"/>,
<ulink url="http://www.boutell.com/gd/">GD</ulink>,
<xref linkend="libpng"/>,
X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
<xref linkend="freetype2"/>,
<ulink
url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.0.2.tar.gz">
t1lib</ulink>,
<xref linkend="gmp"/>
<xref linkend="mysql"/>,
<xref linkend="pcre"/>,
<xref linkend="postgresql"/>,
<xref linkend="aspell"/>,
<xref linkend="pkgconfig"/>,
<xref linkend="html-tidy"/>,
<xref linkend="openldap"/>,
<xref linkend="cyrus-sasl"/>,
<xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
<ulink url="http://mcrypt.hellug.gr/">libmcrypt</ulink>,
<ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
<ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
<ulink url="http://www.sqlite.org/">SQLite</ulink>,
<ulink url="http://dmalloc.com/">Dmalloc</ulink>,
<ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
<ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
<ulink url="http://www.empress.com/">Empress</ulink>,
<ulink url="http://www.birdstep.com/">Birdstep</ulink>,
<ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
<ulink url="http://www.softwareag.com/">Adabas</ulink>,
<ulink url="http://www.frontbase.com/">FrontBase</ulink>,
<ulink url="http://caudium.net/">Caudium</ulink>,
<ulink url="http://www.openwddx.org/">WDDX</ulink>,
<ulink url="http://partners.adobe.com/asn/acrobat/forms.jsp">
FDF Toolkit</ulink>,
<ulink url="http://www.hyperwave.com/">Hyperwave</ulink>,
<ulink url="http://www.mainstreetsoftworks.com/">Monetra</ulink>,
<xref linkend="expat"/> and
<ulink url="../server/mail.html">MTA</ulink></para>
</sect4>
</sect3>
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Download (HTTP): <ulink url="&php-download-http;"/></para>
</listitem>
<listitem>
<para>Download (FTP): <ulink url="&php-download-ftp;"/></para>
</listitem>
<listitem>
<para>Download MD5 sum: &php-md5sum;</para>
</listitem>
<listitem>
<para>Download size: &php-size;</para>
</listitem>
<listitem>
<para>Estimated disk space required: &php-buildsize;</para>
</listitem>
<listitem>
<para>Estimated build time: &php-time;</para>
</listitem>
</itemizedlist>
</sect2>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>Required patch for Berkeley DB: <ulink
url="&patch-root;/php-&php-version;-db43-1.patch"/></para>
</listitem>
</itemizedlist>
<sect2>
<title>Installation of <application><acronym>PHP</acronym></application></title>
<bridgehead renderas="sect3">PHP Dependencies</bridgehead>
<note><para>You can use <application><acronym>PHP</acronym></application>
for server-side scripting, command line scripting or client-side
<acronym>GUI</acronym> applications. The book provides instructions for
setting up <application><acronym>PHP</acronym></application> for
server-side scripting as it is the most common form.</para></note>
<bridgehead renderas="sect4">Required</bridgehead>
<para><xref linkend="apache"/></para>
<para>If you have Berkeley DB installed and wish to utilize it, apply
the following patch:</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para><xref linkend="libxml2"/>,
<xref linkend="libxslt"/>,
<xref linkend="openssl"/>,
<ulink url="http://www.fastio.com/">ClibPDF</ulink>,
<xref linkend="libjpeg"/>,
<xref linkend="libtiff"/>,
<xref linkend="curl"/>,
<ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
<ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
<xref linkend="gdbm"/>,
<xref linkend="db"/>,
<xref linkend="fam"/>,
<ulink url="http://www.boutell.com/gd/">GD</ulink>,
<xref linkend="libpng"/>,
X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
<xref linkend="freetype2"/>,
<ulink
url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.0.2.tar.gz">
t1lib</ulink>,
<xref linkend="gmp"/>
<xref linkend="mysql"/>,
<xref linkend="pcre"/>,
<xref linkend="postgresql"/>,
<xref linkend="aspell"/>,
<xref linkend="pkgconfig"/>,
<xref linkend="html-tidy"/>,
<xref linkend="openldap"/>,
<xref linkend="cyrus-sasl"/>,
<xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
<ulink url="http://mcrypt.hellug.gr/">libmcrypt</ulink>,
<ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
<ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
<ulink url="http://www.sqlite.org/">SQLite</ulink>,
<ulink url="http://dmalloc.com/">Dmalloc</ulink>,
<ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
<ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
<ulink url="http://www.empress.com/">Empress</ulink>,
<ulink url="http://www.birdstep.com/">Birdstep</ulink>,
<ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
<ulink url="http://www.softwareag.com/">Adabas</ulink>,
<ulink url="http://www.frontbase.com/">FrontBase</ulink>,
<ulink url="http://caudium.net/">Caudium</ulink>,
<ulink url="http://www.openwddx.org/">WDDX</ulink>,
<ulink url="http://partners.adobe.com/asn/acrobat/forms.jsp">
FDF Toolkit</ulink>,
<ulink url="http://www.hyperwave.com/">Hyperwave</ulink>,
<ulink url="http://www.mainstreetsoftworks.com/">Monetra</ulink>,
<xref linkend="expat"/> and
<ulink url="../server/mail.html">MTA</ulink></para>
<screen><userinput><command>patch -Np1 -i ../php-&php-version;-db43-1.patch</command></userinput></screen>
</sect2>
<para>Install <application><acronym>PHP</acronym></application> by
running the following commands:</para>
<sect2 role="installation">
<title>Installation of PHP</title>
<screen><userinput><command>./configure --prefix=/usr \
<note>
<para>You can use <application>PHP</application>
for server-side scripting, command line scripting or client-side
GUI applications. The book provides instructions for
setting up <application>PHP</application> for
server-side scripting as it is the most common form.</para>
</note>
<para>If you have <application>Berkeley DB</application> installed and
wish to utilize it, apply the following patch:</para>
<screen><userinput>patch -Np1 -i ../php-&php-version;-db43-1.patch</userinput></screen>
<para>Install <application>PHP</application> by
running the following commands:</para>
<screen><userinput>./configure --prefix=/usr \
--sysconfdir=/etc \
--with-apxs2 \
--with-config-file-path=/etc \
@ -146,98 +157,114 @@ running the following commands:</para>
--with-ncurses \
--with-readline \
--disable-libxml &amp;&amp;
make</command></userinput></screen>
make</userinput></screen>
<para>Now, as the root user:</para>
<para>Now, as the <systemitem class="username">root</systemitem> user:</para>
<screen><userinput role='root'><command>make install &amp;&amp;
cp php.ini-recommended /etc/php.ini</command></userinput></screen>
<screen role="root"><userinput>make install &amp;&amp;
cp php.ini-recommended /etc/php.ini</userinput></screen>
<para>Remove the <parameter>--disable-libxml</parameter> switch if you
have <xref linkend="libxml2"/> installed otherwise
<command>pear</command> will not be built.</para>
<para>Remove the <option>--disable-libxml</option> switch if you
have <xref linkend="libxml2"/> installed otherwise
<command>pear</command> will not be built.</para>
<note><para><acronym>PHP</acronym> has many more configure options that
will enable support for certain things. You can use
<command>./configure --help</command> to see a full list of the
available options. Also, use of the
<ulink url="http://www.php.net/"><acronym>PHP</acronym> web site</ulink>
is highly recommended, as their online docs are very good.</para></note>
<note>
<para><application>PHP</application> has many more configure
options that will enable support for certain things. You can use
<command>./configure --help</command> to see a full list of the
available options. Also, use of the
<ulink url="http://www.php.net/">PHP web site</ulink>
is highly recommended, as their online docs are very good.</para>
</note>
</sect2>
</sect2>
<sect2>
<title>Configuring <application><acronym>PHP</acronym></application></title>
<sect2 role="configuration">
<title>Configuring PHP</title>
<sect3 id="php-config"><title>Config files</title>
<para><filename>/etc/php.ini</filename>,
<filename>/etc/pear.conf</filename></para>
<indexterm zone="php php-config">
<primary sortas="e-etc-php.ini">/etc/php.ini</primary></indexterm>
<indexterm zone="php php-config">
<primary sortas="e-etc-pear.conf">/etc/pear.conf</primary></indexterm>
</sect3>
<sect3 id="php-config">
<title>Config Files</title>
<sect3><title>Configuration Information</title>
<para><filename>/etc/php.ini</filename>,
<filename>/etc/pear.conf</filename></para>
<para>To enable <acronym>PHP</acronym> support in the
<application>Apache</application> web server,
a new LoadModule (which should be handled automatically by the
<command>make install</command> command) and AddType directives must be added
to the <filename>httpd.conf</filename> file:</para>
<indexterm zone="php php-config">
<primary sortas="e-etc-php.ini">/etc/php.ini</primary>
</indexterm>
<screen><userinput>LoadModule php5_module lib/apache/libphp5.so
AddType application/x-httpd-php .php</userinput></screen>
<indexterm zone="php php-config">
<primary sortas="e-etc-pear.conf">/etc/pear.conf</primary>
</indexterm>
<para>Also, it can be useful to add an entry for
<filename>index.php</filename> to the DirectoryIndex directive of the
<filename>httpd.conf</filename> file.</para>
</sect3>
<para>You'll need to restart the <application>Apache</application> web server
after making any modifications to the <filename>httpd.conf</filename>
file.</para>
</sect3>
<sect3>
<title>Configuration Information</title>
</sect2>
<para>To enable PHP support in the <application>Apache</application>
web server, a new LoadModule (which should be handled automatically by the
<command>make install</command> command) and AddType directives
must be added to the <filename>httpd.conf</filename> file:</para>
<sect2>
<title>Contents</title>
<screen><literal>LoadModule php5_module lib/apache/libphp5.so
AddType application/x-httpd-php .php</literal></screen>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<para>Also, it can be useful to add an entry for
<filename>index.php</filename> to the DirectoryIndex directive of the
<filename>httpd.conf</filename> file.</para>
<seglistitem>
<seg>pear, php, php-config, phpextdist and phpize</seg>
<seg>libphp5.so</seg>
<seg>/usr/include/php and /usr/lib/php</seg>
</seglistitem>
</segmentedlist>
<para>You'll need to restart the <application>Apache</application> web server
after making any modifications to the <filename>httpd.conf</filename>
file.</para>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
</sect3>
<varlistentry id="php-prog">
<term><command>php</command></term>
<listitem><para>is a command line interface that enables you to parse and
execute <acronym>PHP</acronym> code.</para>
<indexterm zone="php php-prog">
<primary sortas="b-php">php</primary>
</indexterm></listitem>
</varlistentry>
</sect2>
<varlistentry id="pear">
<term><command>pear</command></term>
<listitem><para>is the <acronym>PHP</acronym> Extension and Application
Repository (<acronym>PEAR</acronym>) package manager.</para>
<indexterm zone="php pear">
<primary sortas="b-pear">pear</primary>
</indexterm></listitem>
</varlistentry>
</variablelist>
<sect2 role="content">
<title>Contents</title>
</sect2>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>pear, php, php-config, phpextdist, and phpize</seg>
<seg>libphp5.so</seg>
<seg>/usr/include/php and /usr/lib/php</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="php-prog">
<term><command>php</command></term>
<listitem>
<para>is a command line interface that enables you to parse and
execute PHP code.</para>
<indexterm zone="php php-prog">
<primary sortas="b-php">php</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pear">
<term><command>pear</command></term>
<listitem>
<para>is the PHP Extension and Application
Repository (PEAR) package manager.</para>
<indexterm zone="php pear">
<primary sortas="b-pear">pear</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>