Up the PHP file upload limit from 2MB

sudofix - February 3, 2008 - 08:11

I am having trouble understanding how and where to put the code to allow me to upload files that are bigger than 2MB to my Drupal website.

I changed the maximum user upload space to 100MB and each file to 5MB and tried, and when I do, it just hangs.

Someone told me that I need to put some code in to the .htaccess or some PHP file somewhere to allow the PHP to allow bigger than 2MB files, and more than 2MB collectively to be added in the uploads.

Can anyone give me a bit more detail as to where this goes?

If your host allows it, you

mickh - February 3, 2008 - 09:19

If your host allows it, you can probably change this in either .htaccess or php.ini with something like this:

upload_max_filesize = 5M (php.ini)

php_flag upload_max_filesize = 5M (.htaccess)

Where is the php.ini located

sudofix - February 3, 2008 - 10:26

Where is the php.ini located on my server? Also, about what line would I add this to the .htaccess file? Can I just drop it in after the last line?

view a phpinfo file to see

dman - February 3, 2008 - 10:45

view a phpinfo file to see where php.ini is. It can be in a number of places depending on how you installed PHP in the first case. (see the troubleshooting guide or search)

If it's not your server and you are on a shared host, raise a ticket with your sysadmin, as you probably don't have rights to do something as potentiallly painful to a server as make it traffic 100MB files. The default limits were there for a reason.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

I am on a shared host, and

sudofix - February 4, 2008 - 06:05

I am on a shared host, and so now that makes sense when you put it that way.

I don't really want to make 100MB files, I was just wondering how to change it, so I can up it to around 5MB total. That's all.

 
 

Drupal is a registered trademark of Dries Buytaert.