source: general/prog/php.xml@ 8d6f4d1

12.1 ken/TL2024 lazarus trunk xry111/llvm18
Last change on this file since 8d6f4d1 was c29fcb2, checked in by Bruce Dubbs <bdubbs@…>, 4 months ago

Update to php-8.3.3.

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