source: general/prog/php.xml@ b112f043

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since b112f043 was e948752, checked in by Bruce Dubbs <bdubbs@…>, 17 months ago

Update to php-8.2.1.

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