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,20 +62,20 @@
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>
...
...
@@ -85,14 +93,15 @@
85
93
<acronym>SVN</acronym>
86
94
</simpara>
87
95
<simpara>
88
-
Some PECL extensions also reside in <acronym>SVN</acronym>. A web-based view may
89
-
be seen at <link xlink:href="&url.php.svn;pecl/">&url.php.svn;pecl/</link>.
90
-
To download straight from <acronym>SVN</acronym>, the following
91
-
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:
92
101
</simpara>
93
102
<para>
94
103
<screen>
95
-
$ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
104
+
$ svn checkout https://svn.php.net/repository/pecl/extname/trunk extname
96
105
</screen>
97
106
</para>
98
107
</listitem>
...
...
@@ -101,8 +110,8 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
101
110
Windows downloads
102
111
</simpara>
103
112
<simpara>
104
-
The PHP project compiles and offers Windows DLLs for most
105
-
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.
106
115
</simpara>
107
116
</listitem>
108
117
</itemizedlist>
...
...
@@ -111,45 +120,54 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
111
120
<sect1 xml:id="install.pecl.windows">
112
121
<title>Installing a PHP extension on Windows</title>
113
122
<para>
114
-
On Windows, you have two ways to load a PHP extension: either compile it into PHP, or
115
-
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.
116
126
</para>
117
127
<para>
118
-
To load an extension, you need to have it available as a ".dll" file on your system.
119
-
All the extensions are automatically and periodically compiled by the PHP Group
120
-
(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).
121
133
</para>
122
134
<para>
123
-
To compile an extension into PHP, please refer to <link linkend="install.windows.building">
124
-
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.
125
138
</para>
126
139
<para>
127
-
To compile a standalone extension (aka a DLL file), please refer to <link linkend="install.windows.building">
128
-
building from source</link> documentation. If the DLL file is available neither with your
129
-
PHP distribution nor in PECL, you may have to compile it before you can start using the
130
-
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.
131
145
</para>
132
146
<sect2 xml:id="install.pecl.windows.find">
133
147
<title>Where to find an extension?</title>
134
148
<para>
135
-
PHP extensions are usually called "php_*.dll" (where the star represents the name of
136
-
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.
137
153
</para>
138
154
<para>
139
-
PHP ships with the extensions most useful to the majority of developers. They are
140
-
called "core" extensions.
155
+
PHP ships with the extensions most useful to the majority of developers.
156
+
They are called <emphasis>bundled</emphasis> extensions.
141
157
</para>
142
158
<para>
143
-
However, if you need functionality not provided by any core extension, you may still be
144
-
able to find one in <link xlink:href="&url.pecl;">PECL</link>. The PHP Extension Community Library (PECL) is a repository for
145
-
PHP Extensions, providing a directory of all known extensions and hosting facilities for
146
-
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.
147
164
</para>
148
165
<para>
149
-
If you have developed an extension for your own uses, you might want to think about hosting
150
-
it on PECL so that others with the same needs can benefit from your time. A nice side effect
151
-
is that you give them a good chance to give you feedback, (hopefully) thanks, bug reports
152
-
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
153
171
<link xlink:href="&url.pecl.submit;">PECL submit</link>.
154
172
</para>
155
173
</sect2>
...
...
@@ -157,7 +175,9 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
157
175
<sect2 xml:id="install.pecl.windows.which">
158
176
<title>Which extension to download?</title>
159
177
<para>
160
-
<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>
161
181
<itemizedlist>
162
182
<listitem>
163
183
<simpara>
...
...
@@ -187,13 +207,17 @@ $ svn checkout http://svn.php.net/repository/pecl/extname/trunk extname
187
207
</itemizedlist>
188
208
</para>
189
209
<para>
190
-
You should keep in mind that your extension settings should match all the
191
-
settings of the PHP executable you are using. The following PHP script will
192
-
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:
193
214
</para>
194
215
<para>
195
216
<example>
196
-
<title><function>phpinfo</function> call</title>
217
+
<title>
218
+
<function>phpinfo</function>
219
+
call
220
+
</title>
197
221
<programlisting role="php">
198
222
<![CDATA[
199
223
<?php
...
...
@@ -207,7 +231,7 @@ phpinfo();
207
231
Or from the command line, run:
208
232
<screen>
209
233
<![CDATA[
210
-
drive:\\path\to\php\executable\php.exe -i
234
+
drive:\path\to\php\executable\php.exe -i
211
235
]]>
212
236
</screen>
213
237
</para>
...
...
@@ -216,74 +240,84 @@ drive:\\path\to\php\executable\php.exe -i
216
240
<sect2 xml:id="install.pecl.windows.loading">
217
241
<title>Loading an extension</title>
218
242
<para>
219
-
The most common way to load a PHP extension is to include it in your <filename>php.ini</filename>
220
-
configuration file. Please note that many extensions are already present in your
221
-
<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.
222
247
</para>
223
248
<para>
224
-
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.
225
254
</para>
226
-
<screen>
255
+
<screen>
227
256
<![CDATA[
228
257
;extension=php_extname.dll
229
258
]]>
230
-
</screen>
231
-
<screen>
259
+
</screen>
260
+
<screen>
232
261
<![CDATA[
233
262
extension=php_extname.dll
234
263
]]>
235
-
</screen>
236
-
<screen>
264
+
</screen>
265
+
<screen>
237
266
<![CDATA[
238
-
; On PHP version 7.2 and up, prefer :
267
+
; As of PHP 7.2.0, prefer:
239
268
extension=extname
240
269
zend_extension=another_extension
241
270
]]>
242
-
</screen>
271
+
</screen>
243
272
<para>
244
-
However, some web servers are confusing because they do not use the <filename>php.ini</filename> located alongside
245
-
your PHP executable. To find out where your actual <filename>php.ini</filename> resides, look
246
-
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>:
247
277
</para>
248
-
<screen>
278
+
<screen>
249
279
<![CDATA[
250
280
Configuration File (php.ini) Path C:\WINDOWS
251
281
]]>
252
-
</screen>
253
-
<screen>
282
+
</screen>
283
+
<screen>
254
284
<![CDATA[
255
-
Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
285
+
Loaded Configuration File C:\Program Files\PHP\8.2\php.ini
256
286
]]>
257
-
</screen>
287
+
</screen>
258
288
<para>
259
-
After activating an extension, save <filename>php.ini</filename>, restart the web server and check
260
-
<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.
261
292
</para>
262
293
</sect2>
263
294

264
295
<sect2 xml:id="install.pecl.windows.problemsolving">
265
296
<title>Resolving problems</title>
266
297
<para>
267
-
If the extension does not appear in <function>phpinfo</function>, you should check your logs to
268
-
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.
269
300
</para>
270
301
<para>
271
-
If you are using PHP from the command line (CLI), the extension loading error can be read
272
-
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.
273
304
</para>
274
305
<para>
275
-
If you are using PHP with a web server, the location and format of the logs vary depending on
276
-
your software. Please read your web server documentation to locate the logs, as it does not
277
-
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.
278
310
</para>
279
311
<para>
280
-
Common problems are the location of the DLL, the value of the "<link linkend="ini.extension-dir">
281
-
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.
282
315
</para>
283
316
<para>
284
-
If the problem lies in a compile-time setting mismatch, you probably didn't download the right DLL.
285
-
Try downloading again the extension with the right settings. Again, <function>phpinfo</function>
286
-
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.
287
321
</para>
288
322
</sect2>
289
323

...
...
@@ -292,8 +326,10 @@ Loaded Configuration File C:\Program Files\PHP\5.2\php.ini
292
326
<sect1 xml:id="install.pecl.pear">
293
327
<title>Compiling shared PECL extensions with the pecl command</title>
294
328
<simpara>
295
-
PECL makes it easy to create shared PHP extensions. Using the
296
-
<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:
297
333
</simpara>
298
334
<para>
299
335
<screen>
...
...
@@ -302,16 +338,19 @@ $ pecl install extname
302
338
</para>
303
339
<simpara>
304
340
This will download the source for <emphasis>extname</emphasis>,
305
-
compile, and install <filename>extname.so</filename> into your <link
306
-
linkend="ini.extension-dir">extension_dir</link>.
307
-
<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;.
308
345
</simpara>
309
346
<simpara>
310
-
By default, the <literal>pecl</literal> command will not install
311
-
packages that are marked with the <literal>alpha</literal> or
312
-
<literal>beta</literal> state. If no <literal>stable</literal> packages
313
-
are available, you may install a <literal>beta</literal> package using the
314
-
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:
315
354
</simpara>
316
355
<para>
317
356
<screen>
...
...
@@ -319,7 +358,7 @@ $ pecl install extname-beta
319
358
</screen>
320
359
</para>
321
360
<para>
322
-
You may also install a specific version using this variant:
361
+
A specific version may also be installed using this variant:
323
362
</para>
324
363
<para>
325
364
<screen>
...
...
@@ -337,17 +376,18 @@ $ pecl install extname-0.1
337
376
<sect1 xml:id="install.pecl.phpize">
338
377
<title>Compiling shared PECL extensions with phpize</title>
339
378
<simpara>
340
-
Sometimes, using the <literal>pecl</literal> installer is not an option.
341
-
This could be because you're behind a firewall, or it could be because the
342
-
extension you want to install is not available as a PECL compatible
343
-
package, such as unreleased extensions from git. If you need to build such
344
-
an extension, you can use the lower-level build tools to perform the build
345
-
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.
346
385
</simpara>
347
386
<simpara>
348
-
The <literal>phpize</literal> command is used to prepare the build
349
-
environment for a PHP extension. In the following sample, the sources for
350
-
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>:
351
391
</simpara>
352
392
<para>
353
393
<screen>
...
...
@@ -361,42 +401,52 @@ $ make
361
401
</screen>
362
402
</para>
363
403
<simpara>
364
-
A successful install will have created <filename>extname.so</filename> and put it
365
-
into the PHP
366
-
<link linkend="ini.extension-dir">extensions directory</link>. You'll need
367
-
to and adjust &php.ini; and add an <literal>extension=extname.so</literal>
368
-
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.
369
410
</simpara>
370
411
<simpara>
371
-
If the system is missing the <literal>phpize</literal> command, and precompiled
372
-
packages (like RPM's) are used, be sure to also install the appropriate
373
-
devel version of the PHP package as they often include the
374
-
<literal>phpize</literal> command along with the appropriate header files to
375
-
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.
376
417
</simpara>
377
418
<simpara>
378
-
Execute <command>phpize --help</command> to display additional usage information.
419
+
Execute <command>phpize --help</command> to display additional usage
420
+
information.
379
421
</simpara>
380
422
</sect1>
381
423

382
424
<sect1 xml:id="install.pecl.php-config">
383
-
<title>php-config</title>
425
+
<title>
426
+
<command>php-config</command>
427
+
</title>
384
428
385
429
<para>
386
-
php-config is a simple shell script for obtaining information about the
387
-
installed PHP configuration.
430
+
<command>php-config</command>
431
+
is a simple shell script for obtaining information about the installed PHP
432
+
configuration.
388
433
</para>
389
434
390
435
<para>
391
-
When compiling extensions, if you have multiple PHP versions installed, you
392
-
may specify for which installation you'd like to build by using the
393
-
<literal>--with-php-config</literal> option during configuration, specifying
394
-
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.
395
442
</para>
396
443
397
444
<para>
398
-
The list of command line options provided by the php-config script can be queried
399
-
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:
400
450
<screen>
401
451
<![CDATA[
402
452
Usage: /usr/local/bin/php-config [OPTION]
...
...
@@ -433,11 +483,16 @@ Options:
433
483
</row>
434
484
<row>
435
485
<entry>--includes</entry>
436
-
<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>
437
489
</row>
438
490
<row>
439
491
<entry>--ldflags</entry>
440
-
<entry>LD Flags which PHP was compiled with</entry>
492
+
<entry>
493
+
<literal>LD</literal>
494
+
flags which PHP was compiled with
495
+
</entry>
441
496
</row>
442
497
<row>
443
498
<entry>--libs</entry>
...
...
@@ -449,7 +504,9 @@ Options:
449
504
</row>
450
505
<row>
451
506
<entry>--include-dir</entry>
452
-
<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>
453
510
</row>
454
511
<row>
455
512
<entry>--php-binary</entry>
...
...
@@ -461,7 +518,9 @@ Options:
461
518
</row>
462
519
<row>
463
520
<entry>--configure-options</entry>
464
-
<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>
465
524
</row>
466
525
<row>
467
526
<entry>--version</entry>
...
...
@@ -480,15 +539,16 @@ Options:
480
539
<sect1 xml:id="install.pecl.static">
481
540
<title>Compiling PECL extensions statically into PHP</title>
482
541
<simpara>
483
-
You might find that you need to build a PECL extension statically into your
484
-
PHP binary. To do this, you'll need to place the extension source under
485
-
the <filename>/your/phpsrcdir/ext/</filename> directory and tell the PHP build
486
-
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.
487
547
</simpara>
488
548
<para>
489
549
<screen>
490
550
<![CDATA[
491
-
$ cd /your/phpsrcdir/ext
551
+
$ cd /path/to/php/src/dir/ext
492
552
$ pecl download extname
493
553
$ gzip -d < extname.tgz | tar -xvf -
494
554
$ mv extname-x.x.x extname
...
...
@@ -500,15 +560,16 @@ $ mv extname-x.x.x extname
500
560
</simpara>
501
561
<para>
502
562
<screen>
503
-
/your/phpsrcdir/ext/extname
563
+
/path/to/php/src/dir/ext/extname
504
564
</screen>
505
565
</para>
506
566
<simpara>
507
-
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:
508
569
</simpara>
509
570
<para>
510
571
<screen>
511
-
$ cd /your/phpsrcdir
572
+
$ cd /path/to/php/src/dir
512
573
$ rm configure
513
574
$ ./buildconf --force
514
575
$ ./configure --help
...
...
@@ -519,15 +580,26 @@ $ make install
519
580
</para>
520
581
<note>
521
582
<simpara>
522
-
To run the 'buildconf' script you need autoconf 2.13 and automake 1.4+
523
-
(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.
524
592
</simpara>
525
593
</note>
526
594
<simpara>
527
-
Whether <literal>--enable-extname</literal> or <literal>--with-extname
528
-
</literal> is used depends on the extension. Typically an extension that
529
-
does not require external libraries uses <literal>--enable</literal>. To be
530
-
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>:
531
603
</simpara>
532
604
<para>
533
605
<screen>
534
606