Audio Upload Limit 4MB - No Php.ini Access

dark_globe - July 12, 2007 - 14:25

Hey Folks.

I recently installed the Audio module, and I am told now that my upload limit is 4mb.

I understand how to edit the PHP.ini file in order to increase the upload limit, but (due to sod's law) I don't have access to it.

Now, I know there is a way I can edit my .htaccess file in order to increase the upload limit, but I don't know how to do this.

Could somebody explain to me how to write a 'php_value directive' in my .htaccess file, please?
I'm not a coder... that's why I use drupal rather than write my own html sites!

Any help would be greatly appreciated.

Regards,
-Dark

If your admin has set that

dman - July 12, 2007 - 15:01

If your admin has set that limit for PHP.
And has no reason to let you modify that file.
Then there is no way you should be allowed to change that yourself with the permissions your web scripts will be running under.
It's an admin-level restriction.
Intended to maintain a working server. File uploads can tie up a bit of processing space while they are in the process of coming the wrong way up the pipe.

Ask them nicely.

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

My host also does not allow

DVkid - July 12, 2007 - 16:40

My host also does not allow access to the PHP.ini file, but these instructions from them worked:
http://wiki.dreamhost.com/PHP.ini#Procedure_for_allowing_php.ini_configu...

Depending on the server

kl - July 12, 2007 - 16:43

Depending on the server setup you could try changing .htaccess by adding this:

php_value upload_max_filesize 16M

I had similar problems, but was able to create a custom php.ini. Besides upload_max_filesize some other parameters can be the cause of upload problems, for example memory_limit.

Just adding that this will

kl - July 12, 2007 - 16:46

Just adding that this will not work on php 5.x.

Are sure you can't create your own php.ini, inside your own directory? It worked for me, on a shared server.

The other one needed is

cog.rusty - July 12, 2007 - 16:56

The other one needed is "post_max_size" and it must be twice the size. For downloading 16M files:

php_value upload_max_filesize 16M
php_value post_max_size 32M

It works on some servers, it doesn't on others.

I added the php.ini

bongo_john_uk - May 13, 2008 - 10:15

I added the php.ini below

php_value upload_max_filesize 16M
php_value post_max_size 32M

and it REDUCED my limit even further from 4MB to 2MB!!!

Why?

That was for Apache's

cog.rusty - May 13, 2008 - 10:51

That was for Apache's .htaccess file. For php.ini use:

upload_max_filesize = 16M
post_max_size = 32M
memory_limit = (something higher, like 48M)

Also, if you are using Drupal 6 (or the latest 5.x-dev=>future 5.8), post_max_size doesn't need to be double size any more. It can be just 17M (to fit the text of the post).

Thanks that worked!!

bongo_john_uk - May 13, 2008 - 11:31

Thanks that worked!!

 
 

Drupal is a registered trademark of Dries Buytaert.