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,7 +24,8 @@
24
24
</para>
25
25
<warning>
26
26
<simpara>
27
-
This function has been removed from some SAPIs in PHP 5.3.
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.
28
29
</simpara>
29
30
</warning>
30
31
</refsect1>
...
...
@@ -34,7 +35,7 @@
34
35
<para>
35
36
<variablelist>
36
37
<varlistentry>
37
-
<term><parameter>library</parameter></term>
38
+
<term><parameter>extension_filename</parameter></term>
38
39
<listitem>
39
40
<para>
40
41
This parameter is <emphasis>only</emphasis> the filename of the
...
...
@@ -50,8 +51,7 @@
50
51
</para>
51
52
<para>
52
53
Windows - If not explicitly set in the &php.ini;, the extension is
53
-
loaded from <filename>C:\php4\extensions\</filename> (PHP 4) or
54
-
<filename>C:\php5\</filename> (PHP 5) by default.
54
+
loaded from <filename>C:\php5\</filename> by default.
55
55
</para>
56
56
<para>
57
57
Unix - If not explicitly set in the &php.ini;, the default extension
...
...
@@ -65,7 +65,7 @@
65
65
</listitem>
66
66
<listitem>
67
67
<simpara>
68
-
whether PHP has been built with (experimental) ZTS (Zend Thread Safety)
68
+
whether PHP has been built with ZTS (Zend Thread Safety)
69
69
support or not
70
70
</simpara>
71
71
</listitem>
...
...
@@ -94,8 +94,8 @@
94
94
&reftitle.returnvalues;
95
95
<para>
96
96
&return.success; If the functionality of loading modules is not available
97
-
or has been disabled (either by setting
98
-
<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
99
99
in &php.ini;) an <constant>E_ERROR</constant> is emitted
100
100
and execution is stopped. If <function>dl</function> fails because the
101
101
specified library couldn't be loaded, in addition to &false; an
...
...
@@ -120,7 +120,7 @@ if (!extension_loaded('sqlite')) {
120
120
}
121
121
}
122
122

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

135
-
<refsect1 role="changelog">
136
-
&reftitle.changelog;
137
-
<para>
138
-
<informaltable>
139
-
<tgroup cols="2">
140
-
<thead>
141
-
<row>
142
-
<entry>&Version;</entry>
143
-
<entry>&Description;</entry>
144
-
</row>
145
-
</thead>
146
-
<tbody>
147
-
<row>
148
-
<entry>5.3.0</entry>
149
-
<entry>
150
-
<function>dl</function> is now disabled in some SAPIs due to
151
-
stability issues. The only SAPIs that
152
-
allow <function>dl</function> are CLI and Embed. Use
153
-
the <link linkend="ini.extension">Extension Loading
154
-
Directives</link> instead.
155
-
</entry>
156
-
</row>
157
-
</tbody>
158
-
</tgroup>
159
-
</informaltable>
160
-
</para>
161
-
</refsect1>
162
-

163
135
<refsect1 role="notes">
164
136
&reftitle.notes;
165
137
<note>
166
138
<para>
167
-
<function>dl</function> is <emphasis>not</emphasis> supported when
168
-
PHP is built with ZTS support. Use
169
-
the <link linkend="ini.extension">Extension Loading
170
-
Directives</link> instead.
171
-
</para>
172
-
</note>
173
-
<note>
174
-
<para>
175
139
<function>dl</function> is case sensitive on Unix platforms.
176
140
</para>
177
141
</note>
178
-
&note.sm.disabled;
179
142
</refsect1>
180
143

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

191
154
</refentry>
192
-

193
155
<!-- Keep this comment at the end of the file
194
156
Local variables:
195
157
mode: sgml
196
158