source: general/prog/php.xml@ f2f955a

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since f2f955a was 264e9bb2, checked in by Thomas Trepl <thomas@…>, 4 months ago

Update to php-8.3.7

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