cannot override max upload file size

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
peterman5
Forum Newbie
Posts: 2
Joined: Thu Oct 14, 2010 12:20 pm

cannot override max upload file size

Post by peterman5 »

Hello,
I am unable to upload and override the php.in settings of 2M

I used all this

ini_set("upload_max_filesize", "9M");
ini_set("post_max_size", "9M");
ini_set("max_execution_time", "100");
ini_set("max_input_time", "100");

set_time_limit(100);


No Video Is getting uploaded above 2M

The php.ini settings are 2 M

I also used this
<input type="hidden" name="MAX_FILE_SIZE" value="9000000000" />

a file 1.8 mega gets uploaded

a file of 5 and 7 mega does not

Many Thanks
mikecampbell
Forum Commoner
Posts: 38
Joined: Tue Oct 12, 2010 7:26 pm

Re: cannot override max upload file size

Post by mikecampbell »

Some settings cannot be changed after the page has started loading, including upload_max_filesize. You can set it in php.ini, .htaccess or httpd.conf if you have access to those.
Post Reply