Hi,
I tried to change settings for upload file, but i am getting this error -

Your PHP settings limit the maximum file size per upload to 4 MB.
Depending on your sever environment, these settings may be changed in the system-wide php.ini file, a php.ini file in your Drupal root directory, in your Drupal site's settings.php file, or in the .htaccess file in your Drupal root directory.

Even i made changes to php.ini, settings.php and .htaccess file
I made changes like this

in php.ini
upload_max_filesize=10M

in settings.php

ini_set('post_max_size', 100000);
ini_set('upload_max_filesize', 100000);

in .htaccess

php_value post_max_size 10M
php_value upload_max_filesize 10M

i don't know what should i do now.

Comments

Xano’s picture

I know that when making changes to httpd.conf Apache should be restarted. Perhaps it needs to be restarted when making changes to the PHP settings as well?

venkateshg’s picture

Hi Xano,
Thanks for your reply.
I restarted the apache, but there is no any change in it

Sverre’s picture

Hi Venkateshg,
It is possible that your hosting provider has limited this. Have you approached them?
Regards,
Sverre :-)
--
Sverre Sverresonn
Group Scout Leader
21st Medway Scouts, Kent, UK
http://www.21stmedway.org.uk/

--
Sverre Sverresonn
Group Scout Leader
21st Medway Scouts, Kent, UK
http://www.21stmedway.org.uk/

Medway Towns District Scouts
http://www.medwaytowns.org.uk/

venkateshg’s picture

Hi Sverre,
Thanks for your reply,
Actually the site is configured by me.
i dont have possibility for approaching the hosting provider.
Is there any other way to do this....

Regards,
- Venkatesh

Sverre’s picture

In php.ini try looking for "post_max_size":

post_max_size = 10M

Regards,
Sverre :-)
--
Sverre Sverresonn
Group Scout Leader
21st Medway Scouts, Kent, UK
http://www.21stmedway.org.uk/

--
Sverre Sverresonn
Group Scout Leader
21st Medway Scouts, Kent, UK
http://www.21stmedway.org.uk/

Medway Towns District Scouts
http://www.medwaytowns.org.uk/

leop’s picture

In the Drupal API I find that post_max_size is divided by 2, as sanity check. It says it does it only for 4.7, but when I look at the 5.7 code that is installed at my website, it still uses the divide by 2 factor:

<?php
// sanity check- a single upload should not be more than 50% the size limit of the total post
   
$post_max = _file_convert_to_mb(ini_get('post_max_size')) / 2;
?>
maulwuff’s picture

this may be good for users, but not for admins without this note. it produces unnecessary headaches. :(

lsabug’s picture

I was tinkering with my setup and found this post and yay, it worked for 5.7. Many thanks for the info!

Quint’s picture

What does PHPinfo say about the upload limit?

crusty_collins’s picture

in Home › Administer › Site configuration
File uploads?

This one burned me today.

UnicornSong’s picture

I also have this problem. I have set all 3 php.ini files on my dev machine to be
post_max_size = 100M
upload_max_filesize = 1000M

phpinfo.php on xammp shows
post_max_size 100M 100M
upload_max_filesize 1000M 1000M

but in File Uploads when i try to set the Default maximum file size per upload i receive the following message within drupal

# Your PHP settings limit the maximum file size per upload to 50 MB.
Depending on your sever environment, these settings may be changed in the system-wide php.ini file, a php.ini file in your Drupal root directory, in your Drupal site's settings.php file, or in the .htaccess file in your Drupal root directory.
# Your PHP settings limit the maximum file size per upload to 50 MB.

these values are not set in htaccess or setting.php

Im just quietly going mad here. I began on this path while trying to resolve an error when trying to upload a large (dimensions) but small (filesize) image and received this error:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 9928 bytes) in C:\xampp\htdocs\drupal-5.7\includes\image.inc on line 326

but thats a whole other issue......

UnicornSong’s picture

looks like i got caught by the drupal "divide by 2 sanity check"

Forget my last comment, now i can move on to the original problem

scottm316’s picture

I may need one. I got the following message after changing upload settings for a role under admin/settings/upload:

Your PHP settings limit the maximum file size per upload to 50 MB.

In my php.ini I have set: upload_max_filesize = 100M

Scott
http://morrisonmultimedia.ca/
Edmonton, AB

UnicornSong’s picture

http://drupal.org/node/109994#comment-747856
This is still in force for 5.x