> Hello all. I've spent the past month or two implementing a file upload
> utility for the web based on PHP's http upload method. It works fine for
> smaller files, and it's been working fine for files I've tried up to and
> including 400 megs at a time. The problem I'm having is that we want to
> roll this out on a center-wide scale, but that would most likely mean
files
> up to 1Gig being uploaded at a time. Is this possible through the http
> upload process. I've been unsuccessful thus far to upload a file this
large
> for some reason. Upon checking the Apache error_log, I found the following
> message:
>
> FATAL: erealloc(): Unable to allocate 112568001 bytes
> [error] PHP Warning: File Upload Error - No Mime boundary found after
start
> of file header in unknown line 0

Woof!

Okay, I can't even imagine somebody sitting through a 1Gig upload, but let's
assume that it really is reasonable for your application.

If you are conking out at ~400 M, I'm going to make a SWAG that maybe the
file upload procedure basically tries to suck it all in through RAM and
isn't paging it to disk and dumping RAM as it goes.  You go past 256 okay,
cuz you got swap space (standard swap of 1:1 for real RAM).

So, as a test, make your swap partition + RAM = 800M and see if you get
around 700M before it conks out.

You may also want to read the PHP source code involving the file upload
functions and see if there's anything you can puzzle out about them and how
they work.

You may just need to add some code to page the upload to disk as it comes in
and free up the RAM that's the beginning of the "file" for usage.

[I say that so blithely not being the one that has to do the coding, don't I
:-)]

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to