mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
fa83e38178
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@3236 af4574ff-66df-0310-9fd7-8a98e5e911e0
195 lines
6.9 KiB
XML
195 lines
6.9 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY php-download-http "http://us2.php.net/distributions/php-&php-version;.tar.bz2">
|
|
<!ENTITY php-download-ftp "ftp://ftp.isu.edu.tw/pub/Unix/Web/PHP/distributions/php-&php-version;.tar.bz2">
|
|
<!ENTITY php-size "4.4 MB">
|
|
<!ENTITY php-buildsize "101 MB">
|
|
<!ENTITY php-time "1.42 SBU">
|
|
]>
|
|
|
|
<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>
|
|
|
|
<sect2>
|
|
<title>Introduction to <application><acronym>PHP</acronym></application></title>
|
|
|
|
<para><application><acronym>PHP</acronym></application> is the PHP
|
|
Hypertext Preprocessor. Primarily used in dynamic web sites, it allows for
|
|
programming code to be directly embedded into the
|
|
<acronym>HTML</acronym> markup.</para>
|
|
|
|
<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 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>
|
|
|
|
<sect3><title><application><acronym>PHP</acronym></application> dependencies</title>
|
|
<sect4><title>Required</title>
|
|
<para>
|
|
<xref linkend="apache"/>
|
|
</para></sect4>
|
|
<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="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>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Installation of <application><acronym>PHP</acronym></application></title>
|
|
|
|
<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>
|
|
|
|
<para>Install <application><acronym>PHP</acronym></application> by
|
|
running the following commands:</para>
|
|
|
|
<screen><userinput><command>./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--with-apxs2 \
|
|
--with-config-file-path=/etc \
|
|
--with-zlib \
|
|
--enable-bcmath \
|
|
--with-bz2 \
|
|
--enable-calendar \
|
|
--enable-dba \
|
|
--enable-exif \
|
|
--enable-ftp \
|
|
--with-gettext \
|
|
--with-iconv \
|
|
--with-ncurses \
|
|
--with-readline \
|
|
--disable-libxml &&
|
|
make &&
|
|
make install &&
|
|
cp php.ini-recommended /etc/php.ini</command></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>
|
|
|
|
<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>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Configuring <application><acronym>PHP</acronym></application></title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/php.ini</filename>,
|
|
<filename>/etc/pear.conf</filename></para>
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>To enable <acronym>PHP</acronym> support in the
|
|
<application>Apache</application> web server,
|
|
a new LoadModule (this one 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>
|
|
|
|
<screen><userinput>LoadModule php5_module lib/apache/libphp5.so
|
|
AddType application/x-httpd-php .php</userinput></screen>
|
|
|
|
<para>Also, it can be useful to add an entry for index.php to the
|
|
DirectoryIndex directive of the <filename>httpd.conf</filename>
|
|
file.</para>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2>
|
|
<title>Contents</title>
|
|
|
|
<para>The <application><acronym>PHP</acronym></application> package contains
|
|
<command>pear</command>,
|
|
<command>php</command>,
|
|
<command>php-config</command>,
|
|
<command>phpextdist</command> and
|
|
<command>phpize</command>.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2><title>Description</title>
|
|
|
|
<sect3><title>php</title>
|
|
<para><command>php</command> is a command line interface that enables
|
|
you to parse and execute <acronym>PHP</acronym> code.</para></sect3>
|
|
|
|
<sect3><title>pear</title>
|
|
<para><command>pear</command> is the PHP Extension and Application
|
|
Repository (<acronym>PEAR</acronym>) package manager.</para></sect3>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|