[08254fc] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[08254fc] | 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">
|
---|
[ead08d8] | 9 | <!ENTITY php-md5sum "eb50b751c8e1ced05bd012d5a0e4dec3">
|
---|
| 10 | <!ENTITY php-size "7.4 MB">
|
---|
| 11 | <!ENTITY php-buildsize "250 MB (includes installing all documentation)">
|
---|
| 12 | <!ENTITY php-time "2.5 SBU (additional 2.7 SBU to run the test suite)">
|
---|
[08254fc] | 13 | ]>
|
---|
| 14 |
|
---|
[6683a00] | 15 | <sect1 id="php" xreflabel="PHP-&php-version;">
|
---|
[db81e4cb] | 16 | <?dbhtml filename="php.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
| 23 | <title>PHP-&php-version;</title>
|
---|
| 24 |
|
---|
| 25 | <indexterm zone="php">
|
---|
| 26 | <primary sortas="a-PHP">PHP</primary>
|
---|
| 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to PHP</title>
|
---|
| 31 |
|
---|
[7cd76d62] | 32 | <para><application>PHP</application> is the PHP Hypertext Preprocessor.
|
---|
| 33 | Primarily used in dynamic web sites, it allows for programming code to be
|
---|
[db81e4cb] | 34 | directly embedded into the HTML markup.</para>
|
---|
| 35 |
|
---|
| 36 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 37 | <itemizedlist spacing="compact">
|
---|
| 38 | <listitem>
|
---|
| 39 | <para>Download (HTTP): <ulink url="&php-download-http;"/></para>
|
---|
| 40 | </listitem>
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>Download (FTP): <ulink url="&php-download-ftp;"/></para>
|
---|
| 43 | </listitem>
|
---|
| 44 | <listitem>
|
---|
| 45 | <para>Download MD5 sum: &php-md5sum;</para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>Download size: &php-size;</para>
|
---|
| 49 | </listitem>
|
---|
| 50 | <listitem>
|
---|
| 51 | <para>Estimated disk space required: &php-buildsize;</para>
|
---|
| 52 | </listitem>
|
---|
| 53 | <listitem>
|
---|
| 54 | <para>Estimated build time: &php-time;</para>
|
---|
| 55 | </listitem>
|
---|
| 56 | </itemizedlist>
|
---|
| 57 |
|
---|
| 58 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 59 | <itemizedlist spacing="compact">
|
---|
[e797436] | 60 | <!-- <listitem>
|
---|
[7cd76d62] | 61 | <para>Required patch for Berkeley DB: <ulink
|
---|
[db81e4cb] | 62 | url="&patch-root;/php-&php-version;-db43-1.patch"/></para>
|
---|
[e797436] | 63 | </listitem> -->
|
---|
[b84326b7] | 64 | <listitem>
|
---|
| 65 | <para>Pre-built documentation (optional): <ulink
|
---|
| 66 | url="http://www.php.net/download-docs.php"/></para>
|
---|
| 67 | </listitem>
|
---|
[db81e4cb] | 68 | </itemizedlist>
|
---|
| 69 |
|
---|
| 70 | <bridgehead renderas="sect3">PHP Dependencies</bridgehead>
|
---|
| 71 |
|
---|
| 72 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
[256ee72c] | 73 | <para role="required"><xref linkend="apache"/></para>
|
---|
[db81e4cb] | 74 |
|
---|
[2f65edb] | 75 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
[256ee72c] | 76 | <para role="recommended"><xref linkend="libxml2"/></para>
|
---|
[2f65edb] | 77 |
|
---|
[b84326b7] | 78 | <bridgehead renderas="sect4">Optional System Utilities and Libraries</bridgehead>
|
---|
[256ee72c] | 79 | <para role="optional"><xref linkend="libxslt"/>,
|
---|
[e797436] | 80 | <!-- <xref linkend="gamin"/>, -->
|
---|
[b84326b7] | 81 | <xref linkend="gmp"/>,
|
---|
[db81e4cb] | 82 | <xref linkend="pcre"/>,
|
---|
| 83 | <xref linkend="aspell"/>,
|
---|
| 84 | <xref linkend="pkgconfig"/>,
|
---|
[a33e5398] | 85 | <xref linkend="recode"/>,
|
---|
[2f65edb] | 86 | <xref linkend="expat"/> (deprecated alternative to <xref linkend="libxml2"/>),
|
---|
[b3799be4] | 87 | <ulink url="http://www.ossp.org/pkg/lib/mm/">OSSP mm</ulink>,
|
---|
[db81e4cb] | 88 | <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
|
---|
[eab03ca] | 89 | <xref linkend="pth"/>,
|
---|
[ba1a38b] | 90 | <ulink url="http://re2c.org/">re2c</ulink>,
|
---|
[bd38f0a] | 91 | <ulink url="http://xmlrpc-epi.sourceforge.net/main.php?t=php_about">XMLRPC-EPI</ulink>,
|
---|
[a33e5398] | 92 | <ulink url="http://dmalloc.com/">Dmalloc</ulink>, and
|
---|
[7f5c97e] | 93 | an <xref linkend="server-mail"/> (that provides a
|
---|
[ba1a38b] | 94 | <command>sendmail</command> command)</para>
|
---|
[b84326b7] | 95 |
|
---|
| 96 | <bridgehead renderas="sect4">Optional Graphics Utilities and Libraries</bridgehead>
|
---|
[256ee72c] | 97 | <para role="optional"><xref linkend="libjpeg"/>,
|
---|
[b84326b7] | 98 | <xref linkend="libtiff"/>,
|
---|
| 99 | <xref linkend="libpng"/>,
|
---|
[ba1a38b] | 100 | <xref linkend="libexif"/>,
|
---|
[b84326b7] | 101 | <xref linkend="freetype2"/>,
|
---|
[e77976f] | 102 | <xref linkend="x-window-system"/>,
|
---|
[b84326b7] | 103 | <ulink url="http://www.fastio.com/">ClibPDF</ulink>,
|
---|
| 104 | <ulink url="http://www.boutell.com/gd/">GD</ulink>,
|
---|
| 105 | <ulink url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.1.0.tar.gz">
|
---|
[3f87e4a] | 106 | t1lib</ulink>, and
|
---|
[b84326b7] | 107 | <ulink url="http://partners.adobe.com/asn/acrobat/forms.jsp">FDF Toolkit</ulink></para>
|
---|
| 108 |
|
---|
| 109 | <bridgehead renderas="sect4">Optional Web Utilities</bridgehead>
|
---|
[256ee72c] | 110 | <para role="optional"><xref linkend="curl"/>,
|
---|
[b84326b7] | 111 | <xref linkend="html-tidy"/>,
|
---|
[db81e4cb] | 112 | <ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
|
---|
[b84326b7] | 113 | <ulink url="http://www.hyperwave.com/">Hyperwave</ulink>,
|
---|
[ba1a38b] | 114 | <ulink url="http://www.roxen.com/products/webserver/">Roxen WebServer</ulink>,
|
---|
[3f87e4a] | 115 | <ulink url="http://caudium.net/">Caudium</ulink>, and
|
---|
[b84326b7] | 116 | <ulink url="http://www.openwddx.org/">WDDX</ulink></para>
|
---|
| 117 |
|
---|
| 118 | <bridgehead renderas="sect4">Optional Data Management Utilities and Libraries</bridgehead>
|
---|
[256ee72c] | 119 | <para role="optional"><xref linkend="openldap"/>,
|
---|
[b84326b7] | 120 | <xref linkend="gdbm"/>,
|
---|
[3f87e4a] | 121 | <!-- <xref linkend="db"/>, -->
|
---|
[b84326b7] | 122 | <xref linkend="mysql"/>,
|
---|
| 123 | <xref linkend="postgresql"/>,
|
---|
[76b19ad] | 124 | <xref linkend="unixodbc"/>,
|
---|
[b84326b7] | 125 | <ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
|
---|
| 126 | <ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
|
---|
| 127 | <ulink url="http://www.sqlite.org/">SQLite</ulink>,
|
---|
[db81e4cb] | 128 | <ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
|
---|
| 129 | <ulink url="http://www.empress.com/">Empress</ulink>,
|
---|
| 130 | <ulink url="http://www.birdstep.com/">Birdstep</ulink>,
|
---|
| 131 | <ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
|
---|
| 132 | <ulink url="http://www.softwareag.com/">Adabas</ulink>,
|
---|
[3f87e4a] | 133 | <ulink url="http://www.frontbase.com/">FrontBase</ulink>, and
|
---|
[b84326b7] | 134 | <ulink url="http://www.mainstreetsoftworks.com/">Monetra</ulink></para>
|
---|
| 135 |
|
---|
[e797436] | 136 | <para><application>PHP</application> also provides support for many
|
---|
| 137 | commercial database tools such as <application>Oracle</application>,
|
---|
| 138 | <application>SAP</application> and
|
---|
| 139 | <application>ODBC Router</application>.</para>
|
---|
| 140 |
|
---|
[b84326b7] | 141 | <bridgehead renderas="sect4">Optional Security/Encryption Utilities and Libraries</bridgehead>
|
---|
[256ee72c] | 142 | <para role="optional"><xref linkend="openssl"/>,
|
---|
[b84326b7] | 143 | <xref linkend="cyrus-sasl"/>,
|
---|
| 144 | <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
|
---|
[3f87e4a] | 145 | <ulink url="http://mcrypt.sourceforge.net/">libmcrypt</ulink>, and
|
---|
[b84326b7] | 146 | <ulink url="http://mhash.sourceforge.net/">mhash</ulink></para>
|
---|
[db81e4cb] | 147 |
|
---|
[1039de3] | 148 | <para condition="html" role="usernotes">User Notes:
|
---|
| 149 | <ulink url="&blfs-wiki;/php"/></para>
|
---|
| 150 |
|
---|
[db81e4cb] | 151 | </sect2>
|
---|
| 152 |
|
---|
| 153 | <sect2 role="installation">
|
---|
| 154 | <title>Installation of PHP</title>
|
---|
| 155 |
|
---|
[e797436] | 156 | <para>You can use <application>PHP</application> for server-side
|
---|
| 157 | scripting, command-line scripting or client-side GUI applications. This
|
---|
| 158 | book provides instructions for setting up <application>PHP</application>
|
---|
| 159 | for server-side scripting as it is the most common form.</para>
|
---|
[db81e4cb] | 160 |
|
---|
[3f87e4a] | 161 | <!-- Commenting this out for now as BDB is built in LFS
|
---|
| 162 |
|
---|
[7cd76d62] | 163 | <para>If you have <application>Berkeley DB</application> installed and
|
---|
[db81e4cb] | 164 | wish to utilize it, apply the following patch:</para>
|
---|
| 165 |
|
---|
| 166 | <screen><userinput>patch -Np1 -i ../php-&php-version;-db43-1.patch</userinput></screen>
|
---|
| 167 |
|
---|
[3f87e4a] | 168 | -->
|
---|
| 169 |
|
---|
[b84326b7] | 170 | <note>
|
---|
| 171 | <para><application>PHP</application> has many more
|
---|
[ba1a38b] | 172 | <command>configure</command> options that will enable support for various
|
---|
[b84326b7] | 173 | things. You can use <command>./configure --help</command> to see a full
|
---|
| 174 | list of the available options. Also, use of the
|
---|
| 175 | <ulink url="http://www.php.net/">PHP web site</ulink>
|
---|
[e797436] | 176 | is highly recommended, as their online docs are very good. An example of
|
---|
| 177 | a <command>configure</command> command that utilizes many of the most
|
---|
| 178 | common dependencies can be found at <ulink
|
---|
[4e88613] | 179 | url="&files-anduin;/php_configure.txt"/>.
|
---|
[e797436] | 180 | </para>
|
---|
[3f87e4a] | 181 |
|
---|
| 182 | <para>If, for whatever reason, you don't have <xref linkend="libxml2"/>
|
---|
| 183 | installed, you need to add <option>--disable-libxml</option> to the
|
---|
[e797436] | 184 | <command>configure</command> command in the instructions below. Note that
|
---|
| 185 | this will prevent the <command>pear</command> command from being
|
---|
| 186 | built.</para>
|
---|
[b84326b7] | 187 | </note>
|
---|
| 188 |
|
---|
[ba1a38b] | 189 | <!-- Commenting this out as libxml is a recommended dependency.
|
---|
| 190 | Current protocol in the book is to expect folks to have it
|
---|
[3f87e4a] | 191 | installed and the note above should take care of it.
|
---|
[ba1a38b] | 192 |
|
---|
| 193 | <para>Remove the <parameter>-disable-libxml</parameter> switch if you
|
---|
[b84326b7] | 194 | have <xref linkend="libxml2"/> installed otherwise
|
---|
| 195 | <command>pear</command> will not be built.</para>
|
---|
[ba1a38b] | 196 | -->
|
---|
[b84326b7] | 197 |
|
---|
[db81e4cb] | 198 | <para>Install <application>PHP</application> by
|
---|
| 199 | running the following commands:</para>
|
---|
| 200 |
|
---|
[e797436] | 201 | <screen><userinput>sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' \
|
---|
| 202 | ext/dba/dba_db4.c &&
|
---|
[3f87e4a] | 203 | ./configure --prefix=/usr \
|
---|
[4a93a3c] | 204 | --sysconfdir=/etc \
|
---|
| 205 | --with-apxs2 \
|
---|
[e797436] | 206 | --enable-force-cgi-redirect \
|
---|
| 207 | --enable-discard-path \
|
---|
[4a93a3c] | 208 | --with-config-file-path=/etc \
|
---|
| 209 | --with-zlib \
|
---|
[5056a3b] | 210 | --enable-bcmath \
|
---|
[4a93a3c] | 211 | --with-bz2 \
|
---|
[990f983] | 212 | --enable-calendar \
|
---|
[dfb9157] | 213 | --enable-dba \
|
---|
[5056a3b] | 214 | --enable-exif \
|
---|
[4a93a3c] | 215 | --enable-ftp \
|
---|
| 216 | --with-gettext \
|
---|
[fbbf93e] | 217 | --enable-mbstring \
|
---|
[36c668d] | 218 | --with-ncurses \
|
---|
[ba1a38b] | 219 | --with-readline &&
|
---|
[db81e4cb] | 220 | make</userinput></screen>
|
---|
| 221 |
|
---|
[d6f7e6cb] | 222 | <para>To test the results, issue: <command>make test</command>. Some of
|
---|
| 223 | the tests are known to fail.</para>
|
---|
| 224 |
|
---|
| 225 | <!--Three of
|
---|
[e797436] | 226 | the (over 1600) tests are known to fail: an <command>iconv</command>
|
---|
| 227 | stream filter test (ext/iconv/tests/iconv_stream_filter.phpt) and two
|
---|
| 228 | MBString function overload tests (ext/mbstring/tests/overload01.phpt and
|
---|
| 229 | ext/mbstring/tests/overload02.phpt). Additionally, if you have the
|
---|
| 230 | <application>unixODBC</application> package installed and linked into the
|
---|
[d6f7e6cb] | 231 | build, you may see many failures related to it.</para> -->
|
---|
[1f01e7e7] | 232 |
|
---|
[db81e4cb] | 233 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 234 |
|
---|
| 235 | <screen role="root"><userinput>make install &&
|
---|
[ba1a38b] | 236 | install -v -m644 php.ini-recommended /etc/php.ini &&
|
---|
[d6f7e6cb] | 237 |
|
---|
[ba1a38b] | 238 | install -v -m755 -d /usr/share/doc/php-&php-version; &&
|
---|
| 239 | install -v -m644 CODING_STANDARDS EXTENSIONS INSTALL NEWS \
|
---|
| 240 | README* TODO* UPGRADING php.gif \
|
---|
| 241 | /usr/share/doc/php-&php-version; &&
|
---|
| 242 | ln -v -s /usr/lib/php/doc/Archive_Tar/docs/Archive_Tar.txt \
|
---|
| 243 | /usr/share/doc/php-&php-version;</userinput></screen>
|
---|
[db81e4cb] | 244 |
|
---|
[b84326b7] | 245 | <para>The pre-built HTML documentation is packaged in two forms: a tarball
|
---|
| 246 | containing many individual files, useful for quick loading into your
|
---|
[ba1a38b] | 247 | browser, and one large individual file, which is useful for using the
|
---|
| 248 | search utility of your browser. If you downloaded either, or both, of the
|
---|
| 249 | documentation files, issue the following commands as the
|
---|
| 250 | <systemitem class='username'>root</systemitem> user to install them (note
|
---|
[b84326b7] | 251 | these instructions assume English docs, modify the tarball names below if
|
---|
| 252 | necessary).</para>
|
---|
[db81e4cb] | 253 |
|
---|
[ba1a38b] | 254 | <para>For the <quote>Single HTML</quote> file:</para>
|
---|
[b84326b7] | 255 |
|
---|
| 256 | <screen role="root"><userinput>install -v -m644 ../php_manual_en.html.gz \
|
---|
| 257 | /usr/share/doc/php-&php-version; &&
|
---|
| 258 | gunzip -v /usr/share/doc/php-&php-version;/php_manual_en.html.gz</userinput></screen>
|
---|
| 259 |
|
---|
| 260 | <para>For the <quote>Many HTML files</quote> tarball:</para>
|
---|
| 261 |
|
---|
[ba1a38b] | 262 | <screen role="root"><userinput>tar -xvf ../php_manual_en.tar.gz -C /usr/share/doc/php-&php-version; &&
|
---|
[b84326b7] | 263 | chown -v -R root:root /usr/share/doc/php-&php-version;/html</userinput></screen>
|
---|
[db81e4cb] | 264 |
|
---|
| 265 | </sect2>
|
---|
[b84326b7] | 266 |
|
---|
[934c9b26] | 267 | <sect2 role="commands">
|
---|
| 268 | <title>Command Explanations</title>
|
---|
[db81e4cb] | 269 |
|
---|
[e797436] | 270 | <para><command>sed -i '...' ext/dba/dba_db4.c</command>: This command is
|
---|
| 271 | used to fix an issue with the use of Berkeley DB >= 4.3.x.</para>
|
---|
| 272 |
|
---|
[934c9b26] | 273 | <para><parameter>--with-apxs2</parameter>: This parameter
|
---|
[b84326b7] | 274 | builds the Apache HTTPD 2.0 module.</para>
|
---|
[934c9b26] | 275 |
|
---|
| 276 | <para><parameter>--with-config-file-path=/etc</parameter>: This parameter
|
---|
[ba1a38b] | 277 | makes <application>PHP</application> look for the
|
---|
| 278 | <filename>php.ini</filename> configuration file in
|
---|
| 279 | <filename class='directory'>/etc</filename>.</para>
|
---|
[934c9b26] | 280 |
|
---|
[bccbdaea] | 281 | <para><parameter>--with-zlib</parameter>: This parameter adds
|
---|
[3239e36] | 282 | support for <application>Zlib</application> compression.</para>
|
---|
[934c9b26] | 283 |
|
---|
[b84326b7] | 284 | <para><parameter>--enable-bcmath</parameter>: Enables
|
---|
| 285 | <command>bc</command> style precision math functions.</para>
|
---|
[bccbdaea] | 286 |
|
---|
[2f65edb] | 287 | <para><parameter>--with-bz2</parameter>: Adds support for
|
---|
[b84326b7] | 288 | <application>Bzip2</application> compression functions.</para>
|
---|
[934c9b26] | 289 |
|
---|
| 290 | <para><parameter>--enable-calendar</parameter>: This parameter
|
---|
| 291 | provides support for calendar conversion.</para>
|
---|
| 292 |
|
---|
| 293 | <para><parameter>--enable-dba</parameter>: This parameter enables
|
---|
[2f65edb] | 294 | support for database (dbm-style) abstraction layer functions.</para>
|
---|
[934c9b26] | 295 |
|
---|
| 296 | <para><parameter>--enable-exif</parameter>: Enables functions
|
---|
| 297 | to access metadata from images.</para>
|
---|
| 298 |
|
---|
| 299 | <para><parameter>--enable-ftp</parameter>: This parameter
|
---|
[3239e36] | 300 | enables FTP functions.</para>
|
---|
[934c9b26] | 301 |
|
---|
| 302 | <para><parameter>--with-gettext</parameter>: Enables functions
|
---|
[3239e36] | 303 | that use <application>Gettext</application> text translation.</para>
|
---|
[934c9b26] | 304 |
|
---|
| 305 | <para><parameter>--enable-mbstring</parameter>: This parameter
|
---|
| 306 | enables multibyte string support.</para>
|
---|
| 307 |
|
---|
| 308 | <para><parameter>--with-ncurses</parameter>: Provides ncurses
|
---|
| 309 | terminal independent cursor handling.</para>
|
---|
| 310 |
|
---|
| 311 | <para><parameter>--with-readline</parameter>: This parameter
|
---|
[b84326b7] | 312 | enables command line <application>Readline</application> support.</para>
|
---|
[934c9b26] | 313 |
|
---|
| 314 | <para><parameter>--disable-libxml</parameter>: This parameter
|
---|
[ba1a38b] | 315 | allows building PHP without <application>libxml2</application>
|
---|
[2f65edb] | 316 | installed.</para>
|
---|
[934c9b26] | 317 |
|
---|
| 318 | </sect2>
|
---|
[bccbdaea] | 319 |
|
---|
[db81e4cb] | 320 | <sect2 role="configuration">
|
---|
| 321 | <title>Configuring PHP</title>
|
---|
| 322 |
|
---|
| 323 | <sect3 id="php-config">
|
---|
| 324 | <title>Config Files</title>
|
---|
| 325 |
|
---|
[ba1a38b] | 326 | <para><filename>/etc/php.ini</filename> and
|
---|
[db81e4cb] | 327 | <filename>/etc/pear.conf</filename></para>
|
---|
| 328 |
|
---|
| 329 | <indexterm zone="php php-config">
|
---|
| 330 | <primary sortas="e-etc-php.ini">/etc/php.ini</primary>
|
---|
| 331 | </indexterm>
|
---|
| 332 |
|
---|
| 333 | <indexterm zone="php php-config">
|
---|
| 334 | <primary sortas="e-etc-pear.conf">/etc/pear.conf</primary>
|
---|
| 335 | </indexterm>
|
---|
| 336 |
|
---|
| 337 | </sect3>
|
---|
| 338 |
|
---|
| 339 | <sect3>
|
---|
| 340 | <title>Configuration Information</title>
|
---|
| 341 |
|
---|
[e797436] | 342 | <para>The file used as the default <filename>/etc/php.ini</filename>
|
---|
| 343 | configuration file is recommended by the <application>PHP</application>
|
---|
| 344 | development team. This file modifies the default behavior of
|
---|
[254be7d3] | 345 | <application>PHP</application>. If no <filename>/etc/php.ini</filename>
|
---|
| 346 | is used, all configuration settings fall to the defaults. You should
|
---|
[e797436] | 347 | review the comments in this file and ensure the changes are acceptable
|
---|
| 348 | in your particular environment.</para>
|
---|
| 349 |
|
---|
[b84326b7] | 350 | <para>You may have noticed the following from the output of the
|
---|
| 351 | <command>make install</command> command:</para>
|
---|
| 352 |
|
---|
[7c1d541] | 353 | <screen><computeroutput>You may want to add: /usr/lib/php to your php.ini include_path</computeroutput></screen>
|
---|
[b84326b7] | 354 |
|
---|
| 355 | <para>If desired, add the entry using the following command as the
|
---|
| 356 | <systemitem class="username">root</systemitem> user:</para>
|
---|
| 357 |
|
---|
[7c1d541] | 358 | <screen role="root"><userinput>sed -i 's@php/includes"@&\ninclude_path = ".:/usr/lib/php"@' \
|
---|
[b84326b7] | 359 | /etc/php.ini</userinput></screen>
|
---|
| 360 |
|
---|
[0619e6d] | 361 | <para>To enable PHP support in the <application>Apache</application>
|
---|
[db81e4cb] | 362 | web server, a new LoadModule (which should be handled automatically by the
|
---|
[7cd76d62] | 363 | <command>make install</command> command) and AddType directives
|
---|
[db81e4cb] | 364 | must be added to the <filename>httpd.conf</filename> file:</para>
|
---|
| 365 |
|
---|
| 366 | <screen><literal>LoadModule php5_module lib/apache/libphp5.so
|
---|
| 367 | AddType application/x-httpd-php .php</literal></screen>
|
---|
| 368 |
|
---|
[e797436] | 369 | <para>Additionally, it can be useful to add an entry for
|
---|
[7cd76d62] | 370 | <filename>index.php</filename> to the DirectoryIndex directive of the
|
---|
[e797436] | 371 | <filename>httpd.conf</filename> file. Lastly, adding a line to setup the
|
---|
| 372 | <filename class='extension'>.phps</filename> extension to show
|
---|
| 373 | highlighted <application>PHP</application> source may be
|
---|
| 374 | desirable:</para>
|
---|
| 375 |
|
---|
| 376 | <screen><literal>AddType application/x-httpd-php-source .phps</literal></screen>
|
---|
[db81e4cb] | 377 |
|
---|
[7cd76d62] | 378 | <para>You'll need to restart the <application>Apache</application> web server
|
---|
[0619e6d] | 379 | after making any modifications to the <filename>httpd.conf</filename>
|
---|
[db81e4cb] | 380 | file.</para>
|
---|
| 381 |
|
---|
| 382 | </sect3>
|
---|
| 383 |
|
---|
| 384 | </sect2>
|
---|
| 385 |
|
---|
| 386 | <sect2 role="content">
|
---|
| 387 | <title>Contents</title>
|
---|
| 388 |
|
---|
| 389 | <segmentedlist>
|
---|
| 390 | <segtitle>Installed Programs</segtitle>
|
---|
| 391 | <segtitle>Installed Library</segtitle>
|
---|
| 392 | <segtitle>Installed Directories</segtitle>
|
---|
| 393 |
|
---|
| 394 | <seglistitem>
|
---|
[e797436] | 395 | <seg>pear, peardev, pecl, php, php-config and phpize</seg>
|
---|
| 396 | <seg>libphp5.so Apache module</seg>
|
---|
[ba1a38b] | 397 | <seg>/usr/include/php, /usr/lib/php and
|
---|
| 398 | /usr/share/doc/php-&php-version;</seg>
|
---|
[db81e4cb] | 399 | </seglistitem>
|
---|
| 400 | </segmentedlist>
|
---|
| 401 |
|
---|
| 402 | <variablelist>
|
---|
| 403 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 404 | <?dbfo list-presentation="list"?>
|
---|
| 405 | <?dbhtml list-presentation="table"?>
|
---|
| 406 |
|
---|
| 407 | <varlistentry id="php-prog">
|
---|
| 408 | <term><command>php</command></term>
|
---|
| 409 | <listitem>
|
---|
[7cd76d62] | 410 | <para>is a command line interface that enables you to parse and
|
---|
[db81e4cb] | 411 | execute PHP code.</para>
|
---|
| 412 | <indexterm zone="php php-prog">
|
---|
| 413 | <primary sortas="b-php">php</primary>
|
---|
| 414 | </indexterm>
|
---|
| 415 | </listitem>
|
---|
| 416 | </varlistentry>
|
---|
| 417 |
|
---|
| 418 | <varlistentry id="pear">
|
---|
| 419 | <term><command>pear</command></term>
|
---|
| 420 | <listitem>
|
---|
[7cd76d62] | 421 | <para>is the PHP Extension and Application
|
---|
[db81e4cb] | 422 | Repository (PEAR) package manager.</para>
|
---|
| 423 | <indexterm zone="php pear">
|
---|
| 424 | <primary sortas="b-pear">pear</primary>
|
---|
| 425 | </indexterm>
|
---|
| 426 | </listitem>
|
---|
| 427 | </varlistentry>
|
---|
| 428 |
|
---|
| 429 | </variablelist>
|
---|
| 430 |
|
---|
| 431 | </sect2>
|
---|
[f45b1953] | 432 |
|
---|
| 433 | </sect1>
|
---|