Drupal - Upload File Size in Blacknight

in

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..

Stranger
Stranger's picture
Where to insert the line?

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!

Joined: 08/01/2009
User offline. Last seen 3 weeks 1 day ago.
I don't think it really

I don't think it really matters where the lines go, but just mak sure that they don't already exist! You could put them beside other similar php_ values if there are any...

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Pride on FacebookPride on TwitterPride on TwitterPride on Twitter

Join Our Newsletter

* indicates required

Irish Internet Association

finalist.png
phone-number.png