source: general/prog/php.xml@ 1c7c64d

10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 1c7c64d was 1c7c64d, checked in by Pierre Labastie <pieere@…>, 3 years ago

php-8.0.2

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

  • Property mode set to 100644
File size: 24.3 KB
RevLine 
[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
[577eb27]7 <!ENTITY php-download-http "http://www.php.net/distributions/php-&php-version;.tar.xz">
[0c54cea]8 <!ENTITY php-download-ftp " ">
[1c7c64d]9 <!ENTITY php-md5sum "4fc1c90ee10b72d6a56447f8491a9857">
[37d3725f]10 <!ENTITY php-size "10 MB">
[1c7c64d]11 <!ENTITY php-buildsize "675 MB (with tests, add 182 MB for documentation)">
12 <!ENTITY php-time "1.8 SBU (with parallelism=4; add 1.9 SBU for tests)">
[75cf6e3]13 <!-- Tests were run for 8.0.1 at -j4, had two timeouts as well.
14 Results were otherwise normal though, so I'm unsure of what caused the
[1c7c64d]15 increase in time. -renodr
16 No timeout for 8.0.2. Tests run at -j4 too. -pierre -->
[08254fc]17]>
18
[6683a00]19<sect1 id="php" xreflabel="PHP-&php-version;">
[db81e4cb]20 <?dbhtml filename="php.html"?>
21
22 <sect1info>
23 <othername>$LastChangedBy$</othername>
24 <date>$Date$</date>
25 </sect1info>
26
27 <title>PHP-&php-version;</title>
28
29 <indexterm zone="php">
30 <primary sortas="a-PHP">PHP</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to PHP</title>
35
[577eb27]36 <para>
37 <application>PHP</application> is the PHP Hypertext Preprocessor.
38 Primarily used in dynamic web sites, it allows for programming code to be
39 directly embedded into the HTML markup. It is also useful as a
40 general purpose scripting language.
41 </para>
[a5db8d2]42
[717935b]43 &lfs10_checked;
[db81e4cb]44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
[577eb27]48 <para>
49 Download (HTTP): <ulink url="&php-download-http;"/>
50 </para>
[db81e4cb]51 </listitem>
52 <listitem>
[577eb27]53 <para>
54 Download (FTP): <ulink url="&php-download-ftp;"/>
55 </para>
[db81e4cb]56 </listitem>
57 <listitem>
[577eb27]58 <para>
59 Download MD5 sum: &php-md5sum;
60 </para>
[db81e4cb]61 </listitem>
62 <listitem>
[577eb27]63 <para>
64 Download size: &php-size;
65 </para>
[db81e4cb]66 </listitem>
67 <listitem>
[577eb27]68 <para>
69 Estimated disk space required: &php-buildsize;
70 </para>
[db81e4cb]71 </listitem>
72 <listitem>
[577eb27]73 <para>
74 Estimated build time: &php-time;
75 </para>
[db81e4cb]76 </listitem>
77 </itemizedlist>
78
79 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
80 <itemizedlist spacing="compact">
[b84326b7]81 <listitem>
[577eb27]82 <para>
[1e5323fd]83 Optional pre-built documentation (single file html): <ulink
84 url="https://www.php.net/distributions/manual/php_manual_en.html.gz"/>
85 </para>
86 </listitem>
87 <listitem>
88 <para>
89 Optional pre-built documentation (chunked html): <ulink
90 url="https://www.php.net/distributions/manual/php_manual_en.tar.gz"/>.
91 Note that the documentation can be found in languages other than
92 English at <ulink url="http://www.php.net/download-docs.php"/>
[577eb27]93 </para>
[b84326b7]94 </listitem>
[db81e4cb]95 </itemizedlist>
96
97 <bridgehead renderas="sect3">PHP Dependencies</bridgehead>
98
[2f65edb]99 <bridgehead renderas="sect4">Recommended</bridgehead>
[2e4782e]100 <para role="recommended">
101 <xref linkend="apache"/> and
102 <xref linkend="libxml2"/>
103 </para>
[2f65edb]104
[b84326b7]105 <bridgehead renderas="sect4">Optional System Utilities and Libraries</bridgehead>
[577eb27]106 <para role="optional">
107 <xref linkend="aspell"/>,
108 <xref linkend="enchant"/>,
[604bf744]109 <xref linkend="libxslt"/>,
[577eb27]110 an <xref linkend="server-mail"/> (that provides a
[604bf744]111 <command>sendmail</command> command),
112 <xref linkend="pcre"/>,
113 <xref linkend="pth"/>,
[c93c9bf4]114 <ulink url="https://wiki.ubuntu.com/AppArmor">AppArmor</ulink>,
[604bf744]115 <ulink url="http://dmalloc.com/">Dmalloc</ulink>,
[577eb27]116 <ulink url="http://www.net-snmp.org/">Net-SNMP</ulink>,
[1f6b261]117 <ulink url="https://github.com/kkos/oniguruma">oniguruma</ulink>,
[604bf744]118 <ulink url="http://www.ossp.org/pkg/lib/mm/">OSSP mm</ulink>,
119 <ulink url="http://re2c.org/">re2c</ulink>, and
120 <ulink url="http://xmlrpc-epi.sourceforge.net/main.php?t=php_about">XMLRPC-EPI</ulink>
[577eb27]121 </para>
[b84326b7]122
123 <bridgehead renderas="sect4">Optional Graphics Utilities and Libraries</bridgehead>
[577eb27]124 <para role="optional">
[604bf744]125 <xref linkend="freetype2"/>,
126 <xref linkend="libexif"/>,
[577eb27]127 <xref linkend="libjpeg"/>,
128 <xref linkend="libpng"/>,
[604bf744]129 <xref linkend="libtiff"/>,
[75cf6e3]130 <xref linkend="libwebp"/>,
[577eb27]131 <xref linkend="x-window-system"/>,
[b8efb1fb]132 <!--<ulink url="http://www.fastio.com/">ClibPDF</ulink>, - site asks for username/password-->
[604bf744]133 <ulink url="http://www.adobe.com/devnet/acrobat/fdftoolkit.html">FDF Toolkit</ulink>,
[c93c9bf4]134 <ulink url="https://github.com/libgd/libgd">GD</ulink>, and
[eb19654e]135 <ulink url="https://www.t1lib.org/">t1lib</ulink>
[577eb27]136 </para>
[b84326b7]137
138 <bridgehead renderas="sect4">Optional Web Utilities</bridgehead>
[577eb27]139 <para role="optional">
140 <xref linkend="curl"/>,
[2b65035a]141 <xref linkend="tidy-html5"/>,
[604bf744]142 <ulink url="http://sourceforge.net/projects/caudium/">Caudium</ulink>,
[bd86aa8]143 <ulink url="https://www.hyperwave.com/en/">Hyperwave</ulink>,
[604bf744]144 <ulink url="http://www.mnogosearch.org/">mnoGoSearch</ulink>,
[c93c9bf4]145 <ulink url="http://download.roxen.com/6.1/">Roxen WebServer</ulink>, and
[577eb27]146 <ulink url="https://wddxnet.codeplex.com/">WDDX</ulink>
147 </para>
[b84326b7]148
149 <bridgehead renderas="sect4">Optional Data Management Utilities and Libraries</bridgehead>
[577eb27]150 <para role="optional">
[3dda7b8]151 <xref linkend="db"/> (Note that PHP does not officially support versions
[c93c9bf4]152 above 5.3),
153 <xref linkend="libiodbc"/>,
154 <xref linkend="lmdb"/>,
[577eb27]155 <xref linkend="mariadb"/> or <ulink url="http://www.mysql.com/">MySQL</ulink>,
[604bf744]156 <xref linkend="openldap"/>,
[577eb27]157 <xref linkend="postgresql"/>,
158 <xref linkend="sqlite"/>,
[604bf744]159 <xref linkend="unixodbc"/>,
160 <ulink url="http://www.softwareag.com/">Adabas</ulink>,
[577eb27]161 <ulink url="http://www.birdstep.com/">Birdstep</ulink>,
[604bf744]162 <ulink url="http://cr.yp.to/cdb.html">cdb</ulink>,
[577eb27]163 <ulink url="http://www.dbmaker.com/">DBMaker</ulink>,
[604bf744]164 <ulink url="http://www.empress.com/">Empress</ulink>,
[b8efb1fb]165 <ulink url="http://www.frontbase.com/cgi-bin/WebObjects/FBWebSite">FrontBase</ulink>,
[c93c9bf4]166 <ulink url="https://www.ibm.com/analytics/us/en/db2/">IBM DB2</ulink>,
[604bf744]167 <ulink url="http://www.hughes.com.au/products/msql/">Mini SQL</ulink>,
168 <ulink url="http://www.monetra.com/">Monetra</ulink>, and
169 <ulink url="http://sourceforge.net/projects/qdbm">QDBM</ulink>
[577eb27]170 </para>
171
172 <para>
173 <application>PHP</application> also provides support for many
174 commercial database tools such as <application>Oracle</application>,
175 <application>SAP</application> and
176 <application>ODBC Router</application>.
177 </para>
[e797436]178
[b84326b7]179 <bridgehead renderas="sect4">Optional Security/Encryption Utilities and Libraries</bridgehead>
[577eb27]180 <para role="optional">
181 <xref linkend="cyrus-sasl"/>,
182 <xref linkend="mitkrb"/>,
183 <ulink url="http://mcrypt.sourceforge.net/">libmcrypt</ulink>, and
184 <ulink url="http://mhash.sourceforge.net/">mhash</ulink>
185 </para>
[db81e4cb]186
[577eb27]187 <para condition="html" role="usernotes">
188 User Notes: <ulink url="&blfs-wiki;/php"/>
189 </para>
[1039de3]190
[db81e4cb]191 </sect2>
192
193 <sect2 role="installation">
194 <title>Installation of PHP</title>
195
[577eb27]196 <para>
197 You can use <application>PHP</application> for server-side
198 scripting, command-line scripting or client-side GUI applications. This
199 book provides instructions for setting up <application>PHP</application>
200 for server-side scripting as it is the most common form.
201 </para>
[db81e4cb]202
[b84326b7]203 <note>
[577eb27]204 <para>
205 <application>PHP</application> has many more
206 <command>configure</command> options that will enable support for
207 various things. You can use <command>./configure --help</command> to
208 see a full list of the available options. Also, use of the
209 <ulink url="http://www.php.net/">PHP web site</ulink>
210 is highly recommended, as their online docs are very good. An example
211 of a <command>configure</command> command that utilizes many of the
212 most common dependencies can be found at <ulink
[a29486e4]213 url="&sources-anduin-http;/files/php_configure.txt"/>.
[e797436]214 </para>
[3f87e4a]215
[577eb27]216 <para>
217 If, for whatever reason, you don't have <xref linkend="libxml2"/>
218 installed, you need to add <option>--disable-libxml</option> to the
219 <command>configure</command> command in the instructions below. Note
220 that this will prevent the <command>pear</command> command from being
221 built.
222 </para>
[b84326b7]223 </note>
[b8efb1fb]224
[577eb27]225 <para>
226 Install <application>PHP</application> by running the following commands:
227 </para>
[db81e4cb]228
[0098ace6]229<screen revision="sysv"><userinput>./configure --prefix=/usr \
[75033b6]230 --sysconfdir=/etc \
[5178bbf6]231 --localstatedir=/var \
232 --datadir=/usr/share/php \
[81b5be3]233 --mandir=/usr/share/man \
[c0764bc]234 --without-pear \
[5178bbf6]235 --enable-fpm \
236 --with-fpm-user=apache \
237 --with-fpm-group=apache \
[4a93a3c]238 --with-config-file-path=/etc \
[75033b6]239 --with-zlib \
240 --enable-bcmath \
241 --with-bz2 \
242 --enable-calendar \
243 --enable-dba=shared \
244 --with-gdbm \
245 --with-gmp \
246 --enable-ftp \
247 --with-gettext \
248 --enable-mbstring \
[1f6b261]249 --disable-mbregex \
[75033b6]250 --with-readline &amp;&amp;
[db81e4cb]251make</userinput></screen>
252
[0098ace6]253<screen revision="systemd"><userinput>./configure --prefix=/usr \
254 --sysconfdir=/etc \
255 --localstatedir=/var \
256 --datadir=/usr/share/php \
257 --mandir=/usr/share/man \
258 --enable-fpm \
[c0764bc]259 --without-pear \
[0098ace6]260 --with-fpm-user=apache \
261 --with-fpm-group=apache \
262 --with-fpm-systemd \
263 --with-config-file-path=/etc \
264 --with-zlib \
265 --enable-bcmath \
266 --with-bz2 \
267 --enable-calendar \
268 --enable-dba=shared \
269 --with-gdbm \
270 --with-gmp \
271 --enable-ftp \
272 --with-gettext \
273 --enable-mbstring \
[1f6b261]274 --disable-mbregex \
[0098ace6]275 --with-readline &amp;&amp;
276make</userinput></screen>
[577eb27]277 <para>
[1f6b261]278 To test the results, issue: <command>make test</command>. Several
[37d3725f]279 tests (out of over 12400) may fail, in which case you are asked
[1f6b261]280 whether you want to send the report to the PHP developers. If you
281 want to automate the test, you may prefix the command with
282 <command>yes "n" | </command>.
[577eb27]283 </para>
[d6f7e6cb]284
[577eb27]285 <para>
286 Now, as the <systemitem class="username">root</systemitem> user:
287 </para>
[db81e4cb]288
[81b5be3]289<!-- dev note: make INSTALL_ROOT=<DESTDIR> install -->
290
[595e58e]291<screen role="root"><userinput>make install &amp;&amp;
292install -v -m644 php.ini-production /etc/php.ini &amp;&amp;
[d6f7e6cb]293
[ba1a38b]294install -v -m755 -d /usr/share/doc/php-&php-version; &amp;&amp;
[a4fe6a26]295install -v -m644 CODING_STANDARDS* EXTENSIONS NEWS README* UPGRADING* \
296 /usr/share/doc/php-&php-version;</userinput></screen>
[db81e4cb]297
[6ca1b179]298 <para>
299 The default configuration files for the fastCGI process manager are
[0639bb6]300 installed only if they do not already exist on the system. If this is
[6ca1b179]301 the first installation, they should be renamed, as the
302 <systemitem class='username'>root</systemitem> user:
303 </para>
304
305<screen role="root"><userinput>if [ -f /etc/php-fpm.conf.default ]; then
306 mv -v /etc/php-fpm.conf{.default,} &amp;&amp;
307 mv -v /etc/php-fpm.d/www.conf{.default,}
308fi</userinput></screen>
309
[577eb27]310 <para>
311 The pre-built HTML documentation is packaged in two forms: a tarball
312 containing many individual files, useful for quick loading into your
313 browser, and one large individual file, which is useful for using the
314 search utility of your browser. If you downloaded either, or both, of the
315 documentation files, issue the following commands as the
316 <systemitem class='username'>root</systemitem> user to install them (note
317 these instructions assume English docs, modify the tarball names below if
318 necessary).
319 </para>
[db81e4cb]320
[577eb27]321 <para>
322 For the <quote>Single HTML</quote> file:
323 </para>
[b84326b7]324
325<screen role="root"><userinput>install -v -m644 ../php_manual_en.html.gz \
326 /usr/share/doc/php-&php-version; &amp;&amp;
327gunzip -v /usr/share/doc/php-&php-version;/php_manual_en.html.gz</userinput></screen>
328
[577eb27]329 <para>
330 For the <quote>Many HTML files</quote> tarball:
331 </para>
[b84326b7]332
[0fb9d5f]333<screen role="root"><userinput>tar -xvf ../php_manual_en.tar.gz \
[a5db8d2]334 -C /usr/share/doc/php-&php-version; --no-same-owner</userinput></screen>
[db81e4cb]335
[c0764bc]336 <para>
337 The bundled pear is not installed because of a bug which might
338 pollute the filesystem with several hidden files and directories.
[1e5323fd]339 If pear is needed, execute the following commands to install it:
[c0764bc]340 </para>
341
342<screen role="nodump"><userinput>wget http://pear.php.net/go-pear.phar
343php ./go-pear.phar</userinput></screen>
344
[db81e4cb]345 </sect2>
[b84326b7]346
[934c9b26]347 <sect2 role="commands">
[577eb27]348 <title>Command Explanations</title>
[cfc1f98]349
[577eb27]350 <para>
[f1d7196]351 <parameter>--datadir=/usr/share/php</parameter>: This works
[577eb27]352 around a bug in the build machinery, which installs some data to a
353 wrong location.
354 </para>
[5178bbf6]355
[577eb27]356 <para>
357 <parameter>--enable-fpm</parameter>: This parameter allows
358 building the fastCGI Process Manager.
359 </para>
[934c9b26]360
[0098ace6]361 <para revision="systemd">
362 <parameter>--with-fpm-systemd</parameter>: This parameter allows
363 the FastCGI Process Manager to integrate with systemd.
364 </para>
365
[c0764bc]366 <para>
367 <parameter>--without-pear</parameter>: This switch disables
368 installation of bundled pear software.
369 </para>
370
[577eb27]371 <para>
372 <parameter>--with-config-file-path=/etc</parameter>: This parameter
373 makes <application>PHP</application> look for the
374 <filename>php.ini</filename> configuration file in
375 <filename class='directory'>/etc</filename>.
376 </para>
[934c9b26]377
[577eb27]378 <para>
379 <parameter>--with-zlib</parameter>: This parameter adds
380 support for <application>Zlib</application> compression.
381 </para>
[934c9b26]382
[577eb27]383 <para>
384 <parameter>--enable-bcmath</parameter>: Enables
385 <command>bc</command> style precision math functions.
386 </para>
[bccbdaea]387
[577eb27]388 <para>
389 <parameter>--with-bz2</parameter>: Adds support for
390 <application>Bzip2</application> compression functions.
391 </para>
[934c9b26]392
[577eb27]393 <para>
394 <parameter>--enable-calendar</parameter>: This parameter
395 provides support for calendar conversion.
396 </para>
[934c9b26]397
[577eb27]398 <para>
399 <parameter>--enable-dba=shared</parameter>: This parameter enables
400 support for database (dbm-style) abstraction layer functions.
401 </para>
[934c9b26]402
[577eb27]403 <para>
404 <parameter>--enable-ftp</parameter>: This parameter
405 enables FTP functions.
406 </para>
[934c9b26]407
[577eb27]408 <para>
409 <parameter>--with-gettext</parameter>: Enables functions
410 that use <application>Gettext</application> text translation.
411 </para>
[934c9b26]412
[577eb27]413 <para>
414 <parameter>--enable-mbstring</parameter>: This parameter
415 enables multibyte string support.
416 </para>
[934c9b26]417
[aa41434]418<!--
[1f6b261]419 <para>
[aa41434]420 <parameter>- -disable-mbstring</parameter>: This parameter
[1f6b261]421 disables multibyte string regular expression support. It
422 requires the external
423 <ulink url="https://github.com/kkos/oniguruma">oniguruma</ulink>
424 library.
425 </para>
[aa41434]426-->
[577eb27]427 <para>
428 <parameter>--with-readline</parameter>: This parameter
429 enables command line <application>Readline</application> support.
430 </para>
[934c9b26]431
[577eb27]432 <para>
433 <option>--disable-libxml</option>: This option
434 allows building PHP without <application>libxml2</application>
435 installed.
436 </para>
[934c9b26]437
[577eb27]438 <para>
439 <option>--with-apxs2</option>: Instead of building the fastCGI process
440 manager, it is possible to build an <application>apache</application>
441 module. This has some performance penalty for heavy loaded servers,
442 but may be easier to set up. This switch is incompatible with the
443 <parameter>--enable-fpm</parameter> and
444 <parameter>--with-fpm-...</parameter> switches.
445 </para>
[5178bbf6]446
[39ffbd0]447 <para>
[b8efb1fb]448 <option>--with-mysqli=shared</option>: This option includes MySQLi
449 support.
[39ffbd0]450 </para>
451
452 <para>
453 <option>--with-mysql-sock=/run/mysqld/mysqld.sock</option>: Location of
454 the MySQL unix socket pointer.
455 </para>
456
457 <para>
[b8efb1fb]458 <option>--with-pdo-mysql=shared</option>: This option includes PDO:
459 MySQL support.
460 </para>
461
462 <para>
463 <option>--with-tidy=shared</option>: This option includes tidy library
[39ffbd0]464 support.
465 </para>
466
[934c9b26]467 </sect2>
[bccbdaea]468
[db81e4cb]469 <sect2 role="configuration">
470 <title>Configuring PHP</title>
471
472 <sect3 id="php-config">
473 <title>Config Files</title>
474
[577eb27]475 <para>
476 <filename>/etc/php.ini</filename>,
[8f64429]477 <filename>/etc/pear.conf</filename>,
478 <filename>/etc/php-fpm.conf</filename>, and
479 <filename>/etc/php-fpm.d/www.conf</filename>
[577eb27]480 </para>
[db81e4cb]481
482 <indexterm zone="php php-config">
483 <primary sortas="e-etc-php.ini">/etc/php.ini</primary>
484 </indexterm>
485
486 <indexterm zone="php php-config">
487 <primary sortas="e-etc-pear.conf">/etc/pear.conf</primary>
488 </indexterm>
489
[8f64429]490 <indexterm zone="php php-config">
491 <primary sortas="e-etc-php-fpm.d-www.conf">
492 /etc/php-fpm.d/www.conf</primary>
493 </indexterm>
494
[5178bbf6]495 <indexterm zone="php php-config">
496 <primary sortas="e-etc-php-fpm.conf">/etc/php-fpm.conf</primary>
497 </indexterm>
498
[db81e4cb]499 </sect3>
500
501 <sect3>
502 <title>Configuration Information</title>
503
[577eb27]504 <para>
505 The file used as the default <filename>/etc/php.ini</filename>
506 configuration file is recommended by the <application>PHP</application>
507 development team. This file modifies the default behavior of
508 <application>PHP</application>. If no <filename>/etc/php.ini</filename>
509 is used, all configuration settings fall to the defaults. You should
510 review the comments in this file and ensure the changes are acceptable
511 in your particular environment.
512 </para>
[e797436]513
[355b8a9]514 <para>
515 The fastCGI process manager uses the configuration file
516 <filename>/etc/php-fpm.conf</filename>. The default file shipped with
517 PHP includes all the <filename>/etc/php-fpm.d/*.conf</filename> in turn.
518 There is a shipped <filename>/etc/php-fpm.d/www.conf</filename> file,
519 that contains the parameters related to the interaction with the Apache
520 Web server.
521 </para>
522
[577eb27]523 <para>
524 You may have noticed the following from the output of the
525 <command>make install</command> command:
526 </para>
[b84326b7]527
[7c1d541]528<screen><computeroutput>You may want to add: /usr/lib/php to your php.ini include_path</computeroutput></screen>
[b84326b7]529
[577eb27]530 <para>
531 If desired, add the entry using the following command as the
532 <systemitem class="username">root</systemitem> user:
533 </para>
[b84326b7]534
[7c1d541]535<screen role="root"><userinput>sed -i 's@php/includes"@&amp;\ninclude_path = ".:/usr/lib/php"@' \
[b84326b7]536 /etc/php.ini</userinput></screen>
537
[577eb27]538 <para>
539 To enable fastCGI support in the <application>Apache</application>
540 web server, two LoadModule directives must be added to the
541 <filename>httpd.conf</filename> file. They are commented out, so just
542 issue the following command as
543 <systemitem class="username">root</systemitem> user:
544 </para>
[db81e4cb]545
[5178bbf6]546<screen role="root"><userinput>sed -i -e '/proxy_module/s/^#//' \
[7f8868f]547 -e '/proxy_fcgi_module/s/^#//' \
[5178bbf6]548 /etc/httpd/httpd.conf</userinput></screen>
[db81e4cb]549
[577eb27]550 <para>
551 Those modules accept various <command>ProxyPass</command>
552 directives. One possibility is (as the
553 <systemitem class="username">root</systemitem> user):
554 </para>
[5178bbf6]555
556<screen role="root"><userinput>echo \
[7f8868f]557'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/srv/www/$1' >> \
[5178bbf6]558/etc/httpd/httpd.conf</userinput></screen>
559
[577eb27]560 <para>
561 Additionally, it may be useful to add an entry for
562 <filename>index.php</filename> to the DirectoryIndex directive of the
563 <filename>httpd.conf</filename> file. Lastly, adding a line to setup the
564 <filename class='extension'>.phps</filename> extension to show
565 highlighted <application>PHP</application> source may be
566 desirable:
567 </para>
[e797436]568
569<screen><literal>AddType application/x-httpd-php-source .phps</literal></screen>
[db81e4cb]570
[577eb27]571 <para>
572 You'll need to restart the <application>Apache</application> web server
573 after making any modifications to the <filename>httpd.conf</filename>
574 file.
575 </para>
[db81e4cb]576
577 </sect3>
578
[5178bbf6]579 <sect3 id="php-init">
[0098ace6]580 <title><phrase revision="sysv">Boot Script</phrase>
581 <phrase revision="systemd">Systemd Unit</phrase></title>
[5178bbf6]582
[3c7bd00]583 <para revision="sysv">
[5178bbf6]584 To automatically start the <command>php-fpm</command> daemon when the
585 system is rebooted, install the
586 <filename>/etc/rc.d/init.d/php</filename> bootscript from the
587 <xref linkend="bootscripts"/> package as the
588 <systemitem class="username">root</systemitem> user:
589 </para>
590
[3c7bd00]591 <para revision="systemd">
[0098ace6]592 To start the <command>php-fpm</command> daemon at boot,
593 install the systemd unit from the <xref linkend="systemd-units"/>
594 package by running the following command as the
[3c7bd00]595 <systemitem class="username">root</systemitem> user:
596 </para>
597
598
[5178bbf6]599 <indexterm zone="php php-init">
600 <primary sortas="f-php">php</primary>
601 </indexterm>
602
[3c7bd00]603<screen role="root" revision="sysv"><userinput>make install-php</userinput></screen>
604
605<screen role="root" revision="systemd"><userinput>make install-php-fpm</userinput></screen>
606
[5178bbf6]607 </sect3>
608
[db81e4cb]609 </sect2>
610
611 <sect2 role="content">
612 <title>Contents</title>
613
614 <segmentedlist>
615 <segtitle>Installed Programs</segtitle>
[1c345ed]616 <segtitle>Installed Libraries</segtitle>
[db81e4cb]617 <segtitle>Installed Directories</segtitle>
618
619 <seglistitem>
[cfc1f98]620 <seg><!-- not built anymore pear, peardev, pecl,-->
621 phar (symlink), phar.phar, php,
[8f64429]622 php-cgi, php-config, php-fpm, phpdbg, and phpize</seg>
[17f72f6]623
[1c7c64d]624 <seg>dba.so and opcache.so in
[75cf6e3]625 /usr/lib/php/extensions/no-debug-non-zts-20200930</seg>
[17f72f6]626
[cfc1f98]627 <seg>/etc/php-fpm.d, /usr/{include,lib,share}/php, and
[ba1a38b]628 /usr/share/doc/php-&php-version;</seg>
[db81e4cb]629 </seglistitem>
630 </segmentedlist>
631
632 <variablelist>
633 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
634 <?dbfo list-presentation="list"?>
635 <?dbhtml list-presentation="table"?>
636
637 <varlistentry id="php-prog">
638 <term><command>php</command></term>
639 <listitem>
[577eb27]640 <para>
641 is a command line interface that enables you to parse and
642 execute PHP code.
643 </para>
[db81e4cb]644 <indexterm zone="php php-prog">
645 <primary sortas="b-php">php</primary>
646 </indexterm>
647 </listitem>
648 </varlistentry>
649
650 <varlistentry id="pear">
651 <term><command>pear</command></term>
652 <listitem>
[577eb27]653 <para>
654 is the PHP Extension and Application Repository (PEAR) package
[c93c9bf4]655 manager. This isn't installed by default.
[577eb27]656 </para>
[db81e4cb]657 <indexterm zone="php pear">
658 <primary sortas="b-pear">pear</primary>
659 </indexterm>
660 </listitem>
661 </varlistentry>
662
[5178bbf6]663 <varlistentry id="php-fpm">
664 <term><command>php-fpm</command></term>
665 <listitem>
[577eb27]666 <para>
667 is the fastCGI process manager for PHP.
668 </para>
[5178bbf6]669 <indexterm zone="php php-fpm">
670 <primary sortas="b-php-fpm">php-fpm</primary>
671 </indexterm>
672 </listitem>
673 </varlistentry>
674
[8f64429]675 <varlistentry id="phpdbg">
676 <term><command>phpdbg</command></term>
677 <listitem>
678 <para>
679 is the interactive PHP debugger.
680 </para>
681 <indexterm zone="php phpdbg">
682 <primary sortas="b-phpdbg">phpdbg</primary>
683 </indexterm>
684 </listitem>
685 </varlistentry>
686
[db81e4cb]687 </variablelist>
688
689 </sect2>
[f45b1953]690
691</sect1>
Note: See TracBrowser for help on using the repository browser.