source: general/prog/php.xml@ 934c9b26

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 934c9b26 was 934c9b26, checked in by Bruce Dubbs <bdubbs@…>, 19 years ago

Added Command Explanations to php.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4850 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 11.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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-md5sum "fb1aac107870f897d26563a9cc5053c0">
10 <!ENTITY php-size "4.7 MB">
11 <!ENTITY php-buildsize "126 MB">
12 <!ENTITY php-time "1.82 SBU">
13]>
14
15<sect1 id="php" xreflabel="PHP-&php-version;">
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
32 <para><application>PHP</application> is the PHP Hypertext Preprocessor.
33 Primarily used in dynamic web sites, it allows for programming code to be
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">
60 <listitem>
61 <para>Required patch for Berkeley DB: <ulink
62 url="&patch-root;/php-&php-version;-db43-1.patch"/></para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">PHP Dependencies</bridgehead>
67
68 <bridgehead renderas="sect4">Required</bridgehead>
69 <para><xref linkend="apache"/></para>
70
71 <bridgehead renderas="sect4">Optional</bridgehead>
72 <para><xref linkend="libxml2"/>,
73 <xref linkend="libxslt"/>,
74 <xref linkend="openssl"/>,
75 <ulink url="http://www.fastio.com/">ClibPDF</ulink>,
76 <xref linkend="libjpeg"/>,
77 <xref linkend="libtiff"/>,
78 <xref linkend="curl"/>,
79 <ulink url="http://qdbm.sourceforge.net/">QDBM</ulink>,
80 <ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
81 <xref linkend="gdbm"/>,
82 <xref linkend="db"/>,
83 <xref linkend="fam"/>,
84 <ulink url="http://www.boutell.com/gd/">GD</ulink>,
85 <xref linkend="libpng"/>,
86 X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
87 <xref linkend="freetype2"/>,
88 <ulink
89 url="http://gd.tuwien.ac.at/visual/ibiblio/libs/graphics/t1lib-5.1.0.tar.gz">
90 t1lib</ulink>,
91 <xref linkend="gmp"/>
92 <xref linkend="mysql"/>,
93 <xref linkend="pcre"/>,
94 <xref linkend="postgresql"/>,
95 <xref linkend="aspell"/>,
96 <xref linkend="pkgconfig"/>,
97 <xref linkend="html-tidy"/>,
98 <xref linkend="openldap"/>,
99 <xref linkend="cyrus-sasl"/>,
100 <xref linkend="mitkrb"/> or <xref linkend="heimdal"/>,
101 <ulink url="http://mcrypt.sourceforge.net/">libmcrypt</ulink>,
102 <ulink url="http://mhash.sourceforge.net/">mhash</ulink>,
103 <ulink url="http://www.ossp.org/pkg/lib/mm/">OSSP mm</ulink>,
104 <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
105 <ulink url="http://www.sqlite.org/">SQLite</ulink>,
106 <ulink url="http://dmalloc.com/">Dmalloc</ulink>,
107 <ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
108 <ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
109 <ulink url="http://www.empress.com/">Empress</ulink>,
110 <ulink url="http://www.birdstep.com/">Birdstep</ulink>,
111 <ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
112 <ulink url="http://www.softwareag.com/">Adabas</ulink>,
113 <ulink url="http://www.frontbase.com/">FrontBase</ulink>,
114 <ulink url="http://caudium.net/">Caudium</ulink>,
115 <ulink url="http://www.openwddx.org/">WDDX</ulink>,
116 <ulink url="http://partners.adobe.com/asn/acrobat/forms.jsp">
117 FDF Toolkit</ulink>,
118 <ulink url="http://www.hyperwave.com/">Hyperwave</ulink>,
119 <ulink url="http://www.mainstreetsoftworks.com/">Monetra</ulink>,
120 <xref linkend="expat"/> and
121 <ulink url="../server/mail.html">MTA</ulink></para>
122
123 </sect2>
124
125 <sect2 role="installation">
126 <title>Installation of PHP</title>
127
128 <note>
129 <para>You can use <application>PHP</application>
130 for server-side scripting, command line scripting or client-side
131 GUI applications. The book provides instructions for
132 setting up <application>PHP</application> for
133 server-side scripting as it is the most common form.</para>
134 </note>
135
136 <para>If you have <application>Berkeley DB</application> installed and
137 wish to utilize it, apply the following patch:</para>
138
139<screen><userinput>patch -Np1 -i ../php-&php-version;-db43-1.patch</userinput></screen>
140
141 <para>Install <application>PHP</application> by
142 running the following commands:</para>
143
144<screen><userinput>./configure --prefix=/usr \
145 --sysconfdir=/etc \
146 --with-apxs2 \
147 --with-config-file-path=/etc \
148 --with-zlib \
149 --enable-bcmath \
150 --with-bz2 \
151 --enable-calendar \
152 --enable-dba \
153 --enable-exif \
154 --enable-ftp \
155 --with-gettext \
156 --enable-mbstring \
157 --with-ncurses \
158 --with-readline \
159 --disable-libxml &amp;&amp;
160make</userinput></screen>
161
162 <para>To test the results, issue: <command>make test</command>.</para>
163
164 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
165
166<screen role="root"><userinput>make install &amp;&amp;
167cp -v php.ini-recommended /etc/php.ini</userinput></screen>
168
169 <para>Remove the <option>--disable-libxml</option> switch if you
170 have <xref linkend="libxml2"/> installed otherwise
171 <command>pear</command> will not be built.</para>
172
173 <note>
174 <para><application>PHP</application> has many more configure
175 options that will enable support for certain things. You can use
176 <command>./configure --help</command> to see a full list of the
177 available options. Also, use of the
178 <ulink url="http://www.php.net/">PHP web site</ulink>
179 is highly recommended, as their online docs are very good.</para>
180 </note>
181
182 </sect2>
183 <sect2 role="commands">
184 <title>Command Explanations</title>
185
186 <para><parameter>--with-apxs2</parameter>: This parameter
187 builds the Apache 2.0 module.</para>
188
189 <para><parameter>--with-config-file-path=/etc</parameter>: This parameter
190 puts the <filename>php.ini</filename> configuration file in <filename
191 class='directory'>/etc</filename>.</para>
192
193 <para><parameter>--with-zlib</parameter>: This parameter adds
194 support for zlib compression.</para>
195
196 <para><parameter>--enable-bcmath</parameter>: Enables bc style
197 precision math functions.</para>
198
199 <para><parameter>--with-bz2</parameter>: Add support for bz2
200 compression functions.</para>
201
202 <para><parameter>--enable-calendar</parameter>: This parameter
203 provides support for calendar conversion.</para>
204
205 <para><parameter>--enable-dba</parameter>: This parameter enables
206 numerous databse support including Berkeley DB functions.</para>
207
208 <para><parameter>--enable-exif</parameter>: Enables functions
209 to access metadata from images.</para>
210
211 <para><parameter>--enable-ftp</parameter>: This parameter
212 enables ftp functions.</para>
213
214 <para><parameter>--with-gettext</parameter>: Enables functions
215 that use gettext text translation.</para>
216
217 <para><parameter>--enable-mbstring</parameter>: This parameter
218 enables multibyte string support.</para>
219
220 <para><parameter>--with-ncurses</parameter>: Provides ncurses
221 terminal independent cursor handling.</para>
222
223 <para><parameter>--with-readline</parameter>: This parameter
224 enables command line readline supoprt.</para>
225
226 <para><parameter>--disable-libxml</parameter>: This parameter
227 disables xml support functions.</para>
228
229 </sect2>
230
231 <sect2 role="configuration">
232 <title>Configuring PHP</title>
233
234 <sect3 id="php-config">
235 <title>Config Files</title>
236
237 <para><filename>/etc/php.ini</filename>,
238 <filename>/etc/pear.conf</filename></para>
239
240 <indexterm zone="php php-config">
241 <primary sortas="e-etc-php.ini">/etc/php.ini</primary>
242 </indexterm>
243
244 <indexterm zone="php php-config">
245 <primary sortas="e-etc-pear.conf">/etc/pear.conf</primary>
246 </indexterm>
247
248 </sect3>
249
250 <sect3>
251 <title>Configuration Information</title>
252
253 <para>To enable PHP support in the <application>Apache</application>
254 web server, a new LoadModule (which should be handled automatically by the
255 <command>make install</command> command) and AddType directives
256 must be added to the <filename>httpd.conf</filename> file:</para>
257
258<screen><literal>LoadModule php5_module lib/apache/libphp5.so
259AddType application/x-httpd-php .php</literal></screen>
260
261 <para>Also, it can be useful to add an entry for
262 <filename>index.php</filename> to the DirectoryIndex directive of the
263 <filename>httpd.conf</filename> file.</para>
264
265 <para>You'll need to restart the <application>Apache</application> web server
266 after making any modifications to the <filename>httpd.conf</filename>
267 file.</para>
268
269 </sect3>
270
271 </sect2>
272
273 <sect2 role="content">
274 <title>Contents</title>
275
276 <segmentedlist>
277 <segtitle>Installed Programs</segtitle>
278 <segtitle>Installed Library</segtitle>
279 <segtitle>Installed Directories</segtitle>
280
281 <seglistitem>
282 <seg>pear, php, php-config, phpextdist, and phpize</seg>
283 <seg>libphp5.so</seg>
284 <seg>/usr/include/php and /usr/lib/php</seg>
285 </seglistitem>
286 </segmentedlist>
287
288 <variablelist>
289 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
290 <?dbfo list-presentation="list"?>
291 <?dbhtml list-presentation="table"?>
292
293 <varlistentry id="php-prog">
294 <term><command>php</command></term>
295 <listitem>
296 <para>is a command line interface that enables you to parse and
297 execute PHP code.</para>
298 <indexterm zone="php php-prog">
299 <primary sortas="b-php">php</primary>
300 </indexterm>
301 </listitem>
302 </varlistentry>
303
304 <varlistentry id="pear">
305 <term><command>pear</command></term>
306 <listitem>
307 <para>is the PHP Extension and Application
308 Repository (PEAR) package manager.</para>
309 <indexterm zone="php pear">
310 <primary sortas="b-pear">pear</primary>
311 </indexterm>
312 </listitem>
313 </varlistentry>
314
315 </variablelist>
316
317 </sect2>
318
319</sect1>
Note: See TracBrowser for help on using the repository browser.