Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: MLM on May 07, 2011, 05:33:31 PM

Title: Large attachments and uploading psd's...
Post by: MLM on May 07, 2011, 05:33:31 PM
I am trying to attach a 80mb file to one of my threads on my forum but it does not work because my php config only allows 10mb and I can not manually add it/ ftp because I have no idea how to make a file_hash in the db.

My second problem is that I can never attach a psd no matter the size because this error pops:
Code: [Select]
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

Is there any fixes to these problems?
Title: Re: Large attachments and uploading psd's...
Post by: ACAMS on May 07, 2011, 06:22:49 PM
A file that large will most likely need to be zipped and uploaded to your FTP server.
I have never been able to get mine past 32MB, but I zip, upload and link large files anyway.
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 07, 2011, 06:24:17 PM
A file that large will most likely need to be zipped and uploaded to your FTP server.
I have never been able to get mine past 32MB, but I zip, upload and link large files anyway.

The large file is zipped.

but any size psd just gives me an error when i try to upload even on this site..
Title: Re: Large attachments and uploading psd's...
Post by: ACAMS on May 07, 2011, 08:20:57 PM
Since host are different, ask your host how to increase your max upload size.....or do a google search, but it is usually complicated and sometimes requires Putty. I did mine with a custom php.ini, but it is limited to 32MB on my server.
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 07, 2011, 08:22:56 PM
Since host are different, ask your host how to increase your max upload size.....or do a google search, but it is usually complicated and sometimes requires Putty. I did mine with a custom php.ini, but it is limited to 32MB on my server.

ye, I asked my host and they changed the max upload size but the post_max_size needs to be increased as well so waiting on that.

but anways i also need a hand with that psd not attaching..
Title: Re: Large attachments and uploading psd's...
Post by: mashby on May 07, 2011, 08:29:38 PM
So in a vanilla version of RC5 and also here, I tried to upload a simple PSD. On the vanilla one, All attachments are allowed but the PSD generated the message you provided. Tried to post the same file here earlier and got the same message.
Quote
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 07, 2011, 08:40:30 PM
So in a vanilla version of RC5 and also here, I tried to upload a simple PSD. On the vanilla one, All attachments are allowed but the PSD generated the message you provided. Tried to post the same file here earlier and got the same message.
Quote
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.

Glad i'm not the only one  ;)

Anybody got a reason why?
Title: Re: Large attachments and uploading psd's...
Post by: Illori on May 07, 2011, 08:49:58 PM
admin -> attachments and avatars -> attachment settings is psd in the allowed attachment extensions list? if not please add it and try again.
Title: Re: Large attachments and uploading psd's...
Post by: mashby on May 07, 2011, 08:58:51 PM
I did that on my vanilla RC5:
Attachments mode=Enable all attachments
Allowed attachment extensions=doc,gif,jpg,mpg,pdf,png,txt,zip,psd
Quote
Your attachment has failed security checks and cannot be uploaded. Please consult the forum administrator.
Tried to attach the same file in a reply here and got the same message.
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 07, 2011, 08:59:43 PM
admin -> attachments and avatars -> attachment settings is psd in the allowed attachment extensions list? if not please add it and try again.

Ye I have tried it both ways as well with same results..
Title: Re: Large attachments and uploading psd's...
Post by: mashby on May 07, 2011, 09:11:29 PM
If you need a PSD to see for yourself...here ya go, download this:
http://www.choppix.com/images/testpsd.psd
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 09, 2011, 04:08:03 PM
Anyone have a solution or a reason why?
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 10, 2011, 10:32:24 PM
Alright, I have been working very hard on this but all that needs to happen is that the preg will ignore these two cases:

BTW, the preg i am talking about is on the Subs-Graphics.php in the checkImageContents() function.
Title: Re: Large attachments and uploading psd's...
Post by: live627 on May 10, 2011, 11:11:29 PM
-nod- that is it. Since I'm not good with regular expressions, I can't help you I'm afraid. Hope a teamie picks up on this soon...
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 15, 2011, 06:56:13 PM
bump
Title: Re: Large attachments and uploading psd's...
Post by: ACAMS on May 15, 2011, 11:28:57 PM
http://www.google.com/search?aq=0&oq=increase+max_upload&sourceid=chrome&ie=UTF-8&q=increase+max_upload_size (http://www.google.com/search?aq=0&oq=increase+max_upload&sourceid=chrome&ie=UTF-8&q=increase+max_upload_size)


I now have mine up to 200MB
Title: Re: Large attachments and uploading psd's...
Post by: MLM on May 16, 2011, 04:09:40 PM
http://www.google.com/search?aq=0&oq=increase+max_upload&sourceid=chrome&ie=UTF-8&q=increase+max_upload_size (http://www.google.com/search?aq=0&oq=increase+max_upload&sourceid=chrome&ie=UTF-8&q=increase+max_upload_size)
I now have mine up to 200MB

Most people do not have access to the php.ini and the htaccess override doesnt work..
Title: Re: Large attachments and uploading psd's...
Post by: Aleksi "Lex" Kilpinen on June 13, 2011, 12:37:07 AM
The filesize issue is one that can only be handled on the server side - SMF can not override such limits from the host.

The PSD one, seems like SMF is handling it as any other image - and is trying to perform some checks to make sure it actually is an imagefile, and these checks fail for some reason.
What reason exactly, I do not know - but if it fails here as well, then there is probably something wrong with either the file, or the checks performed to it.

I'll link this topic to the devs, so they can take a look at this.
Title: Re: Large attachments and uploading psd's...
Post by: MLM on June 13, 2011, 03:01:38 PM
The filesize issue is one that can only be handled on the server side - SMF can not override such limits from the host.

The PSD one, seems like SMF is handling it as any other image - and is trying to perform some checks to make sure it actually is an imagefile, and these checks fail for some reason.
What reason exactly, I do not know - but if it fails here as well, then there is probably something wrong with either the file, or the checks performed to it.

I'll link this topic to the devs, so they can take a look at this.

Thanks for the reply. I kinda have found a way about the large attachments: http://www.simplemachines.org/community/index.php?topic=434237

but the psd has still been stumping me, I hope the devs can fix it.
Title: Re: Large attachments and uploading psd's...
Post by: Norv on June 14, 2011, 01:54:16 AM
It can happen that some images do not pass the security checks, it's unavoidable at some point (we had even more extensive checks in an earlier version, but have moved those to another configuration option in admin panel, so enabling them is admin's choice), because images may sometimes contain sequences that are very often found in dangerous scripts, and as such, SMF filters them.
Yet, it shouldn't happen to all .psd images...
I'll take a look at these images here.
Title: Re: Large attachments and uploading psd's...
Post by: Antechinus on June 14, 2011, 12:29:30 PM
We'll look into this as uploading psd's should be possible.

However, large psd's do compress really well. A 1.3 meg psd will often compress down to 250 k, so if you are wanting to attach them it would save bandwidth and load time if they were zipped first.
Title: Re: Large attachments and uploading psd's...
Post by: live627 on June 15, 2011, 12:48:53 AM
Quote
Yet, it shouldn't happen to all .psd images...
But it does. A good PSD that is saved by Photoshop has some XML markup and is causing SMF to trip up every time.