views:

130

answers:

2

I need to increase max post size and upload size for php to use the audio module of drupal. I read this has to be set in php.ini. However I don't think I have access to that file in lunar pages. I also read it can also be set in .htaccess. However it doesn't change anything.

I tried:

php_value post_max_size "40M"
php_value upload_max_filesize "40M"

i also tried:

php_value post_max_size 40M
php_value upload_max_filesize 40M

On localhost it says restart webserver. But this is not possible on shared host. Could that be the problem?

+4  A: 

It's likely that your shared hosting provider has disabled changing those values locally - for the obvious reason that otherwise, everybody could circumvent the limits as they please, rendering them useless.

(Removed ini_set example, as @Pascal says, those limits are enforced before the script is executed.)

You would probably have to talk to your hosting provider if you want to change this.

Pekka
The size of uploads is checked / enforced before the script actually starts -- so you cannot change those from a PHP script *(and, trying your code, the values displayed by `phpinfo()` are the ones from `php.ini`, not the ones in `ini_set`)*
Pascal MARTIN
@Pascal true. What was I thinking? :) Cheers.
Pekka
No problem ^^ ``
Pascal MARTIN
Is there any other solutions?
Behrooz Karjooravary
None except speaking to your hosting provider I think.
Pekka
A: 

I found the answer at http://wiki.lunarpages.com/Increase_php.ini_Upload_Limit.

Thanks

Behrooz Karjooravary