source: general/prog/php.xml@ 5b188cf

trunk
Last change on this file since 5b188cf was 1ec72467, checked in by Bruce Dubbs <bdubbs@…>, 3 weeks ago

Remove double hyphens inside comments.

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