source: general/prog/php.xml@ ea0364a

lazarus trunk
Last change on this file since ea0364a was d9c72a3, checked in by Bruce Dubbs <bdubbs@…>, 3 months ago

Update to php-8.3.6 (security update).

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