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 "4.4 MB">
|
---|
10 | <!ENTITY php-buildsize "101 MB">
|
---|
11 | <!ENTITY php-time "1.42 SBU">
|
---|
12 | ]>
|
---|
13 |
|
---|
14 | <sect1 id="php" xreflabel="PHP-&php-version;">
|
---|
15 | <sect1info>
|
---|
16 | <othername>$LastChangedBy$</othername>
|
---|
17 | <date>$Date$</date>
|
---|
18 | </sect1info>
|
---|
19 | <?dbhtml filename="php.html"?>
|
---|
20 | <title><acronym>PHP</acronym>-&php-version;</title>
|
---|
21 |
|
---|
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>
|
---|
35 | <listitem><para>Estimated Disk space required: &php-buildsize;</para></listitem>
|
---|
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>
|
---|
42 | <xref linkend="apache"/>
|
---|
43 | </para></sect4>
|
---|
44 | <sect4><title>Optional</title>
|
---|
45 | <para>
|
---|
46 | <xref linkend="libxml2"/>,
|
---|
47 | <xref linkend="libxslt"/>,
|
---|
48 | <xref linkend="openssl"/>,
|
---|
49 | <xref linkend="bc"/>,
|
---|
50 | <ulink url="http://www.fastio.com/">ClibPDF</ulink>,
|
---|
51 | <xref linkend="libjpeg"/>,
|
---|
52 | <xref linkend="libtiff"/>,
|
---|
53 | <xref linkend="curl"/>,
|
---|
54 | <ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
|
---|
55 | <xref linkend="gdbm"/>,
|
---|
56 | <xref linkend="db"/>,
|
---|
57 | <xref linkend="fam"/>,
|
---|
58 | <ulink url="http://www.boutell.com/gd/">GD</ulink>,
|
---|
59 | <xref linkend="libpng"/>,
|
---|
60 | X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
|
---|
61 | <xref linkend="freetype2"/>,
|
---|
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"/>,
|
---|
65 | <xref linkend="pcre"/>,
|
---|
66 | <xref linkend="postgresql"/>,
|
---|
67 | <xref linkend="openldap"/>,
|
---|
68 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
69 | <ulink url="http://mcrypt.hellug.gr/">libmcrypt</ulink>,
|
---|
70 | <ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
|
---|
71 | <xref linkend="expat"/> and
|
---|
72 | <ulink url="../server/mail.html">MTA</ulink>
|
---|
73 | </para></sect4>
|
---|
74 | </sect3>
|
---|
75 |
|
---|
76 | </sect2>
|
---|
77 |
|
---|
78 | <sect2>
|
---|
79 | <title>Installation of <application><acronym>PHP</acronym></application></title>
|
---|
80 |
|
---|
81 | <note><para>You can use <application><acronym>PHP</acronym></application>
|
---|
82 | for server-side scripting, command line scripting or client-side
|
---|
83 | <acronym>GUI</acronym> applications. The book provides instructions for
|
---|
84 | setting up <application><acronym>PHP</acronym></application> for
|
---|
85 | server-side scripting as it is the most common form.</para></note>
|
---|
86 |
|
---|
87 | <para>Install <application><acronym>PHP</acronym></application> by
|
---|
88 | running the following commands:</para>
|
---|
89 |
|
---|
90 | <screen><userinput><command>./configure --prefix=/usr \
|
---|
91 | --sysconfdir=/etc \
|
---|
92 | --with-apxs2 \
|
---|
93 | --with-config-file-path=/etc \
|
---|
94 | --with-zlib \
|
---|
95 | --with-bz2 \
|
---|
96 | --enable-ftp \
|
---|
97 | --with-gettext \
|
---|
98 | --with-iconv \
|
---|
99 | --with-ncurses \
|
---|
100 | --disable-libxml &&
|
---|
101 | make &&
|
---|
102 | make install &&
|
---|
103 | cp php.ini-recommended /etc/php.ini</command></userinput></screen>
|
---|
104 |
|
---|
105 | <note><para><acronym>PHP</acronym> has many more configure options that
|
---|
106 | will enable support for certain things. You can use
|
---|
107 | <command>./configure --help</command> to see a full list of the
|
---|
108 | available options. Also, use of the
|
---|
109 | <ulink url="http://www.php.net/"><acronym>PHP</acronym> web site</ulink>
|
---|
110 | is highly recommended, as their online docs are very good.</para></note>
|
---|
111 |
|
---|
112 | </sect2>
|
---|
113 |
|
---|
114 | <sect2>
|
---|
115 | <title>Configuring <application><acronym>PHP</acronym></application></title>
|
---|
116 |
|
---|
117 | <sect3><title>Config files</title>
|
---|
118 | <para><filename>/etc/php.ini</filename>,
|
---|
119 | <filename>/etc/pear.conf</filename></para>
|
---|
120 | </sect3>
|
---|
121 |
|
---|
122 | <sect3><title>Configuration Information</title>
|
---|
123 |
|
---|
124 | <para>To enable <acronym>PHP</acronym> support in the
|
---|
125 | <application>Apache</application> web server,
|
---|
126 | a new LoadModule (this one should be handled automatically by the
|
---|
127 | <command>make install</command> command) and AddType directives must be added to the
|
---|
128 | <filename>httpd.conf</filename> file:</para>
|
---|
129 |
|
---|
130 | <screen><userinput>LoadModule php5_module lib/apache/libphp5.so
|
---|
131 | AddType application/x-httpd-php .php</userinput></screen>
|
---|
132 |
|
---|
133 | <para>Also, it can be useful to add an entry for index.php to the
|
---|
134 | DirectoryIndex directive of the <filename>httpd.conf</filename>
|
---|
135 | file.</para>
|
---|
136 |
|
---|
137 | </sect3>
|
---|
138 |
|
---|
139 | </sect2>
|
---|
140 |
|
---|
141 | <sect2>
|
---|
142 | <title>Contents</title>
|
---|
143 |
|
---|
144 | <para>The <application><acronym>PHP</acronym></application> package contains
|
---|
145 | <command>pear</command> (requires <xref linkend="libxml2"/>),
|
---|
146 | <command>php</command>,
|
---|
147 | <command>php-config</command>,
|
---|
148 | <command>phpextdist</command> and
|
---|
149 | <command>phpize</command>.
|
---|
150 | </para>
|
---|
151 |
|
---|
152 | </sect2>
|
---|
153 |
|
---|
154 | <sect2><title>Description</title>
|
---|
155 |
|
---|
156 | <sect3><title>php</title>
|
---|
157 | <para><command>php</command> is a command line interface that enables
|
---|
158 | you to parse and execute <acronym>PHP</acronym> code.</para></sect3>
|
---|
159 |
|
---|
160 | <sect3><title>pear</title>
|
---|
161 | <para><command>pear</command> is the PHP Extension and Application
|
---|
162 | Repository (<acronym>PEAR</acronym>) package manager.</para></sect3>
|
---|
163 |
|
---|
164 | </sect2>
|
---|
165 |
|
---|
166 | </sect1>
|
---|