Uploading files of size more than 10MB

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
BasantSingh
Forum Newbie
Posts: 6
Joined: Wed Mar 05, 2008 3:19 am

Uploading files of size more than 10MB

Post by BasantSingh »

Hi Friends,
I am new to the PHP, can anybody please tell me what I have to do to allow an user to upload files more than 10MB.
I tried changing in the php.ini file following..
upload_maxfile_size=15M
host_max_size=15M
memory_limit=15M
But it didn't work.
I also want to know what is .htaccess file, where it is present.
I am using Apache 2.2.9 & PHP 5.2.6.

Thanks,
Basant Singh.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Uploading files of size more than 10MB

Post by panic! »

Have you tried

post_max_size = 15M

as well?
BasantSingh
Forum Newbie
Posts: 6
Joined: Wed Mar 05, 2008 3:19 am

Re: Uploading files of size more than 10MB

Post by BasantSingh »

Ya i have tried that...
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Uploading files of size more than 10MB

Post by panic! »

Have you tried restarting the server?

The .htaccess you create in the root of the folder you want the rules within it to apply to.
BasantSingh
Forum Newbie
Posts: 6
Joined: Wed Mar 05, 2008 3:19 am

Re: Uploading files of size more than 10MB

Post by BasantSingh »

Can you please tell me that what should be the content of the file if we want to upload a large file??
According to you if my php files are in a folder named "webApplication" then .htaccess should be in that folder
only????
I have used the following....
I am using php5..

<IfModule mod_php5.c>
php_value upload_max_filesize 50M
php_value post_max_size 50M
</IfModule>
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: Uploading files of size more than 10MB

Post by panic! »

Edit your php.ini instead of .htaccess and httpd.conf
Post Reply