Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: pcdinh - maaliskuu 16, 2005, 12:12:04 AP

Otsikko: Can not upload big file (2-3Mb)
Kirjoitti: pcdinh - maaliskuu 16, 2005, 12:12:04 AP
I just want to upload a big file 2-3Mb but SMF return a warning:

Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server will allow.

Please consult your server administrator for more information.

Here is my configuration for Attachment Manager:

Total Size of Attachment Directory:   32594.46 KB [Recount]
Total Space Available in Attachment Directory:   7645.54 KB

Max attachment folder space (in KB): 40240
Max attachment size per post (in KB): 10000
Max size per attachment (in KB): 6000
Max number of attachments per post: 4


My attachment is only 2.66Mb

Anyone help me to resolve this problem?


Thanks
Dinh
http://www.goldenkey.edu.vn/vi/forum
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: andrea - maaliskuu 16, 2005, 12:25:38 AP
Can you post a link to your phpinfo?

What is phpinfo? (http://www.simplemachines.org/community/index.php?topic=18250.0)
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: nicholas - maaliskuu 16, 2005, 12:26:47 AP
most likely its this setting in the php.ini file

upload_max_filesize and post_max_size



oh yeah, if you dont have access to the servers php.ini file both those settings are overridable via per directory htaccess, but limits must be calculated in bytes.
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: pcdinh - maaliskuu 16, 2005, 12:44:43 AP
I have used

php_value upload_max_filesize 5mb

in .htaccess

to increase the maximum of file size allowed to upload but it returned the same warning.

Here is my phpinfo():

[modified] (is there any risks of security? :))
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: andrea - maaliskuu 16, 2005, 12:49:58 AP
What is the limit without your .htaccess setting? Many hosts restrict file uploads to 2MB. Not sure if a .htaccess takes effect.
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: pcdinh - maaliskuu 16, 2005, 12:53:32 AP
As you can see from phpinfo(), the default valua for upload_max_filesize is 2Mb and post_max_size is 8MB
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: andrea - maaliskuu 16, 2005, 12:58:01 AP
So I guess something is wrong in your .htaccess or this 2MB limit takes still effect and that you can decrease this value locally with .htaccess but not increase.
Otsikko: Re: Can not upload big file (2-3Mb)
Kirjoitti: pcdinh - maaliskuu 16, 2005, 01:00:02 AP
Oh, it works now. I correct the syntax of php_value: 5Mb->5M

IT WORKS NOW. Thanks all.

Best wishes for you