source: general/prog/php.xml@ cfc1f98

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 cfc1f98 was cfc1f98, checked in by Pierre Labastie <pieere@…>, 4 years ago

cups-filters-1.28.1
mercurial-5.5.1
php-7.4.10
gspell-1.8.4
amtk-5.1.2
gtk+-3.24.23
at-spi2-core-2.36.1
gnutls-3.6.15
xfsprogs-5.8.0
js-68.12.0

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

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