PDA

View Full Version : upload size limit problem


hassanab
10-05-2009, 10:02 AM
I have problem upload file more than 2mb problem.I read on this forum & update .htaccess with these lines

php_value post_max_size 20M

php_value upload_max_filesize 20M

ErrorDocument 404 /errordocs/error404.htm

<Files .htaccess>

order allow,deny
deny from all

</Files>

but on phpinfo() the upload_max_filesize & post_max_size is 2mb
please any suggesstion to resolve this problem
Thanks in advance

seco
10-05-2009, 10:37 AM
try adding those php values to a file called php.ini and drop it in your root.

post_max_size 20M
upload_max_filesize 20M

hassanab
10-05-2009, 12:48 PM
I don't have root privilge to edit php.ini on remote server can you give me another solution pleeeeease

Fou-Lu
10-05-2009, 01:13 PM
Both of those directives are PHP_INI_PERDIR. If it doesn't work in .htaccess (or higher) using what you have here, you're out of luck I'm afraid.

CFMaBiSmAd
10-05-2009, 01:18 PM
seco actually meant your account's http document root folder. This would be refereed to as using a local php.ini

You can only put php settings into a .htaccess file when php is running as an Apache module and your web host has permitted any settings to be changed in a .htaccess file.

You can only put php settings in to a local php.ini when php is running as a CGI application and your web host has permitted a local php.ini to be used (sometimes the file name is php5.ini or some other variation.)

In any case, you should check with your web host to find out if, where, and how you can change the upload size settings.

jamesdurai
10-09-2009, 12:58 PM
I have heard and faced this problem several times when i need to
upload more than 2M file using my php script....

-> "upload_max_filesize" is one php.ini defined property... this
propery limits the maximum uploadable content size...

-<!>- PHP manual described this propery as "PHP_INI_PERDIR"...

-<?>- PHP_INI_PREDIR means "Entry can be set in php.ini, .htaccess or
httpd.conf "...

-<P>- You need to upload more than 2M file

->> You can do it just change php.ini "upload_max_filesize" propery ...
-<X>- Example: upload_max_filesize=100M

-<P>- When you dont have php.ini access....

->> You can change this property using .htaccess file...

(#)File: .htaccess
--------------------------------------------------
php_value upload_max_filesize 100m
--------------------------------------------------

*NOTE: (----) this signed used for indicating start and end of file...

Save in your php web root directory...

Thank you..