[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">
|
---|
| 9 | <!ENTITY php-size "3.8 MB">
|
---|
| 10 | <!ENTITY php-buildsize "57 MB">
|
---|
| 11 | <!ENTITY php-time "0.90 SBU">
|
---|
| 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>
|
---|
| 38 | <xref linkend="apache"/> and
|
---|
| 39 | <xref linkend="mysql"/>
|
---|
| 40 | </para></sect4>
|
---|
| 41 | <sect4><title>Optional</title>
|
---|
| 42 | <para>
|
---|
| 43 | <xref linkend="openssl"/>,
|
---|
| 44 | <xref linkend="bc"/>,
|
---|
| 45 | <xref linkend="curl"/>,
|
---|
| 46 | <xref linkend="db"/>,
|
---|
| 47 | <xref linkend="libjpeg"/>,
|
---|
| 48 | <xref linkend="libpng"/>,
|
---|
| 49 | <xref linkend="freetype2"/>,
|
---|
| 50 | <xref linkend="gdbm"/>,
|
---|
| 51 | <ulink url="../server/mail.html">MTA</ulink>,
|
---|
| 52 | <xref linkend="pcre"/>,
|
---|
| 53 | <xref linkend="postgresql"/>,
|
---|
| 54 | <xref linkend="libtiff"/>,
|
---|
| 55 | <xref linkend="expat"/> and
|
---|
| 56 | <xref linkend="gmp"/>
|
---|
| 57 | </para></sect4>
|
---|
| 58 | </sect3>
|
---|
| 59 |
|
---|
| 60 | </sect2>
|
---|
| 61 |
|
---|
| 62 | <sect2>
|
---|
| 63 | <title>Installation of <application><acronym>PHP</acronym></application></title>
|
---|
| 64 |
|
---|
| 65 | <para>Install <application><acronym>PHP</acronym></application> by
|
---|
| 66 | running the following commands:</para>
|
---|
| 67 |
|
---|
| 68 | <screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc \
|
---|
| 69 | --with-apxs2 --with-config-file-path=/etc \
|
---|
| 70 | --with-zlib --with-bz2 --enable-ftp --with-gettext \
|
---|
| 71 | --with-iconv --with-mysql=/usr --with-ncurses &&
|
---|
| 72 | make &&
|
---|
| 73 | make install &&
|
---|
| 74 | cp php.ini-recommended /etc/php.ini</command></userinput></screen>
|
---|
| 75 |
|
---|
| 76 | <note><para><acronym>PHP</acronym> has many more configure options that
|
---|
| 77 | will enable support for certain things. You can use
|
---|
| 78 | <command>./configure --help</command> to see a full list of the
|
---|
| 79 | available options. Also, use of the
|
---|
| 80 | <ulink url="http://www.php.net/"><acronym>PHP</acronym> web site</ulink>
|
---|
| 81 | is highly recommended, as their online docs are very good.</para></note>
|
---|
| 82 |
|
---|
| 83 | </sect2>
|
---|
| 84 |
|
---|
| 85 | <sect2>
|
---|
| 86 | <title>Configuring <application><acronym>PHP</acronym></application></title>
|
---|
| 87 |
|
---|
| 88 | <sect3><title>Config files</title>
|
---|
| 89 | <para><filename>/etc/php.ini</filename>,
|
---|
| 90 | <filename>/etc/pear.conf</filename></para>
|
---|
| 91 | </sect3>
|
---|
| 92 |
|
---|
| 93 | <sect3><title>Configuration Information</title>
|
---|
| 94 |
|
---|
| 95 | <para>To enable <acronym>PHP</acronym> support in the
|
---|
| 96 | <application>Apache</application> web server,
|
---|
| 97 | a new AddType directive must be added to the
|
---|
| 98 | <filename>httpd.conf</filename> file:</para>
|
---|
| 99 |
|
---|
| 100 | <screen><userinput>AddType application/x-httpd-php .php</userinput></screen>
|
---|
| 101 |
|
---|
| 102 | <para>Also, it can be useful to add an entry for index.php to the
|
---|
| 103 | DirectoryIndex directive of the <filename>httpd.conf</filename>
|
---|
| 104 | file.</para>
|
---|
| 105 |
|
---|
| 106 | </sect3>
|
---|
| 107 |
|
---|
| 108 | </sect2>
|
---|
| 109 |
|
---|
| 110 | <sect2>
|
---|
| 111 | <title>Contents</title>
|
---|
| 112 |
|
---|
| 113 | <para>The <application><acronym>PHP</acronym></application> package contains
|
---|
| 114 | <command>pear</command>,
|
---|
| 115 | <command>php</command>,
|
---|
| 116 | <command>php-config</command>,
|
---|
| 117 | <command>phpextdist</command> and
|
---|
| 118 | <command>phpize</command>.
|
---|
| 119 | </para>
|
---|
| 120 |
|
---|
| 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2><title>Description</title>
|
---|
| 124 |
|
---|
| 125 | <sect3><title>php</title>
|
---|
| 126 | <para><command>php</command> is a command line interface that enables
|
---|
| 127 | you to parse and execute <acronym>PHP</acronym> code.</para></sect3>
|
---|
| 128 |
|
---|
| 129 | </sect2>
|
---|
[f45b1953] | 130 |
|
---|
| 131 | </sect1>
|
---|