source: general/prog/php.xml@ 0a91797

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 xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 0a91797 was 0a91797, checked in by Douglas R. Reno <renodr@…>, 18 months ago

Update to php-8.1.12 (Security Update)

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