install/pecl.xml
9e2d8231b5d8a3795b365c6770fab288e59e6249
...
...
@@ -7,32 +7,40 @@
7
7
<sect1 xml:id="install.pecl.intro">
8
8
<title>Introduction to PECL Installations</title>
9
9
<simpara>
10
-
<link xlink:href="&url.pecl;">PECL</link> is a repository of PHP extensions that
11
-
are made available to you via the <link xlink:href="&url.php.pear;">PEAR</link>
12
-
packaging system. This section of the manual is intended to demonstrate
13
-
how to obtain and install PECL extensions.
10
+
&link.pecl; is a repository of PHP extensions that are made available via the
11
+
<link xlink:href="&url.php.pear;">PEAR</link>
12
+
packaging system.
13
+
This section of the manual is intended to demonstrate how to obtain and
14
+
install PECL extensions.
14
15
</simpara>
15
16
<simpara>
16
-
These instructions assume <literal>/your/phpsrcdir/</literal> is the path
17
-
to the PHP source distribution, and that <literal>extname</literal> is the name of the
18
-
PECL extension. Adjust accordingly. These instructions also assume a
19
-
familiarity with the <link xlink:href="&url.php.pear.cli;">pear command</link>.
20
-
The information in the PEAR manual for the <literal>pear</literal> command also
21
-
applies to the <literal>pecl</literal> command.
17
+
These instructions assume <literal>/path/to/php/src/dir/</literal> is the
18
+
path to the PHP source distribution and that <literal>extname</literal> is
19
+
the name of the PECL extension. Adjust accordingly.
20
+
These instructions also assume a familiarity with the
21
+
<link xlink:href="&url.php.pear.cli;">pear command</link>.
22
+
The information in the PEAR manual for the
23
+
<command>pear</command>
24
+
command also applies to the
25
+
<command>pecl</command>
26
+
command.
22
27
</simpara>
23
28
<simpara>
24
-
To be useful, a shared extension must be built, installed, and loaded. The
25
-
methods described below provide you with various instructions on how to
26
-
build and install the extensions, but they do not automatically load them.
27
-
Extensions can be loaded by adding an <link
28
-
linkend="ini.extension">extension</link> directive to the &php.ini;
29
-
file, or through the use of the <function>dl</function> function.
29
+
A shared extension must be built, installed, and loaded to be useful.
30
+
The methods described below provide various instructions on how to build and
31
+
install the extensions, but they do not automatically load them.
32
+
Extensions can be loaded by adding an
33
+
<link linkend="ini.extension">extension</link>
34
+
directive to the &php.ini; file or through the use of the
35
+
<function>dl</function>
36
+
function.
30
37
</simpara>
31
38
<simpara>
32
-
When building PHP modules, it's important to have known-good versions
33
-
of the required tools (autoconf, automake, libtool, etc.) See the
34
-
<link xlink:href="&url.php.anongit;">Anonymous Git Instructions</link> for
35
-
details on the required tools, and required versions.
39
+
When building PHP modules, it's important to have known-good versions of the
40
+
required tools (autoconf, automake, libtool, etc.).
41
+
See the
42
+
<link xlink:href="&url.php.anongit;">Anonymous Git Instructions</link>
43
+
for details on the required tools and required versions.
36
44
</simpara>
37
45
</sect1>
38
46

...
...
@@ -44,9 +52,9 @@
44
52
<itemizedlist>
45
53
<listitem>
46
54
<simpara>
47
-
The <literal>pecl install extname</literal> command downloads the
48
-
extensions code automatically, so in this case there is no need
49
-
for a separate download.
55
+
The <command>pecl install extname</command> command downloads the
56
+
extensions code automatically, so in this case, there is no need for a
57
+
separate download.
50
58
</simpara>
51
59
</listitem>
52
60
<listitem>
...
...
@@ -54,36 +62,46 @@
54
62
<link xlink:href="&url.pecl;">&url.pecl;</link>
55
63
</simpara>
56
64
<simpara>
57
-
The PECL web site contains information about the different extensions
58
-
that are offered by the PHP Development Team. The information available
59
-
here includes: ChangeLog, release notes, requirements and other similar
60
-
details.
65
+
The PECL website contains information about the different extensions that
66
+
are offered by the PHP Development Team.
67
+
The information available here includes: changelog, release notes,
68
+
requirements, and other similar details.
61
69
</simpara>
62
70
</listitem>
63
71
<listitem>
64
72
<simpara>
65
-
<literal>pecl download extname</literal>
73
+
<command>pecl download extname</command>
66
74
</simpara>
67
75
<simpara>
68
-
PECL extensions that have releases listed on the PECL web site are
69
-
available for download and installation using the <link
70
-
xlink:href="&url.php.pear.cli;">pecl command</link>.
76
+
PECL extensions that have releases listed on the PECL website are available
77
+
for download and installation using the
78
+
<link xlink:href="&url.php.pear.cli;">pecl command</link>.
71
79
Specific revisions may also be specified.
72
80
</simpara>
73
81
</listitem>
74
82
<listitem>
75
83
<simpara>
84
+
<acronym>git</acronym>
85
+
</simpara>
86
+
<simpara>
87
+
Many PECL extensions reside on GitHub.
88
+
<!-- TODO Expand -->
89
+
</simpara>
90
+
</listitem>
91
+
<listitem>
92
+
<simpara>
76
93
<acronym>SVN</acronym>
77
94
</simpara>
78
95
<simpara>
79
-
Most PECL extensions also reside in <acronym>SVN</acronym>. A web-based view may
80
-
be seen at <link xlink:href="&url.php.svn;pecl/">&url.php.svn;pecl/</link>.
81
-
To download straight from <acronym>SVN</acronym>, the following
82
-
sequence of commands may be used:
96
+
Some PECL extensions also reside in <acronym>SVN</acronym>.
97
+
A web-based view may be seen at
98
+
<link xlink:href="&url.php.svn;pecl/">&url.php.svn;pecl/</link>.
99
+
To download straight from <acronym>SVN</acronym>,
100
+
the following sequence of commands may be used:
83
101
</simpara>
84
102
<para>
85
103
<screen>
86
-
$ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
104
+
$ svn checkout https://svn.php.net/repository/pecl/extname/trunk extname
87
105
</screen>
88
106
</para>
89
107
</listitem>
...
...
@@ -92,8 +110,8 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
92
110
Windows downloads
93
111
</simpara>
94
112
<simpara>
95
-
The PHP project compiles and offers Windows DLLs for most
96
-
PECL extensions on the respective package page.
113
+
The PHP project compiles and offers Windows DLLs for most PECL extensions
114
+
on the package page.
97
115
</simpara>
98
116
</listitem>
99
117
</itemizedlist>
...
...
@@ -102,45 +120,54 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
102
120
<sect1 xml:id="install.pecl.windows">
103
121
<title>Installing a PHP extension on Windows</title>
104
122
<para>
105
-
On Windows, you have two ways to load a PHP extension: either compile it into PHP, or
106
-
load the DLL. Loading a pre-compiled extension is the easiest and preferred way.
123
+
There are two ways to load a PHP extension on Windows: either compile it into
124
+
PHP, or load the DLL.
125
+
Loading a pre-compiled extension is the easiest and preferred way.
107
126
</para>
108
127
<para>
109
-
To load an extension, you need to have it available as a ".dll" file on your system.
110
-
All the extensions are automatically and periodically compiled by the PHP Group
111
-
(see next section for the download).
128
+
To load an extension, it has to be available as a
129
+
<filename>.dll</filename>
130
+
file on the system.
131
+
All the extensions are automatically and periodically compiled by the PHP
132
+
Group (see next section for the download).
112
133
</para>
113
134
<para>
114
-
To compile an extension into PHP, please refer to <link linkend="install.windows.building">
115
-
building from source</link> documentation.
135
+
To compile an extension into PHP, please refer to the
136
+
<link linkend="install.windows.building">building from source</link>
137
+
documentation.
116
138
</para>
117
139
<para>
118
-
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.building">
119
-
building from source</link> documentation. If the DLL file is available neither with your
120
-
PHP distribution nor in PECL, you may have to compile it before you can start using the
121
-
extension.
140
+
To compile a standalone extension (aka a DLL file), please refer to the
141
+
<link linkend="install.windows.building">building from source</link>
142
+
documentation.
143
+
If the DLL file is available neither with the PHP distribution nor in PECL,
144
+
it may be necessary to compile it before the extension can be used.
122
145
</para>
123
146
<sect2 xml:id="install.pecl.windows.find">
124
147
<title>Where to find an extension?</title>
125
148
<para>
126
-
PHP extensions are usually called "php_*.dll" (where the star represents the name of
127
-
the extension) and they are located under the "PHP\ext" folder.
149
+
PHP extensions are usually called <filename>php_*.dll</filename> (where the
150
+
star represents the name of the extension), and they are located under the
151
+
<filename>PHP\ext</filename>
152
+
folder.
128
153
</para>
129
154
<para>
130
-
PHP ships with the extensions most useful to the majority of developers. They are
131
-
called "core" extensions.
155
+
PHP ships with the extensions most useful to the majority of developers.
156
+
They are called <emphasis>bundled</emphasis> extensions.
132
157
</para>
133
158
<para>
134
-
However, if you need functionality not provided by any core extension, you may still be
135
-
able to find one in <link xlink:href="&url.pecl;">PECL</link>. The PHP Extension Community Library (PECL) is a repository for
136
-
PHP Extensions, providing a directory of all known extensions and hosting facilities for
137
-
downloading and development of PHP extensions.
159
+
However, if the bundled extensions do not provide the needed functionality,
160
+
one extension that does may still be found in &link.pecl;.
161
+
The PHP Extension Community Library (PECL) is a repository for PHP
162
+
Extensions, providing a directory of all known extensions and hosting
163
+
facilities for downloading and developing PHP extensions.
138
164
</para>
139
165
<para>
140
-
If you have developed an extension for your own uses, you might want to think about hosting
141
-
it on PECL so that others with the same needs can benefit from your time. A nice side effect
142
-
is that you give them a good chance to give you feedback, (hopefully) thanks, bug reports
143
-
and even fixes/patches. Before you submit your extension for hosting on PECL, please read
166
+
If an extension has been developed for particular uses, it may be hosted on
167
+
PECL so that others with the same needs can benefit from it.
168
+
A nice side effect is that it's a good chance to receive feedback,
169
+
(hopefully) thanks, bug reports and even fixes/patches.
170
+
Before submitting an extension for hosting on PECL, please read
144
171
<link xlink:href="&url.pecl.submit;">PECL submit</link>.
145
172
</para>
146
173
</sect2>
...
...
@@ -148,7 +175,9 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
148
175
<sect2 xml:id="install.pecl.windows.which">
149
176
<title>Which extension to download?</title>
150
177
<para>
151
-
<emphasis>Many times, you will find several versions of each DLL:</emphasis>
178
+
<emphasis>
179
+
Many times, there will be several versions of each DLL available:
180
+
</emphasis>
152
181
<itemizedlist>
153
182
<listitem>
154
183
<simpara>
...
...
@@ -178,13 +207,17 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
178
207
</itemizedlist>
179
208
</para>
180
209
<para>
181
-
You should keep in mind that your extension settings should match all the
182
-
settings of the PHP executable you are using. The following PHP script will
183
-
tell you <emphasis>all</emphasis> about your PHP settings:
210
+
Keep in mind that the extension settings should match all the settings of
211
+
the PHP executable being used.
212
+
The following PHP script will tell <emphasis>all</emphasis> about the PHP
213
+
settings:
184
214
</para>
185
215
<para>
186
216
<example>
187
-
<title><function>phpinfo</function> call</title>
217
+
<title>
218
+
<function>phpinfo</function>
219
+
call
220
+
</title>
188
221
<programlisting role="php">
189
222
<![CDATA[
190
223
<?php
...
...
@@ -198,7 +231,7 @@ phpinfo();
198
231
Or from the command line, run:
199
232
<screen>
200
233
<![CDATA[
201
-
drive:\\path\to\php\executable\php.exe -i
234
+
drive:\path\to\php\executable\php.exe -i
202
235
]]>
203
236
</screen>
204
237
</para>
...
...
@@ -207,74 +240,84 @@ drive:\\path\to\php\executable\php.exe -i
207
240
<sect2 xml:id="install.pecl.windows.loading">
208
241
<title>Loading an extension</title>
209
242
<para>
210
-
The most common way to load a PHP extension is to include it in your <filename>php.ini</filename>
211
-
configuration file. Please note that many extensions are already present in your
212
-
<filename>php.ini</filename> and that you only need to remove the semicolon to activate them.
243
+
The most common way to load a PHP extension is to include it in
244
+
the &php.ini; configuration file.
245
+
Please note that many extensions are already present in the &php.ini; and
246
+
that the semicolon only needs to be removed to activate them.
213
247
</para>
214
248
<para>
215
-
Note that, on PHP version 7.2.0 and up, the extension name may be used instead of the extension's file name. As this is OS-independent and easier, especially for newcomers, it becomes the recommended way of specifying extensions to load. File names remain supported for compatibility with prior versions.
249
+
Note that, as of PHP 7.2.0, the extension name may be used
250
+
instead of the extension's file name.
251
+
As this is OS-independent and easier, especially for newcomers, it becomes
252
+
the recommended way of specifying extensions to load.
253
+
File names remain supported for compatibility with prior versions.
216
254
</para>
217
-
<screen>
255
+
<screen>
218
256
<![CDATA[
219
257
;extension=php_extname.dll
220
258
]]>
221
-
</screen>
222
-
<screen>
259
+
</screen>
260
+
<screen>
223
261
<![CDATA[
224
262
extension=php_extname.dll
225
263
]]>
226
-
</screen>
227
-
<screen>
264
+
</screen>
265
+
<screen>
228
266
<![CDATA[
229
-
; On PHP version 7.2 and up, prefer :
267
+
; As of PHP 7.2.0, prefer:
230
268
extension=extname
231
269
zend_extension=another_extension
232
270
]]>
233
-
</screen>
271
+
</screen>
234
272
<para>
235
-
However, some web servers are confusing because they do not use the <filename>php.ini</filename> located alongside
236
-
your PHP executable. To find out where your actual <filename>php.ini</filename> resides, look
237
-
for its path in <function>phpinfo</function>:
273
+
However, some web servers are confusing because they do not use
274
+
the &php.ini; located alongside the PHP executable.
275
+
To find out where the actual &php.ini; resides, look for its path
276
+
in <function>phpinfo</function>:
238
277
</para>
239
-
<screen>
278
+
<screen>
240
279
<![CDATA[
241
280
Configuration File (php.ini) Path C:\WINDOWS
242
281
]]>
243
-
</screen>
244
-
<screen>
282
+
</screen>
283
+
<screen>
245
284
<![CDATA[
246
-
Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
285
+
Loaded Configuration File C:\Program Files\PHP\8.2\php.ini
247
286
]]>
248
-
</screen>
287
+
</screen>
249
288
<para>
250
-
After activating an extension, save <filename>php.ini</filename>, restart the web server and check
251
-
<function>phpinfo</function> again. The new extension should now have its own section.
289
+
After activating an extension, save &php.ini;, restart the web server, and
290
+
check <function>phpinfo</function> again.
291
+
The new extension should now have its own section.
252
292
</para>
253
293
</sect2>
254
294

255
295
<sect2 xml:id="install.pecl.windows.problemsolving">
256
296
<title>Resolving problems</title>
257
297
<para>
258
-
If the extension does not appear in <function>phpinfo</function>, you should check your logs to
259
-
learn where the problem comes from.
298
+
If the extension does not appear in <function>phpinfo</function>,
299
+
the logs should be checked to learn where the problem comes from.
260
300
</para>
261
301
<para>
262
-
If you are using PHP from the command line (CLI), the extension loading error can be read
263
-
directly on screen.
302
+
If PHP is being used from the command line (CLI), the extension loading
303
+
error can be read directly on the screen.
264
304
</para>
265
305
<para>
266
-
If you are using PHP with a web server, the location and format of the logs vary depending on
267
-
your software. Please read your web server documentation to locate the logs, as it does not
268
-
have anything to do with PHP itself.
306
+
If PHP is being used with a web server, the location and format of the logs
307
+
vary depending on the software.
308
+
Please read the web server documentation to locate the logs, as it has
309
+
nothing to do with PHP itself.
269
310
</para>
270
311
<para>
271
-
Common problems are the location of the DLL, the value of the "<link linkend="ini.extension-dir">
272
-
extension_dir</link>" setting inside <filename>php.ini</filename> and compile-time setting mismatches.
312
+
Common problems are the location of the DLL and the DLLs it depends on, the
313
+
value of the "<link linkend="ini.extension-dir">extension_dir</link>"
314
+
setting inside &php.ini; and compile-time setting mismatches.
273
315
</para>
274
316
<para>
275
-
If the problem lies in a compile-time setting mismatch, you probably didn't download the right DLL.
276
-
Try downloading again the extension with the right settings. Again, <function>phpinfo</function>
277
-
can be of great help.
317
+
If the problem lies in a compile-time setting mismatch, probably the DLL
318
+
downloaded is not the right one.
319
+
Try downloading the extension again with the proper settings.
320
+
Again, <function>phpinfo</function> can be of great help.
278
321
</para>
279
322
</sect2>
280
323

...
...
@@ -283,8 +326,10 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
283
326
<sect1 xml:id="install.pecl.pear">
284
327
<title>Compiling shared PECL extensions with the pecl command</title>
285
328
<simpara>
286
-
PECL makes it easy to create shared PHP extensions. Using the
287
-
<link xlink:href="&url.php.pear.cli;">pecl command</link>, do the following:
329
+
PECL makes it easy to create shared PHP extensions.
330
+
Using the
331
+
<link xlink:href="&url.php.pear.cli;">pecl command</link>,
332
+
do the following:
288
333
</simpara>
289
334
<para>
290
335
<screen>
...
...
@@ -293,16 +338,19 @@ $ pecl install extname
293
338
</para>
294
339
<simpara>
295
340
This will download the source for <emphasis>extname</emphasis>,
296
-
compile, and install <filename>extname.so</filename> into your <link
297
-
linkend="ini.extension-dir">extension_dir</link>.
298
-
<filename>extname.so</filename> may then be loaded via &php.ini;
341
+
compile, and install <filename>extname.so</filename> into the
342
+
<link linkend="ini.extension-dir">extension_dir</link>.
343
+
<filename>extname.so</filename>
344
+
may then be loaded via &php.ini;.
299
345
</simpara>
300
346
<simpara>
301
-
By default, the <literal>pecl</literal> command will not install
302
-
packages that are marked with the <literal>alpha</literal> or
303
-
<literal>beta</literal> state. If no <literal>stable</literal> packages
304
-
are available, you may install a <literal>beta</literal> package using the
305
-
following command:
347
+
By default, the <command>pecl</command> command will not install packages
348
+
that are marked with the <literal>alpha</literal> or
349
+
<literal>beta</literal>
350
+
state.
351
+
If no <literal>stable</literal> packages are available,
352
+
a <literal>beta</literal> package may be installed using the following
353
+
command:
306
354
</simpara>
307
355
<para>
308
356
<screen>
...
...
@@ -310,7 +358,7 @@ $ pecl install extname-beta
310
358
</screen>
311
359
</para>
312
360
<para>
313
-
You may also install a specific version using this variant:
361
+
A specific version may also be installed using this variant:
314
362
</para>
315
363
<para>
316
364
<screen>
...
...
@@ -328,17 +376,18 @@ $ pecl install extname-0.1
328
376
<sect1 xml:id="install.pecl.phpize">
329
377
<title>Compiling shared PECL extensions with phpize</title>
330
378
<simpara>
331
-
Sometimes, using the <literal>pecl</literal> installer is not an option.
332
-
This could be because you're behind a firewall, or it could be because the
333
-
extension you want to install is not available as a PECL compatible
334
-
package, such as unreleased extensions from SVN. If you need to build such
335
-
an extension, you can use the lower-level build tools to perform the build
336
-
manually.
379
+
Sometimes, using the <command>pecl</command> installer is not an option.
380
+
This could be because there is a firewall or because the extension being
381
+
installed is unavailable as a PECL-compatible package, such as unreleased
382
+
extensions from git.
383
+
If such an extension needs to be built, the lower-level build tools can be
384
+
used to perform the build manually.
337
385
</simpara>
338
386
<simpara>
339
-
The <literal>phpize</literal> command is used to prepare the build
340
-
environment for a PHP extension. In the following sample, the sources for
341
-
an extension are in a directory named <filename>extname</filename>:
387
+
The <command>phpize</command> command is used to prepare the build
388
+
environment for a PHP extension.
389
+
In the following sample, the sources for an extension are in a directory
390
+
named <filename>extname</filename>:
342
391
</simpara>
343
392
<para>
344
393
<screen>
...
...
@@ -352,42 +401,52 @@ $ make
352
401
</screen>
353
402
</para>
354
403
<simpara>
355
-
A successful install will have created <filename>extname.so</filename> and put it
356
-
into the PHP
357
-
<link linkend="ini.extension-dir">extensions directory</link>. You'll need
358
-
to and adjust &php.ini; and add an <literal>extension=extname.so</literal>
359
-
line before you can use the extension.
404
+
A successful install will have created <filename>extname.so</filename> and
405
+
put it into the PHP
406
+
<link linkend="ini.extension-dir">extensions directory</link>.
407
+
The &php.ini; will need to be adjusted, and an
408
+
<literal>extension=extname.so</literal>
409
+
line will need to be added before the extension can be used.
360
410
</simpara>
361
411
<simpara>
362
-
If the system is missing the <literal>phpize</literal> command, and precompiled
363
-
packages (like RPM's) are used, be sure to also install the appropriate
364
-
devel version of the PHP package as they often include the
365
-
<literal>phpize</literal> command along with the appropriate header files to
366
-
build PHP and its extensions.
412
+
If the system is missing the <command>phpize</command> command, and
413
+
precompiled packages (like RPM's) are used, be sure to install also the
414
+
appropriate development version of the PHP package as they often include the
415
+
<command>phpize</command>
416
+
command along with the proper header files to build PHP and its extensions.
367
417
</simpara>
368
418
<simpara>
369
-
Execute <command>phpize --help</command> to display additional usage information.
419
+
Execute <command>phpize --help</command> to display additional usage
420
+
information.
370
421
</simpara>
371
422
</sect1>
372
423

373
424
<sect1 xml:id="install.pecl.php-config">
374
-
<title>php-config</title>
425
+
<title>
426
+
<command>php-config</command>
427
+
</title>
375
428
376
429
<para>
377
-
php-config is a simple shell script for obtaining information about the
378
-
installed PHP configuration.
430
+
<command>php-config</command>
431
+
is a simple shell script for obtaining information about the installed PHP
432
+
configuration.
379
433
</para>
380
434
381
435
<para>
382
-
When compiling extensions, if you have multiple PHP versions installed, you
383
-
may specify for which installation you'd like to build by using the
384
-
<literal>--with-php-config</literal> option during configuration, specifying
385
-
the path of the respective php-config script.
436
+
When the extensions are being compiled, if multiple PHP versions are
437
+
installed, the installation for which to build can be specified by using the
438
+
<option role="configure">--with-php-config</option>
439
+
option during configuration, setting the path of the respective
440
+
<command>php-config</command>
441
+
script.
386
442
</para>
387
443
388
444
<para>
389
-
The list of command line options provided by the php-config script can be queried
390
-
anytime by running php-config with the <option>-h</option> switch:
445
+
The list of command line options provided by the
446
+
<command>php-config</command>
447
+
script can be queried anytime by running
448
+
<command>php-config</command>
449
+
with the <option>-h</option> switch:
391
450
<screen>
392
451
<![CDATA[
393
452
Usage: /usr/local/bin/php-config [OPTION]
...
...
@@ -424,11 +483,16 @@ Options:
424
483
</row>
425
484
<row>
426
485
<entry>--includes</entry>
427
-
<entry>List of -I options with all include files</entry>
486
+
<entry>
487
+
List of <literal>-I</literal> options with all include files
488
+
</entry>
428
489
</row>
429
490
<row>
430
491
<entry>--ldflags</entry>
431
-
<entry>LD Flags which PHP was compiled with</entry>
492
+
<entry>
493
+
<literal>LD</literal>
494
+
flags which PHP was compiled with
495
+
</entry>
432
496
</row>
433
497
<row>
434
498
<entry>--libs</entry>
...
...
@@ -440,7 +504,9 @@ Options:
440
504
</row>
441
505
<row>
442
506
<entry>--include-dir</entry>
443
-
<entry>Directory prefix where header files are installed by default</entry>
507
+
<entry>
508
+
Directory prefix where header files are installed by default
509
+
</entry>
444
510
</row>
445
511
<row>
446
512
<entry>--php-binary</entry>
...
...
@@ -452,7 +518,9 @@ Options:
452
518
</row>
453
519
<row>
454
520
<entry>--configure-options</entry>
455
-
<entry>Configure options to recreate configuration of current PHP installation</entry>
521
+
<entry>
522
+
Configure options to recreate configuration of current PHP installation
523
+
</entry>
456
524
</row>
457
525
<row>
458
526
<entry>--version</entry>
...
...
@@ -471,15 +539,16 @@ Options:
471
539
<sect1 xml:id="install.pecl.static">
472
540
<title>Compiling PECL extensions statically into PHP</title>
473
541
<simpara>
474
-
You might find that you need to build a PECL extension statically into your
475
-
PHP binary. To do this, you'll need to place the extension source under
476
-
the <filename>/your/phpsrcdir/ext/</filename> directory and tell the PHP build
477
-
system to regenerate its configure script.
542
+
It may be necessary to build a PECL extension statically into the PHP binary.
543
+
To do this, the extension source will need to be placed under the
544
+
<filename>/path/to/php/src/dir/ext/</filename>
545
+
directory, and the PHP build system will be required to regenerate its
546
+
configure script.
478
547
</simpara>
479
548
<para>
480
549
<screen>
481
550
<![CDATA[
482
-
$ cd /your/phpsrcdir/ext
551
+
$ cd /path/to/php/src/dir/ext
483
552
$ pecl download extname
484
553
$ gzip -d < extname.tgz | tar -xvf -
485
554
$ mv extname-x.x.x extname
...
...
@@ -491,15 +560,16 @@ $ mv extname-x.x.x extname
491
560
</simpara>
492
561
<para>
493
562
<screen>
494
-
/your/phpsrcdir/ext/extname
563
+
/path/to/php/src/dir/ext/extname
495
564
</screen>
496
565
</para>
497
566
<simpara>
498
-
From here, force PHP to rebuild the configure script, and then build PHP as normal:
567
+
From here, PHP needs to be forced to rebuild the configure script, and then
568
+
it can be built as normal:
499
569
</simpara>
500
570
<para>
501
571
<screen>
502
-
$ cd /your/phpsrcdir
572
+
$ cd /path/to/php/src/dir
503
573
$ rm configure
504
574
$ ./buildconf --force
505
575
$ ./configure --help
...
...
@@ -510,15 +580,26 @@ $ make install
510
580
</para>
511
581
<note>
512
582
<simpara>
513
-
To run the 'buildconf' script you need autoconf 2.13 and automake 1.4+
514
-
(newer versions of autoconf may work, but are not supported).
583
+
To run the <command>buildconf</command> script, the
584
+
<command>autoconf</command>
585
+
<literal>2.68</literal>
586
+
and
587
+
<command>automake</command>
588
+
<literal>1.4+</literal>
589
+
will be needed.
590
+
Newer versions of <command>autoconf</command> may work but are not
591
+
supported.
515
592
</simpara>
516
593
</note>
517
594
<simpara>
518
-
Whether <literal>--enable-extname</literal> or <literal>--with-extname
519
-
</literal> is used depends on the extension. Typically an extension that
520
-
does not require external libraries uses <literal>--enable</literal>. To be
521
-
sure, run the following after buildconf:
595
+
Whether
596
+
<option role="configure">--enable-extname</option>
597
+
or
598
+
<option role="configure">--with-extname</option>
599
+
is used depends on the extension.
600
+
Typically, an extension that does not require external libraries uses
601
+
<option role="configure">--enable</option>.
602
+
To be sure, run the following after <command>buildconf</command>:
522
603
</simpara>
523
604
<para>
524
605
<screen>
525
606