I have done large file uploads in PHP.  Make sure you have the following
set in php.ini:

upload_max_filesize = <some large size followed by M for megabyte or G
for gigabyte>
file_uploads = on
post_max_size = <some large size>

Also, you can set these values through the set_ini function in PHP so
that it can be per script instead of effective for every script which
can allow for a more granular level of control for security reasons, etc.

I have never used the form input value, nor should you have to change
the memory_limit very much since the file itself is not loaded into
memory, just information regarding the file.

Andrew

Thomas Dowling wrote:
I have always depended on the kindness of strange PHP gurus.

I am trying to rewrite a perpetually buggy system for uploading large
PDF files (up to multiple tens of megabytes) via a web form.  File
uploads are very simple in PHP, but there's a default maximum file size
of 2MB.  Following various online hints I've found, I've gone into
php.ini and goosed up the memory_limit, post_max_size, and
upload_max_size (and restarted Apache), and added an appropriate hidden
form input named MAX_FILE_SIZE.  The 2MB limit is still in place.

Is there something I overlooked?  Or, any other suggestions for how to
take in a very large file?

[My current Perl version has a history of getting incomplete files in a
non-negligible percentage of uploads.  Weirdness ensues: whenever this
happens, the file reliably cuts off at the same point, but the cutoff is
not a fixed number of bytes, nor is it related to the size of the file.]


--
Thomas Dowling
[EMAIL PROTECTED]

Reply via email to