MyBB Community Forums

Full Version: Upload attachment problem!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
Hope all are doing fine.
I have small problem in Attachments uploads.

I set the rar size to 10 MB and when I upload rar file greater than 3 MB, It shows the upload % normally and when finish no attachment is uploaded!!!

In other words, If I increase the attachment size in admin CP, I'm not able to upload file greater than 3 MB.

Any suggestion would be much appreciated.

Thanks in advance.


Well I just read this:
Maximum File Size (Kilobytes)
The maximum file size for uploads of this attachment type in Kilobytes (1 MB = 1024 KB)

Please ensure the maximum file size is below the smallest of the following PHP limits:
Upload Max File Size: 2M
Max Post Size: 8M

SO this means I cant increase the size more than 2 MB for the attachments.
Is that true? can this be modified?

Thanks in advance.
You'll need to talk to your host in less you have access to the php.ini.
(2011-03-21, 01:42 PM)Alex Smith Wrote: [ -> ]You'll need to talk to your host in less you have access to the php.ini.

Thanks for reply!
I didnt get what u mean exactly, could u please explain in other words?

Anyway, at least the user must get Error message if he is trying to upload a file which is more then the Max size allowed!

Currently If I upload 100MB file, it starts uploading and finally no upload is there... I must get message that the file is bigger than the Max allowed b4 starting to upload.

Could some one guide me to the solution?

Thanks in advance!

We can't do anything about it, contact your host to increase the Max Upload Size.
Thats not how PHP works. There is no way for php to know the size of the file until after it has been uploaded where it is then checked for size etc.

You do get error messages explaining to you why the upload was denied.

The only way to have upload script recognize the size of the file before uploading starts is to do it on the client side which is beyond the scope here.

If you want to increase the size of the uploads, you'll also have to raise the php limit, to do so you'll have to edit the following directives in php.ini

post_max_size
upload_max_filesize

If you don't have access to php.ini then you'll have to get in touch with your host to make the changes for you.
Thanks.....

Understand Now Smile

Best regards.