reference/info/functions/dl.xml
a89c6d71c7b65e3de84f26230fbf72c9b8948adf
...
...
@@ -10,11 +10,11 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>dl</methodname>
13
-
<methodparam><type>string</type><parameter>library</parameter></methodparam>
13
+
<methodparam><type>string</type><parameter>extension_filename</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
Loads the PHP extension given by the parameter
17
-
<parameter>library</parameter>.
17
+
<parameter>extension_filename</parameter>.
18
18
</para>
19
19
<para>
20
20
Use <function>extension_loaded</function> to test whether a given
...
...
@@ -24,8 +24,8 @@
24
24
</para>
25
25
<warning>
26
26
<simpara>
27
-
This function was removed from most SAPIs in PHP 5.3.0, and was removed
28
-
from PHP-FPM in PHP 7.0.0.
27
+
This function is only available for the <acronym>CLI</acronym> and embed <acronym>SAPI</acronym>s,
28
+
and the <acronym>CGI</acronym> <acronym>SAPI</acronym> when run from the command line.
29
29
</simpara>
30
30
</warning>
31
31
</refsect1>
...
...
@@ -35,7 +35,7 @@
35
35
<para>
36
36
<variablelist>
37
37
<varlistentry>
38
-
<term><parameter>library</parameter></term>
38
+
<term><parameter>extension_filename</parameter></term>
39
39
<listitem>
40
40
<para>
41
41
This parameter is <emphasis>only</emphasis> the filename of the
...
...
@@ -51,8 +51,7 @@
51
51
</para>
52
52
<para>
53
53
Windows - If not explicitly set in the &php.ini;, the extension is
54
-
loaded from <filename>C:\php4\extensions\</filename> (PHP 4) or
55
-
<filename>C:\php5\</filename> (PHP 5) by default.
54
+
loaded from <filename>C:\php5\</filename> by default.
56
55
</para>
57
56
<para>
58
57
Unix - If not explicitly set in the &php.ini;, the default extension
...
...
@@ -66,7 +65,7 @@
66
65
</listitem>
67
66
<listitem>
68
67
<simpara>
69
-
whether PHP has been built with (experimental) ZTS (Zend Thread Safety)
68
+
whether PHP has been built with ZTS (Zend Thread Safety)
70
69
support or not
71
70
</simpara>
72
71
</listitem>
...
...
@@ -95,8 +94,8 @@
95
94
&reftitle.returnvalues;
96
95
<para>
97
96
&return.success; If the functionality of loading modules is not available
98
-
or has been disabled (either by setting
99
-
<link linkend="ini.enable-dl">enable_dl</link> off or by enabling &safemode;
97
+
or has been disabled (by setting
98
+
<link linkend="ini.enable-dl">enable_dl</link> off
100
99
in &php.ini;) an <constant>E_ERROR</constant> is emitted
101
100
and execution is stopped. If <function>dl</function> fails because the
102
101
specified library couldn't be loaded, in addition to &false; an
...
...
@@ -121,7 +120,7 @@ if (!extension_loaded('sqlite')) {
121
120
}
122
121
}
123
122

124
-
// Or, the PHP_SHLIB_SUFFIX constant is available as of PHP 4.3.0
123
+
// Or using PHP_SHLIB_SUFFIX constant
125
124
if (!extension_loaded('sqlite')) {
126
125
$prefix = (PHP_SHLIB_SUFFIX === 'dll') ? 'php_' : '';
127
126
dl($prefix . 'sqlite.' . PHP_SHLIB_SUFFIX);
...
...
@@ -133,62 +132,13 @@ if (!extension_loaded('sqlite')) {
133
132
</para>
134
133
</refsect1>
135
134

136
-
<refsect1 role="changelog">
137
-
&reftitle.changelog;
138
-
<para>
139
-
<informaltable>
140
-
<tgroup cols="2">
141
-
<thead>
142
-
<row>
143
-
<entry>&Version;</entry>
144
-
<entry>&Description;</entry>
145
-
</row>
146
-
</thead>
147
-
<tbody>
148
-
<row>
149
-
<entry>7.0.0</entry>
150
-
<entry>
151
-
<function>dl</function> is disabled in PHP-FPM.
152
-
</entry>
153
-
</row>
154
-
<row>
155
-
<entry>5.3.9</entry>
156
-
<entry>
157
-
<function>dl</function> is enabled in PHP-FPM, albeit discouraged.
158
-
</entry>
159
-
</row>
160
-
<row>
161
-
<entry>5.3.0</entry>
162
-
<entry>
163
-
<function>dl</function> is now disabled in some SAPIs due to
164
-
stability issues. The only SAPIs that
165
-
allow <function>dl</function> are CLI and Embed. Use
166
-
the <link linkend="ini.extension">Extension Loading
167
-
Directives</link> instead.
168
-
</entry>
169
-
</row>
170
-
</tbody>
171
-
</tgroup>
172
-
</informaltable>
173
-
</para>
174
-
</refsect1>
175
-

176
135
<refsect1 role="notes">
177
136
&reftitle.notes;
178
137
<note>
179
138
<para>
180
-
<function>dl</function> is <emphasis>not</emphasis> supported when
181
-
PHP is built with ZTS support. Use
182
-
the <link linkend="ini.extension">Extension Loading
183
-
Directives</link> instead.
184
-
</para>
185
-
</note>
186
-
<note>
187
-
<para>
188
139
<function>dl</function> is case sensitive on Unix platforms.
189
140
</para>
190
141
</note>
191
-
&note.sm.disabled;
192
142
</refsect1>
193
143

194
144
<refsect1 role="seealso">
...
...
@@ -202,7 +152,6 @@ if (!extension_loaded('sqlite')) {
202
152
</refsect1>
203
153

204
154
</refentry>
205
-

206
155
<!-- Keep this comment at the end of the file
207
156
Local variables:
208
157
mode: sgml
209
158