Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-8526 now.

Uploads of special JPGs as attachment Bug (fix completed in vcs)

Uploads of special JPGs as attachments trigger a debug-message:

Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 848: imagecopyresampled(): supplied argument is not a valid Image resource


While creating a totally black preview-picture, the JPG-file itself is uploaded without any problems.

I assume that this error only occurs in 1 from 1000 JPG-files, I can send the original to a team-member privately for inspection.

A total description of this matter is posted in support-forum:
viewtopic.php?p=10325495#p10325495

BTW: This same debug-message also occurs on phpbb.com by trying to upload this file.

Comments / History

Posted by bantu (3.0 Release Manager) on Jul 26th 2009, 22:29

Feel free to send the file to me. :-) But I guess all we can do is suppress the notice.

Posted by updown on Jul 26th 2009, 22:47

you got it, with prove of error within the PM :)

With imagick there's no problem, but phpbb doesn't use it on my installation (though it's activated with the right path settings), while coppermine gallery on the same server does...

Edited post #172095

Action performed by updown on Jul 26th 2009, 22:49

Posted by narqelion (I've Been Banned!) on Jul 27th 2009, 14:59

@updown, is the problem specific to only this one file from this user? You say you assume this happens in only 1 of 1000 jpg files, what are you basing that on? Has this specific user uploaded other images to your board from the same camera in the same format without any thumbnail issue?

Posted by updown on Jul 27th 2009, 15:18

@nargelion: My assumption was generally, since my board has several hundreds of JPGs uploaded and this is the first and only issue ever. No other tests have been made so far with other shots by this camery. As you can read in the support-topic (see link above), there has been the same issue by another user some weeks ago, claiming this problem first occurred after updating to 3.0.5 (which I cannot confirm, since this JPG is the only issue so far I witnessed directly since the beginning of phpBB Olympus).

The picture was taken by a SAMSUNG Digicam (a Mobilephone, see EXIF in support-topic), bantu has already received and spreaded it to the team-members for inspection.

The problem maybe based in the GD-engine and not directly in phbBB - maybe! But this picture handling has to be optimized thoroughly: I don't understand, that phpBB can't use Imagick, while other software like Coppermine Gallery can do it with the same server-settings (with Imagick there's no problem with making a thumbnail of this JPG as I have tested).

Edited post #172195

Action performed by updown on Jul 27th 2009, 15:19

Posted by rxu (Development Team Member) on Jul 27th 2009, 15:33

updown wrote:I don't understand, that phpBB can't use Imagick, while other software like Coppermine Gallery can do it
phpBB3 can do it. Or I misunderstood your point...

Posted by narqelion (I've Been Banned!) on Jul 27th 2009, 15:37

Thanks for replying. So at this point your issue is specific to one image file. Unfortunately the OP of the support topic you posted in did not provide enough information to help them at all, when debugging problems with attachments you first need to identify whether the error is specific to one file only or all files of the same type generated the same way. They did not provide any detail on the specific images or upload any examples to be used to recreate the problem, which is the first thing you should try to do in support. :)

If I were you I would ask your user to test uploading other image files taken with this same camera and see if the behavior is the same. As for your imagemagick problem, if the path is correct in the ACP phpBB should be able to use it. I suggest you open up a new support topic of your own for that problem. :)

Posted by updown on Jul 27th 2009, 15:40

@rxu: theoretically yes, the imagick-path is set correctly, but everytime the GD-engine is used instead! In coppermine with the same server-settings, its working fluently. Thats my point (just in case IF the bug is NOT phpbb-related, and IF this will be filed as "will not fix" ;-))

EDIT: OK, forget about that, this matter is due to a passthru()-deactivation.... Now let's concentrate on what the problem is with GD... sorry.

Posted by updown on Jul 27th 2009, 15:44

@nargelion: I also thought so, so I delivered the file. As soon as I can reach the user, I'll ask for more pics. Since then we have to wait what the inspection of this single picture by the development-team will bring...

Edited post #172225

Action performed by updown on Jul 27th 2009, 16:33

Ticket details

Related SVN changesets