language/wrappers/php.xml
ec6e871a47fa15228aa3299f46fed826422adbc0
...
...
@@ -1,7 +1,7 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
3

4
-
<refentry xml:id="wrappers.php" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" role="noversion">
4
+
<refentry xml:id="wrappers.php" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" annotations="verify_info:false">
5
5
<refnamediv>
6
6
<refname>php://</refname>
7
7
<refpurpose>Accessing various I/O streams</refpurpose>
...
...
@@ -25,8 +25,8 @@
25
25
input or output stream of the PHP process. The stream references a
26
26
duplicate file descriptor, so if you open <filename>php://stdin</filename>
27
27
and later close it, you close only your copy of the descriptor-the actual
28
-
stream referenced by <constant>STDIN</constant> is unaffected. Note that
29
-
PHP exhibited buggy behavior in this regard until PHP 5.2.1. It is
28
+
stream referenced by <constant>STDIN</constant> is unaffected.
29
+
It is
30
30
recommended that you simply use the constants <constant>STDIN</constant>,
31
31
<constant>STDOUT</constant> and <constant>STDERR</constant> instead of
32
32
manually opening streams using these wrappers.
...
...
@@ -42,14 +42,11 @@
42
42
<title>php://input</title>
43
43
<simpara>
44
44
<filename>php://input</filename> is a read-only stream that allows you to
45
-
read raw data from the request body. In the case of POST requests, it is
46
-
preferable to use <filename>php://input</filename> instead of <varname>$HTTP_RAW_POST_DATA</varname> as it does not depend
47
-
on special &php.ini; directives. Moreover, for those cases where
48
-
<varname>$HTTP_RAW_POST_DATA</varname> is not populated by default, it is a
49
-
potentially less memory intensive alternative to activating
50
-
<literal>always_populate_raw_post_data</literal>.
51
-
<filename>php://input</filename> is not available with
52
-
<literal>enctype="multipart/form-data"</literal>.
45
+
read raw data from the request body.
46
+
<filename>php://input</filename> is not available in POST requests with
47
+
<literal>enctype="multipart/form-data"</literal> if
48
+
<link linkend="ini.enable-post-data-reading">enable_post_data_reading</link>
49
+
option is enabled.
53
50
</simpara>
54
51
</refsect2>
55
52

...
...
@@ -76,7 +73,7 @@
76
73
<simpara>
77
74
<filename>php://memory</filename> and <filename>php://temp</filename> are
78
75
read-write streams that allow temporary data to be stored in a file-like
79
-
wrapper. The only difference between the two is that
76
+
wrapper. One difference between the two is that
80
77
<filename>php://memory</filename> will always store its data in memory,
81
78
whereas <filename>php://temp</filename> will use a temporary file once the
82
79
amount of data stored hits a predefined limit (the default is 2 MB). The
...
...
@@ -89,6 +86,15 @@
89
86
the maximum amount of data to keep in memory before using a temporary
90
87
file, in bytes.
91
88
</simpara>
89
+
<caution>
90
+
<simpara>
91
+
Some PHP extensions may require a standard IO stream,
92
+
and may attempt to cast a given stream to a standard IO stream.
93
+
This cast can fail for memory streams as it requires the C
94
+
<function>fopencookie</function> function to be available.
95
+
This C function is <emphasis>not</emphasis> available on Windows.
96
+
</simpara>
97
+
</caution>
92
98
</refsect2>
93
99

94
100
<refsect2 xml:id="wrappers.php.filter">
95
101