source: general/prog/php.xml@ b1e4cd8

12.1 ken/TL2024 lazarus plabs/newcss python3.11 rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since b1e4cd8 was 0be945f, checked in by Bruce Dubbs <bdubbs@…>, 7 months ago

Typo

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