source: general/prog/php.xml@ 15dd0b70

12.1 ken/TL2024 lazarus rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since 15dd0b70 was ab4fdfc, checked in by Pierre Labastie <pierre.labastie@…>, 5 months ago

Change all xml decl to encoding=utf-8

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