Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By PipSqueak on
I have a problem with uplaoding, it says "Your PHP settings limit the maximum file size per upload to 4 MB." even though I have set the php.ini to a higher limit. It was originally 2mb, but i changed the php.ini to 100mb, but now it shows the limit as 4MB?
Also, it was only this particular site having this problem. My previous drupal installations - all running on the same server - did not have this limit.
Where have things gone wrong?
Comments
You may need to change
You may need to change post_max_size and upload_max_filesize to suit. Also did you restart apache after making these changes?
------------------------------
Alex Cochrane
Spoon Media
yes, thanks for reply. I did
yes, thanks for reply. I did restart apache but it still reads 4mb. other installations did not have this limit.
sorry i edited that post
sorry i edited that post whilst you were replying.
------------------------------
Alex Cochrane
Spoon Media
OK thanks, I did as you told
OK thanks, I did as you told and there is improvement - it now says 25MB.
But weird, I set both as 50MB haha. You think if I put it at 100MB it will be 50MB?
Probably. These are pretty
Probably, although I think you will find just increasing the post_max will fix your problem. These are pretty huge files to be uploading. You may want to change your timeout settings as well.
------------------------------
Alex Cochrane
Spoon Media
Thanks for the reminder.
Thanks for the reminder. Actually we need to work with on average 10mb but the extra acts as a margin of error (we're dealing with non-computer literate people).
Problem solved.
Geez, putting both at 100mb
Geez, putting both at 100mb will become 50mb. this is odd.
Anyway thanks for the help I can get on with my work.
Help?
I am having the same problem with the new install of Drupal 5.0. I have no idea where that line of code is to edit.
Better reporting of limit?
Drupal halves the value of post_max_size
$post_max = parse_size(ini_get('post_max_size')) / 2;
(file.inc)which while probably smart to decrease problems with uploads, might be nice to have a bit more clear reporting to the administrator what needs to be changed to increase this value.
Perhaps change upload.module line 152 to include the same text that is displayed if you try to set the value greater, from:
to:
I'm not sure if this is the best text to use, but it seems a bit awkward to display the help text only when the user submits a value greater than the max allowed. If this was display initially, it might be more clear to the administrator what the issue is and how to resolve it.
Thanks for tracking this
Thanks for tracking this limit down arthurf, it was starting to drive me nuts. I also agree that Drupal should say something to the effect that it is building in a margin of safety or something rather than this;
This is VERY misleading when you know for a fact you have your php.ini limits set at or above the limit you need and are still getting an error message suggesting it is your settings rather than Drupal inserting it's own hidden margin of error.
----------------
Dominic Ryan
www.iis-aid.com
I think this requires more than a change in text
This has been reported as a bug here:
http://drupal.org/node/104220
And here:
http://drupal.org/node/72545
As a comment that apparently got ignored.
It seems as though this isn't fixed in 4.7 or 5.1.
I don't think 50% makes any sense - I think it should more like 90%.
You are indeed limited to
You are indeed limited to the half of your post_max_size (php.ini in your php folder) for every upload. That's a regular php rule, nothing odd here. It's for multi-upload purposes: none of your uploads can exceed half of the total allowed size...
You should also consider to extend your timeout limit if you wanna upload big files ( > 25 Mb), as written in another comment.
regular php rule?
What do you mean? Why couldn't an upload be larger than half the total allowed size?
Thanks
FnL
why max is 1/2 max
Just a theory: perhaps max post = 1/2 max upload b/c it is an easy number that would still allow for plenty other form-post variables (and even add'l files). Upload Max itself is just a single file's cap (I think), and a single form-post can handle several file uploads.
--
http://drupaltees.com
80s themed Drupal T-Shirts
Error reporting at the upload itself is not great
There is no error when uploading a file that is too big - it just poops out and shows as not attached.
C.J.