Advertisement:

Author Topic: Large attachments and uploading psd's...  (Read 6028 times)

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Large attachments and uploading psd's...
« 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?
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline ACAMS

  • Full Member
  • ***
  • Posts: 607
  • HEY, watch this....here, hold my beer
    • gametechmods.com
Re: Large attachments and uploading psd's...
« Reply #1 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.

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #2 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..
« Last Edit: May 07, 2011, 06:27:50 PM by MLM »
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline ACAMS

  • Full Member
  • ***
  • Posts: 607
  • HEY, watch this....here, hold my beer
    • gametechmods.com
Re: Large attachments and uploading psd's...
« Reply #3 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.

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #4 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..
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline mashby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,394
  • Gender: Male
  • badass beer hound
    • Choppix
Re: Large attachments and uploading psd's...
« Reply #5 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.
Always be a little kinder than necessary.
- James M. Barrie

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #6 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?
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,832
Re: Large attachments and uploading psd's...
« Reply #7 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.

Offline mashby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,394
  • Gender: Male
  • badass beer hound
    • Choppix
Re: Large attachments and uploading psd's...
« Reply #8 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.
Always be a little kinder than necessary.
- James M. Barrie

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #9 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..
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline mashby

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,394
  • Gender: Male
  • badass beer hound
    • Choppix
Re: Large attachments and uploading psd's...
« Reply #10 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
Always be a little kinder than necessary.
- James M. Barrie

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #11 on: May 09, 2011, 04:08:03 PM »
Anyone have a solution or a reason why?
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #12 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:
  • Script 0
  • cellTextIsHTMLbool

BTW, the preg i am talking about is on the Subs-Graphics.php in the checkImageContents() function.
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline live627

  • On Hiatus
  • SMF Hero
  • *
  • Posts: 5,620
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Large attachments and uploading psd's...
« Reply #13 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...
Try not to become a man of success, but rather try to become a man of value.
- Albert Einstein

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #14 on: May 15, 2011, 06:56:13 PM »
bump
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline ACAMS

  • Full Member
  • ***
  • Posts: 607
  • HEY, watch this....here, hold my beer
    • gametechmods.com

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #16 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
I now have mine up to 200MB

Most people do not have access to the php.ini and the htaccess override doesnt work..
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,282
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Large attachments and uploading psd's...
« Reply #17 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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.

How you can help SMF

"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum.
 Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Offline MLM

  • Full Member
  • ***
  • Posts: 498
    • Visual Pulse
Re: Large attachments and uploading psd's...
« Reply #18 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.
My Themes:
My Mods:
Unsolved Threads:
  • None atm...

Offline Norv

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 18,313
  • Blue Wolf
Re: Large attachments and uploading psd's...
« Reply #19 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.
To-do lists are for deferral. The more things you write down the later they're doneā€¦ until you have 100s of lists of things you don't do.
File a security report | Developers' Blog | Bug Tracker

Also known as Norv on D* | Norv N. on G+ | Norv on Github