source: general/prog/php.xml@ a98eed9

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 a98eed9 was a98eed9, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Package updates.
Update to poppler-21.06.1.
Update to php-8.0.7.
Update to pycairo-1.20.1 (Python module).

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