source: general/prog/php.xml@ 3f2db3a6

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 3f2db3a6 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 19 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

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