Kasheftin
Kasheftin

Reputation: 9503

Problem with MAX_FILE_SIZE in PHP

I have a flex-based image upload form, and I've lost its source code. Now there appeared a problem with uploading big images (about 10MB), but with the same images an old html-based form works correctly. In my php-file there's

ini_set("post_max_size","64M");
ini_set("upload_max_filesize","64M");

Flex-based form returns file[error] = 2, that's MAX_FILE_SIZE error. It seems somewhere in flex there's an auto-generated field MAX_FILE_SIZE that it sends to server at the time it sends a file. I can't change this value in flex, so that's my question - is there a way to rewrite MAX_FILE_SIZE variable from php before php processes MAX_FILE_SIZE variable and generates error?

Upvotes: 0

Views: 1401

Answers (1)

malko
malko

Reputation: 2382

You can't change that values using ini_set that's probably the problem in the first place. They can be set per directory so you can try to change their value in your .htaccess file

php_value    upload_max_filesize    64M
php_value    post_max_size    64M

Upvotes: 2

Related Questions