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 eatstickyrice on
I've gone into the "structure", then "content types", then "manage fields", then "edit fields" to adjust the "Maximum upload size" for an upload. Though I have tried entering 50 MB, 1024 MB etc as options and saved the changes, I continue to be limited to the 8 MB upload size that drupal 7 defaults to. Am I doing this correctly? It may be a bug??? What do I need to do differently to make this work/verify if it is indeed a bug?
Rick
Comments
I'm guessing that your host's
I'm guessing that your host's max allowed upload size is 8Mb.
What's new and changing in PHP 8
php.ini file
You can check the php.ini file for setting the file Upload Size
You need to change the following line:
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
You could have searched the web for the solution.The basics are easily available by googling.
I don't understand the logic
I don't understand the logic behind posting a solution and then berating the person for not finding it elsewhere. I think we're all pretty familiar with how to use Google by this point but sometimes the solution can still elude you. It was my understanding these forums on Drupal.org are for helping one another. This is no need for passive aggressive elitism here.
Jay Darnell - CivicActions
Web Designer / Developer / Illustrator
max file size
Change upload size http://drupal.org/node/97193
I've got the same issue. My
I've got the same issue.
My php.ini allows me up to 32, but Drupal limits it to 8. I tried to increase the maximum upload on either FILE or IMAGE fields, but it does not allow to upload more than 8MB.
I thought that logical place for the setting to be in "Admin/Config/Media/File System", but none of those setting is in there :(.
Got the same problem
someone solutions?
The solutions are found on
The solutions are found on the page linked 2 posts before your's.
For any other novices having issues with this...
I tried the solutions on the page linked above - which are very well written btw - with the .htaccess file, but they did not work. Out of desperation, I contacted my hosting support at GreenGeeks. Mine had to be changed within the C-Panel (php selector options) for my ISP. When I increased those, the files uploaded without issue.
Useless
Please remove useless discussions like this with no solution so they stop showing in my google results above the real solution.
Useless?
There were some solid suggestions made in this discussion. Just because this discussion didn't fix your issue doesn't make it useless to others.
Jay Darnell - CivicActions
Web Designer / Developer / Illustrator
Solution That Works, for Drupal 7
There are many replies in this thread, but none of them really address the answer for Drupal 7. I just figured this out.
In php.ini: It's not enough just to set upload_max_filesize to a higher number, you also have to set post_max_size to a higher number. (Since this controls the maximum size of the entire post.)
Hope that helps someone else! I've been all over the interwebs looking for the answer, and this thread is the number one search result on Google. (None of the solutions below work if post_max_size is not as high or higher than upload_max_filesize.)
It helped but still confused
Thanks so much for the help! I've changed the
max_file_uploads=100 from 20
and
upload_max_filesize=20M - from 2M
and it still isn't working.
I've closed out, cleared the cache, logged out of computer. I'm just trying to upload a new theme that is 5MB.
You could always use FTP to
You could always use FTP to put the theme up. The reason it probably wasnt working was becasue you had your like like this - upload_max_filesizee=20M when it needs to me upload_max_filesize = 20M. Hope this helps. Rob.
Please Help its urgent
I apply all above method but it still give me this message. The file DSC.JPG could not be saved, because it exceeds 2 MB, the maximum allowed size for uploads. I work on a project plzzzzz help me
Have you dropped the php.ini
Have you dropped the php.ini file in your root directory? You could try and add these lines to your htaccess file in your root directory.
php_value upload_max_filesize 10M
php_value post_max_size 10M
Rob
htaccess addition worked for me
I added the two lines of code above into the htaccess file and although the indication under the upload icon has changed, the file still cannot be uploaded.
P.S. I need much more bigger files to be uploaded (160 MB)
Newer versions of PHP
I ran into this same problem with Drupal 8 and the solution was different for my version of PHP. For newer versions of PHP, editing the php.ini may not work (I'm using PHP7).
These steps worked for me:
1. Look at the output of phpinfo(), towards the top there is a section called 'Scan this dir for additional .ini'. PHP will automatically look in this folder and use all the files in it with a .ini extension.
2. Add a .ini file with any name, I used site-name.ini
3. Add the new rules (in my case) ..
4. Restart the webserver and recheck phpinfo() to see if your changes took.
Dear All, I found the
Dear All, I found the solution and it is working
click on below url and increase 2mb to 30mb, thats all !
/admin/config/media/imce
How to fix “the uploaded file exceeds the upload_max_filesize"
Usually in a shared hosting - and unavailable php.ini - there is still a way to increase the maximum file upload from cpanel:
How to fix “the uploaded file exceeds the upload_max_filesize directive in php.ini”
Figured it out
Set these 2 values for 25M limit. Change as needed.
post_max_size = 25M
upload_max_filesize = 25M
After saving, check phpinfo page inside of drupal.
drupaldomain.com/admin/reports/status/php
or
Reports / Status Report / PHP Version - More Information
5 Lines down (may be different based on your environment), you'll see a section that tells you where your PHP INI file is. Helpful to make sure that you're editing the correct file.
next, search the page for the values you edited above:
post_max_size
it'll report what the configured number is.
If it's still 8M after changing the correct file, restarting apache2 and then reloading this page showed me the updated 25M limit.
WinSCP
Don't bother with the .ini file at all, install the WinSCP program and upload the file you want with SSh