PDA

View Full Version : PSD Attachment Upload Problem - Resize Failed


ifitsmedia
03-09-2011, 11:49 PM
I am having problems with attachments of PSD files in my forum.

When I try to upload a PSD file I get the following error:
Image resize failed due to your image library not having support for this image type.

Here are my settings:
https://vborg.vbsupport.ru/external/2011/03/30.png

I am using GD, and when I go to myforum/image.php?i=gd everything seems to be working because I can see an image.

When I go to admin --> Maintenance --> Diagnostics --> Upload and try to upload the same PSD file it works fine and does not detect any errors.

I don't know why it is trying to resize the PSD, when I have unlimited size enabled for PSD files, and a huge file size limit.

Any help would be greatly appreciated, this is driving me nuts.

--------------- Added 1299775039 at 1299775039 ---------------

Anyone?

Lynne
03-12-2011, 04:53 PM
From here - http://www.webmaster-toolkit.com/mime-types.shtml - your mime type is wrong. It has the correct type on that page.

What is the size of the psd file you are trying to upload? And have you tried a smaller one?

ifitsmedia
03-12-2011, 09:04 PM
Hi Lynne, thank you for the reply.

The mime type should only have an affect on browsers when they try to download one of the PSD attachments, right? I don't think it would have anything to do with VB trying to resize the PSD when it is being uploaded.

Anyway I changed the Mime Type to what was suggested on the link (thank you) but I still have the same problem.

The PSD image I was testing with is 1200x700, 235KB. I just tried a much smaller one 600x200 and got the same error.

I have my image attachment thumbnails set to 700px wide, so the second test image was even below that.

I don't understand why it is trying to resize these PSD's....

--------------- Added 1299975557 at 1299975557 ---------------

Ok, I also tried a PSD as small as 25px X 10px and I get the same error.

I also just got a vbulletin database error with the following:

Invalid SQL:
INSERT INTO filedata
(dateline, thumbnail_dateline, userid, extension, width, height, thumbnail_width, thumbnail_height, filehash, filesize, filedata)
VALUES
(1299975152, 1299975152, 17292, 'psd', 782, 690, 0, 0, '41531137e794fa54fdac78c0c2889d5f', 9549665, '8BPS\0 \0\0\0\0\0\0\0 \0\0 ?\0\0 \0 \0 \0\0\0\0\0\0?B8BIM \0\0\0\0\0D Z\0 %G Z\0 %G Z\0 %G Z\0 %G \0\0 \0\0 7\0 20110103 <\0 000616+00008BIM %\0\0\0\0\0 ?‚–)\n/?“GšFC`p??8BIM $\0\0\0\0??<?xpacket begin=\"\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <rdf:Description rdf:about=\"\"\n xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\">\n

And it goes on and on for about 2 pages of gibberish...

Lynne
03-12-2011, 11:24 PM
Yes, the mime type only matters when downloading the files, but I figured I should mention it since I saw that you had it wrong.

Is it ONLY psds that you are having a problem uploading or is it all image files?

Is there anything in your error_logs (if you don't know where they are, ask your host).

If you set AdminCP > Settings > Options > message attachment options > resize images to No, do you still get the same error?

Do you have the option to use ImageMagick instead of GD and does it work then?

It looks like you have the images stored in the database, does this work if they are stored in the filesystem?

ifitsmedia
03-13-2011, 03:27 AM
Thanks for the reply Lynne.

I do have Resize Images set to No.

Other image upload types are fine, this is only an issue with PSD files. It happens to be a Photoshop forum, so PSD uploads are important.

I have not tried ImageMagick, I'm not sure how to set that up.

I have not tried file system storage, will it take a long time to convert from database to filesystem storage if my board is large and there are a lot of attachments? I was reluctant to try it for this reason.

Oh, and there is nothing in the error logs of the server. I just got a couple email notifications of database errors from vbulletin like the one I posted above when I was testing out many different PSD uploads.

Lynne
03-13-2011, 04:58 AM
What is at the bottom of the database error that you posted above? When you get the error, view the page source for that page and you will see the actual database error near the bottom of that page. It will have some information like this:
The actual mysql query/code/problem....

MySQL Error : some sort of something here
Error Number : another something here
Date : Sunday, April 13th 2008 @ 11:16:43 AM
Script : http://address.path.path/page.php
Referrer :
IP Address : **.***.**.***
Username : username
Classname : database


I would suggest if you have a lot of attachments, and especially large attachments, that you store them in the filesystem. http://www.vbulletin.com/docs/html/attachment_storage

ifitsmedia
03-13-2011, 06:34 AM
Normally the database errors I get look like what you posted, but this one is simply a bunch of nonesense... sort of looks like the binary of a PSD file or something, but then it just cuts off. I tried to post the entire message here but it is too long (84000+ characters).

Not sure if it has anything to do with the PSD resizing errors or not.

Thanks for the tip on attachment storage... I will try switching over to filesystem.

--------------- Added 1300004035 at 1300004035 ---------------

Update: I changed to filesystem attachment storage and still get the same problem when trying to upload a PSD file.

I am running out of things to try.

Lynne
03-13-2011, 05:11 PM
I need to see the bottom of the error like what I posted in my last post. There will be a database error specified and I need to know what that is. It could be you need to change your mysql or php settings but it's impossible to know without seeing that error.

ifitsmedia
03-13-2011, 10:37 PM
Hi Lynne, thanks again for the reply.

Here is the entire error message:
http://ifitsmedia.com/dbase-error.html

That's all there is, it just cuts off after that, there's no other information in the email that VB sent.

I still have the same problem with PSD file uploads, but I don't always get these database errors. I'm not 100% certain they are related, and still have no idea why VB is trying to resize the PSD files in the first place.

Lynne
03-13-2011, 11:11 PM
What about when you upload a much smaller file - can you see the whole error then? My guess would be it's a mysql server has gone away error which means you would need to up the max_allowed_packet or wait_timeout, but I can't tell until we see a full complete error.

ifitsmedia
03-13-2011, 11:29 PM
I have been trying with a 10px X 10px PSD and I always get the "resize failed due to...." error, but not database error emails.

I have only received a couple of those database error emails but this resize failed error happens every single time I try to upload a PSD file, regardless of it's size.

Lynne
03-14-2011, 12:56 AM
Have you tried this with all your modifications disabled and using a totally default style? And are there any errors in the error_logs when you get the resize failed error (there should be)?

ifitsmedia
03-14-2011, 02:01 AM
Hi Lynne, thanks for the suggestions.

I have not tried with all mods disabled. I'll give that a go shortly.

I have tried with the default style, same error.

Where is this error_logs you mention? I have checked my server error log in cPanel and there is nothing.

Lynne
03-14-2011, 03:05 AM
You would have to ask your host where your error_logs are.

ifitsmedia
03-14-2011, 03:17 AM
Oh, I already checked the server error logs... there's nothing.

I thought you were talking about some error log in VB.

Lynne
03-14-2011, 03:22 AM
No, there are no error logs in vB.

I was able to upload a psd file on my test site (no mods) with no problem.

ifitsmedia
03-14-2011, 03:37 AM
Ok I just found out something very odd.

This error on uploading a PSD file is only happening to Administrators. Mods and all lower ranks do not have the problem.

Does that bring up any other possible ways of troubleshooting this?

Also, is there a way I can easily disable/enable all mods just to test this?

Lynne
03-14-2011, 03:46 AM
With it only happening to admins, that makes it sound even more like it's a mod.

Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php

define('DISABLE_HOOKS', true);