Reply to Re: Why I need to set the memory limit for large file upload?

Your name:

Reply:


Posted by Rik Wasmus on 11/30/07 19:34

On Fri, 30 Nov 2007 19:44:20 +0100, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

> howa wrote:
>> On 11月30日, 上午9時19分, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>> howa wrote:
>>>> Suppose the file is stored in "upload_tmp_dir ", so why I need to
>>>> increase the memory limit?
>>>> If I want to upload 100 MB, how large should I set?
>>>> Thanks.
>>> You shouldn't have to increase the memory limit, but you'll probably
>>> have to increase file upload size (in your webserver or html).
>>>
>>
>> In the doc:
>> http://us3.php.net/manual/en/features.file-upload.common-pitfalls.php
>>
>> it said: if a memory limit is enabled, a larger memory_limit may be
>> needed. Make sure you set memory_limit large enough.
>>
>> this is quite confusing, as it doesn't said how much you need to set
>> the memory limit
>>
>> Thanks anyway.
>> howa
>>
>
> Quite frankly, I don't know. The file itself isn't posted; it comes in
> a separate request. And AFAIK, the server handles the upload into the
> temporary directory. Even if it doesn't, I wouldn't expect PHP to read
> the entire file in before saving it.

Indeed. The mentioned 'raw post data' is also not populated with HTTP
file-uploads:
<http://nl2.php.net/manual/en/ini.core.php#ini.always-populate-raw-post-data>
"Always populate the $HTTP_RAW_POST_DATA containing the raw POST data.
Otherwise, the variable is populated only with unrecognized MIME type of
the data. However, the preferred method for accessing the raw POST data is
php://input. $HTTP_RAW_POST_DATA is not available with
enctype="multipart/form-data".
Nor is php://input or STDIN:
<http://nl2.php.net/manual/en/wrappers.php.php>
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация