0

I have an html page which POSTS files to a PHP backend - either using Ajax or through a hidden iframe.

Using Ajax I can upload files up to the limits set in my .htaccess (10M)

When I use IE - files above 2M are rejected with "Error 1:The uploaded file exceeds the upload_max_filesize directive in php.ini".

It's as if requests passed with

Content-Type: multipart/form-data; boundary=---------------------------7db16f8c3114c

See a different PHP.INI setting than those that are

Content-Type: application/octet-stream

This is especially troublesome since IE cannot use XHR - so a large part of my users can't upload large files.

Any idea why this is happening?

Technical details:

  • Server: Linux, Apache, PHP 5.2.17
  • PHP ini settings (set in .htaccess, and checked using phpinfo):
    • upload_max_filesize 10M
    • post_max_size 10M
    • memory_limit 24M
  • HTML Form enctype="multipart/form-data"
1
  • same here... have you found any solution yet? Commented Feb 22, 2013 at 8:18

2 Answers 2

1

Make sure that the backend doesn't use ini_set to change the upload limit again. Also make sure that the .htaccess file is in the right directory.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks - I wrote the backend, so no in_set.
0

...and make sure to change both of the php.ini files..

The one in the Apache folder, and the one in the PHP folder..

1 Comment

I have no control over php.ini, as I am on a shared host. the .htaccess overrides the php.ini settings, and works as far as I can tell by calling ini_get and by looking a phpinfo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.