Attachments Bigger then 1mb Fails to get uploaded.

Started by pooya, June 28, 2008, 08:00:46 AM

Previous topic - Next topic

pooya

Even though my limit is set to 8mb, if anyone or even me is uploading an attachment bigger then 1 or 2mb it gives this error after a while.

An Error Has Occurred!   
Your attachment couldn't be saved. This might happen because it took too long to upload or the file is bigger than the server.

青山 素子

Where are you setting this 8 megabyte limit? You need to adjust SMF and PHP for larger uploads.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


pooya

From settings of attachments.

Where else am i supposed to edit ?

青山 素子

You need to edit php.ini too. While you can tell SMF the maximum size of attachments to accept, PHP's settings define the maximum that can ever be uploaded.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


agentx42

#4
I am having the same problem but with a much smaller file size (only 3.02MB) and I get the same error (i.e. 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.)

I have not done anything in PHP.

Currently the following is what is set in the php.ini file under "Data Handling"

; Maximum size of POST data that PHP will accept
post_max_size = 8M

In SMF I went into

ADMIN>Attachments and Avatars>Attachment Settings>

I changed the following all to "0" as it says for Max Size per attachment:

Max Attachment Folder Space = "0"
Max Attachment size per post = "0"
Max Number of attachments per post = "0"

I also went back into SMF and tied Cchanging each of those variables to "3000" but still the same problem. It won't even upload the 3MB file.

I have 2.7 GB of free space onthe computer drive so that's not it

Did I miss something?

vbgamer45

You also need to increase
upload_max_filesize = 2M


And after you make the changes in the file you might need to restart the webserver for them to take affect.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

agentx42

#6
Thanks!  I had to save it a couple times but it worked! 

pooya


青山 素子

Quote from: pooya on June 29, 2008, 11:42:01 AM
Is this php.ini done by my host ?

Usually, although some hosts allow you to set custom values. You'll need to ask your host about it.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


pooya

Asked my host, he said it could be done by editing .htaccess

Any help please.

niko

Quote from: pooya on June 29, 2008, 04:03:37 PM
Asked my host, he said it could be done by editing .htaccess

Any help please.

Use php_value

For example:
Quotephp_value upload_max_filesize 8M
php_value post_max_size 8M
Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

pooya

So i add this in .htaccess on main forum root yes ?

niko

Websites: Madjoki || (2 links retracted by team, links out of date and taken over.)
Mods: SMF Arcade, Related topics, SMF Project Tools, Post History

WIP Mods: Bittorrent Tracker || SMF Wiki

pooya

I tried doing so but then somehow joomla recognized as my forum link being not found ? lol

Realinfo

Quote from: Niko on June 29, 2008, 05:04:14 PM
Quote from: pooya on June 29, 2008, 04:03:37 PM
Asked my host, he said it could be done by editing .htaccess

Any help please.


Sir where we can change this value............. please tell in steps.......... i have same problem.......... Thanks
Use php_value

For example:
Quotephp_value upload_max_filesize 8M
php_value post_max_size 8M

Rumbaar

Did you have a question Realinfo?

You might want to read this pooya:
http://us2.php.net/configuration.changes
Or get step by step instructions from your host, though the changes you are making to the .htaccess shouldn't affect any linking to your forum.  Though it might depend where you put it inside the file.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Advertisement: