jan Sun Jul 7 14:25:40 2002 EDT
Modified files:
/phpdoc/en/reference/errorfunc/functions set-error-handler.xml
/phpdoc/en/features file-upload.xml
Log:
- fix #16640
Index: phpdoc/en/reference/errorfunc/functions/set-error-handler.xml
diff -u phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.4
phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.5
--- phpdoc/en/reference/errorfunc/functions/set-error-handler.xml:1.4 Sun Jun 9
17:24:20 2002
+++ phpdoc/en/reference/errorfunc/functions/set-error-handler.xml Sun Jul 7
+14:25:40 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/errorfunc.xml, last change in rev 1.1 -->
<refentry id="function.set-error-handler">
<refnamediv>
@@ -181,6 +181,12 @@
necessary. If the error-handler function returns, script execution
will continue with the next statement after the one that caused an error.
</para>
+ <note>
+ <para>
+ If errors occur before the script is executed (e.g. on file uploads) the custom
+ error handler cannot be called since it is not registered at that time.
+ </para>
+ </note>
<para>
See also <function>error_reporting</function>,
<function>restore_error_handler</function>,
Index: phpdoc/en/features/file-upload.xml
diff -u phpdoc/en/features/file-upload.xml:1.41 phpdoc/en/features/file-upload.xml:1.42
--- phpdoc/en/features/file-upload.xml:1.41 Fri Jun 28 22:28:05 2002
+++ phpdoc/en/features/file-upload.xml Sun Jul 7 14:25:40 2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.41 $ -->
+<!-- $Revision: 1.42 $ -->
<chapter id="features.file-upload">
<title>Handling file uploads</title>
@@ -221,7 +221,66 @@
of the request if it has not been moved away or renamed.
</simpara>
</sect1>
-
+
+ <sect1 id="features.file-upload.errors">
+ <title>Error Messages Explained</title>
+ <simpara>
+ There is a lot that can go wrong during a file upload. PHP returns apropriate
+ error messages beside the usual warnings. The error message can be found in the
+ ["error"] segment of the array that is created during the file upload.
+ This is either $userfile["error"] if <link linkend="ini.register-globals">
+ register_globals</link> is turned on in &php.ini;, or
+ $HTTP_POST_FILES["userfile"]["error"] for PHP versions before 4.1.0, or at last
+ and mostly recommended $_FILES["userfile"]["error"].
+ </simpara>
+ <para>
+ <variablelist>
+ <varlistentry>
+ <term><varname>UPLOAD_ERROR_A</varname></term>
+ <listitem>
+ <para>
+ Value: 1; the uploaded file exceeds the upload_max_filesize directive
+ that is specified in &php.ini;.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>UPLOAD_ERROR_B</varname></term>
+ <listitem>
+ <para>
+ Value: 2; the uploaded file exceeds the MAX_FILE_SIZE directive
+ that was specified in the html form.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>UPLOAD_ERROR_C</varname></term>
+ <listitem>
+ <para>
+ Value: 3; the uploaded file was only partially uploaded.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>UPLOAD_ERROR_D</varname></term>
+ <listitem>
+ <para>
+ Value: 4; no file was uploaded.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><varname>UPLOAD_ERROR_E</varname></term>
+ <listitem>
+ <para>
+ Value: 5; the uploaded file has a size of 0 (read: zero) bytes.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </sect1>
+
<sect1 id="features.file-upload.common-pitfalls">
<title>Common Pitfalls</title>
<simpara>
@@ -257,8 +316,12 @@
it gets from the client. As long as this is the case, CERN httpd
will not support the file upload feature.
</simpara>
+ <simpara>
+ Due to the large amount of directory listing styles we cannot guarantee
+ that files with exotic names (like containing spaces) are handled properly.
+ </simpara>
</sect1>
-
+
<sect1 id="features.file-upload.multiple">
<title>Uploading multiple files</title>
<simpara>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php