Re: File Uploads!
| From: | Tom Rogers | Date: | Sun, 29 Jun 2003 12:17:43 +0000 |
| Subject: | Re: File Uploads! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-153314@lists.php.net to get a copy of this message | ||
Hi,
Sunday, June 29, 2003, 9:49:43 PM, you wrote:
CT> Hi,
CT> This is the error I get in the log file:
CT> [error] PHP Warning: POST Content-Length of 11184886 bytes exceeds the
CT> limit of 8388608 bytes in Unknown on line 0
CT> This is absolutely correct. The problem is
CT> this error does not reach my PHP script and I
CT> have no idea how can I tell my user he posted
CT> a file which exceds the size.
CT> The $_FILES is empty, same for $HTTP_...
CT> Any idea is appreciated.
CT> Cheers,
CT> Catalin
check out
$_FILES['userfile']['error'] it should give some clues
UPLOAD_ERR_OK
Value: 0; There is no error, the file uploaded with success.
UPLOAD_ERR_INI_SIZE
Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini.
UPLOAD_ERR_FORM_SIZE
Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form.
UPLOAD_ERR_PARTIAL
Value: 3; The uploaded file was only partially uploaded.
UPLOAD_ERR_NO_FILE
Value: 4; No file was uploaded
--
regards,
Tom