d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > How Do I Set Upload_max_filesize
12Next
Add Reply New Topic New Poll
Member
Posts: 29,399
Joined: Dec 8 2007
Gold: 4,071.02
Jun 23 2012 10:53am
this is whats in my .htaccess

# Do not remove this line, otherwise mod_rewrite rules will stop working
php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200
RewriteBase /

do i have to allow overwrite somewhere?? if so where should i do so?
i have echo ini_get('upload_max_filesize') . "<br />"; in my php file and it shows that the upload_max_filesize is only at 2M
and thus my upload script isnt working for files over 2M
I want to up this to 10-20 M
thx
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 23 2012 11:44am
i dont use php, but looking at your method name, i don't suppose there's an ini_set('upload_max_filesize', '20M') is there?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Member
Posts: 29,399
Joined: Dec 8 2007
Gold: 4,071.02
Jun 23 2012 12:31pm
Quote (carteblanche @ Jun 23 2012 10:44am)
i dont use php, but looking at your method name, i don't suppose there's an ini_set('upload_max_filesize', '20M') is there?


i tried that, didnt work
umm ill try the stuff in the link after lunch ;o
Member
Posts: 29,399
Joined: Dec 8 2007
Gold: 4,071.02
Jun 23 2012 06:50pm
ok so i tried stuff in the link it didnt work either.. i changed teh .htaccess
didnt do anything??? is there somewhere i have to go to enable it??
Member
Posts: 2,736
Joined: Nov 28 2009
Gold: 34.00
Jun 24 2012 06:08am
Quote (KyoDivine @ 24 Jun 2012 02:50)
ok so i tried stuff in the link it didnt work either.. i changed teh .htaccess
didnt do anything??? is there somewhere i have to go to enable it??


What host are you on? You may have to research for a solution specifically with your host.
If you are hosting the webserver on your own, it'll be as simple as writing
Code
ini_set('upload_max_filesize', '10M');


inside your /php/php.ini file.

This post was edited by eagl3s1ght on Jun 24 2012 06:09am
Member
Posts: 29,399
Joined: Dec 8 2007
Gold: 4,071.02
Jun 24 2012 07:50am
Quote (eagl3s1ght @ Jun 24 2012 05:08am)
What host are you on? You may have to research for a solution specifically with your host.
If you are hosting the webserver on your own, it'll be as simple as writing
Code
ini_set('upload_max_filesize', '10M');


inside your /php/php.ini file.


some free server host, i sent a support ticket to ask about this ;o
hopefully they'll give me a solution
Member
Posts: 22,605
Joined: Sep 23 2007
Gold: 1.01
Warn: 40%
Jun 24 2012 11:33am
Quote (KyoDivine @ 24 Jun 2012 15:50)
some free server host, i sent a support ticket to ask about this ;o
hopefully they'll give me a solution


free hosts often cap file upload size at 2 or 5 mb.
Member
Posts: 29,399
Joined: Dec 8 2007
Gold: 4,071.02
Jun 24 2012 01:45pm
Quote (tcl @ Jun 24 2012 10:33am)
free hosts often cap file upload size at 2 or 5 mb.


yes i just got their reply, its cap'd at 2 :(
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 25 2012 05:50pm
you said "upload script". i assume you want users to upload files? you can just break it into pieces and upload as 2MB chunks.
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll