source: general/prog/php.xml@ fc87c5a0

12.2 lazarus trunk
Last change on this file since fc87c5a0 was fc87c5a0, checked in by Bruce Dubbs <bdubbs@…>, 3 weeks ago

Tag Chaoter 13 and associated dependencies.

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