tags:

views:

34

answers:

1

I have a HTML form with fields such as name, address, notes, etc. I also have a field to upload a PDF. The uploaded PDF get's stored on the file system.

How can I accomplish this if possibly the PDF files are larger than 2 MBs? Also, for some reason, the uploading of the PDF (< 2 MBs) works fine in Chrome, but not in IE. In IE, the upload doesn't even begin, but in Chrome, it completes fine.

Form header looks like:

method='post' ENCTYPE='multipart/formdata'

edit: the ini setting didn't help

The HTML

<input type='text' name='user' />
<input type='file' name='userfile' />
+2  A: 

Try adding this to the top of your script:

ini_set('upload_max_filesize', '5M');

If that doesn't work, you can try changing that setting in php.ini

If none of this is applicable to your problem, include more of your code.

Also, change:

multipart/formdata

to:

multipart/form-data

If the problem persists, inspect the $_FILES array (print_r($_FILES))

webbiedave
added more code.
Sev
What happened when you tried to modify upload_max_filesize? I also added to my answer.
webbiedave
Nothing changed.
Sev
looks like form-data was the issue. thank you!
Sev
You're welcome.
webbiedave
Don't forget the webserver's own POST limits (ie: Apache's 'LimitRequestBody'). PHP may have been set wide open for upload limits, but Apache/IIS/whatever could still be killing the transfer.
Marc B