I cannot find where you can change the maximum file size when uploading bulletins. Can someone point me there? thanks

Comments

drupalninja99’s picture

You're php ini settings enforce max upload size.

clcheatw’s picture

I am not seeing this in my php.ini. What do I need to add to this file to change the max upload size?

drupalninja99’s picture

upload_max_filesize I believe

clcheatw’s picture

I did not have a php.ini so I created one with the following text:

[PHP]
upload_max_filesize = 10M

and put it in the root directory of the drupal site and it still will not allow a file larger than 2 megs.

drupalninja99’s picture

You can do ini_set('upload_max_filesize', '10'); in your settings.php and it should override the php.ini setting. That is what most ppl do when they don't have access to php.ini, I think there's also an .htaccess way of doing it.

clcheatw’s picture

I added that line to my settings.php in the /sites/default folder and I am still unable to upload a bulletin larger than 2 mb

drupalninja99’s picture

Status: Active » Fixed

So method 1 is to change these 2 settings in php.ini or in settings.php

upload_max_filesize = 10M
post_max_size = 20M

In settings.php you would use the ini_set() function. This doesn't always work however (php.ini method does). And so there is a second method and I know this works. You would add this to your .htaccess file:

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
...
php_value upload_max_filesize 10M
php_value post_max_size 20M
...
</IfModule>

Now I believe the "IfModule mod_php5.c" tag in .htaccess already exists so you are just appending this. I've done this before and it should work.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.