Page 1 of 1

Does something in the php.ini have to be enabled for...

Posted: Fri Oct 28, 2005 10:19 am
by dallasx
Does something have to be uncommented for the file operations such as uploading files in the php.ini?

Posted: Fri Oct 28, 2005 10:22 am
by Chris Corbyn
file_uploads = On
upload_max_size = 10M

It should already be defaulted to "On" with a 2MB limit.

Posted: Fri Oct 28, 2005 10:54 am
by Skittlewidth
Out of interest, can you override the 2mb limit using ini_set()?

I don't think our hosts would be so kind to change the ini file despite the money we throw at them..

Posted: Fri Oct 28, 2005 11:06 am
by Chris Corbyn
Skittlewidth wrote:Out of interest, can you override the 2mb limit using ini_set()?

I don't think our hosts would be so kind to change the ini file despite the money we throw at them..
Given what it's in the ini file for I very much doubt ini_set() allows it. It's kinda a security/bandwidth thing for server admins.

If you're unhappy with shared hosting you could perhaps try UML hosting, which is still fairly cheap but gives you the freedom to do what you like with php etc.

Posted: Fri Oct 28, 2005 11:11 am
by conthox
Skittlewidth wrote:Out of interest, can you override the 2mb limit using ini_set()?

I don't think our hosts would be so kind to change the ini file despite the money we throw at them..
You may use .htaccess instead of ini_set() or php.ini:

Code: Select all

<Limit GET POST> 
php_value upload_max_filesize "8M" 
</Limit> 
 
php_value post_max_size "10M" 
 
php_value memory_limit "12M" 
 
php_value max_execution_time "600"
The "php_value max_execution_time" setting isn't needed if the connection is fast enough. The global limit is set in the Apache settings, not in php.ini.