source: general/prog/php.xml

trunk
Last change on this file was adabb5d, checked in by Douglas R. Reno <renodr@…>, 4 days ago

PHP: fix a rendering error

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