Q: How can I increase the max upload file size on a Blacknight Unix hosting plan, drupal says that it's currently just 2Mb?
A: Add a little php.ini file to your drupal root and add some lines to the root .htaccess file as follows:.
I am currently doing some web development for one of our Cork clients, the website in question hosts some audio files - the client can login and upload new files (via CCK file field). Some of the files are quite big, and when trying to increase the max allowed file size in the file field settings, I noticed that the max allowed upload size was capped by PHP at 2Mb. The site is hosted on a Blacknight Unix hosting plan.
So is there a way of increasing this PHP limit?
Well, it seems that there is, depending in your hosting plan - http://drupal.org/node/97193
I was worried that the solution would not work on blacknight hosting, but it works just fine!
In summary to increase the limit to 10Mb, create a php.ini file in your drupal root directory with the following contents:
upload_max_filesize = 10M
post_max_size = 20M
then edit the .htaccess file in your drupal root directory and insert the following lines:
php_value upload_max_filesize 10M
php_value post_max_size 20M
And that should do it, drupal should now report that the max upload file size is 10Mb..
Hi,
you stated that to increase the file size, we need to insert the
php_value upload_max_filesize 10M
php_value post_max_size 20M
in the .htaccess file.
My question is, where about in the .htaccess should i insert the above line? at the very top or somewhere else? please reply to crusader_123@hotmail.com
thanks!