Jump to content


Photo

Image handling broken in Drupal 7 running PHP 53


  • Please log in to reply
18 replies to this topic

#1 kuemerle5

kuemerle5

    Member

  • Clients
  • PipPip
  • 70 posts
  • Gender:Male

Posted 03 June 2011 - 01:39 PM

Not really the biggest of issues but an issue nonetheless i suppose.

So I recently installed Drupal 7 and attempted to add some images but received some fatal errors. Like:

Warning: imagecreatefromjpeg(): 'public://Jellyfish.jpg' is not a valid JPEG file in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)

Okay, so maybe the Drupal code is broken. So I tried switching over to ImageMagick for processing. Same type of errors are happening ("unable to generate the derived image" most likely similar to the invalid JPEG error from earlier). At this point, I get the feeling it may not be Drupal's fault.

*Throw hands up in air*

Then I get the idea to switch the Drupal install over to PHP 52 (it was running 53) and lo and behold, everything is working! So I'm thinking maybe the PHP 53 binary or image modules were compiled incorrectly? Who knows...

Just thought I'd put that out there. Not a big deal, but PHP 53 does have better performance and I would prefer to use it.

Also, feel free to answer my poll! Just a little something I thought would be a good idea. Not for school or official research or anything.
  • 0

#2 Adam

Adam

    Member

  • Members
  • PipPip
  • 61 posts
  • Gender:Male

Posted 03 June 2011 - 10:36 PM

Not really the biggest of issues but an issue nonetheless i suppose.

So I recently installed Drupal 7 and attempted to add some images but received some fatal errors. Like:

Warning: imagecreatefromjpeg(): 'public://Jellyfish.jpg' is not a valid JPEG file in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)

Okay, so maybe the Drupal code is broken. So I tried switching over to ImageMagick for processing. Same type of errors are happening ("unable to generate the derived image" most likely similar to the invalid JPEG error from earlier). At this point, I get the feeling it may not be Drupal's fault.

*Throw hands up in air*

Then I get the idea to switch the Drupal install over to PHP 52 (it was running 53) and lo and behold, everything is working! So I'm thinking maybe the PHP 53 binary or image modules were compiled incorrectly? Who knows...

Just thought I'd put that out there. Not a big deal, but PHP 53 does have better performance and I would prefer to use it.

Also, feel free to answer my poll! Just a little something I thought would be a good idea. Not for school or official research or anything.



I have the same exact problem! Except I'm running WP.

All of my themes that use timthumb.php doesn't work. And I am using php 5.3.
  • 0
Countdown to tomorrow: 1 day.

My blog -- rubiverse.net

#3 SnakEyez

SnakEyez

    Newbie

  • Members
  • Pip
  • 21 posts

Posted 04 June 2011 - 08:06 AM

There are posts about this on the Drupal forums. One person suggested a new jpglib resulted in a conflict and some people say that the images ended up being corrupted locally and the library was refusing them.
  • 0

#4 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 03:47 PM

Not really the biggest of issues but an issue nonetheless i suppose.

So I recently installed Drupal 7 and attempted to add some images but received some fatal errors. Like:

Warning: imagecreatefromjpeg(): 'public://Jellyfish.jpg' is not a valid JPEG file in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of/home/happyplace/public_html/somesite.org/modules/system/image.gd.inc)

Okay, so maybe the Drupal code is broken. So I tried switching over to ImageMagick for processing. Same type of errors are happening ("unable to generate the derived image" most likely similar to the invalid JPEG error from earlier). At this point, I get the feeling it may not be Drupal's fault.

*Throw hands up in air*

Then I get the idea to switch the Drupal install over to PHP 52 (it was running 53) and lo and behold, everything is working! So I'm thinking maybe the PHP 53 binary or image modules were compiled incorrectly? Who knows...

Just thought I'd put that out there. Not a big deal, but PHP 53 does have better performance and I would prefer to use it.

Also, feel free to answer my poll! Just a little something I thought would be a good idea. Not for school or official research or anything.

If you haven't, do open a ticket for this so we can look into it. If you did open a ticket, let me know the ticket ID.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#5 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 04:10 PM

I made some changes to the server you're on for PHP53, so give it another try and let me know. If not, open a ticket and ask for me (Michael Denney).
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#6 kuemerle5

kuemerle5

    Member

  • Clients
  • PipPip
  • 70 posts
  • Gender:Male

Posted 28 June 2011 - 04:13 PM

Sure thing. I'll set up a Drupal sandbox (maybe even try to reproduce Adam's problem with WordPress as well) in the next few hours and I'll post the results here :)
  • 0

#7 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 04:20 PM

Sure thing. I'll set up a Drupal sandbox (maybe even try to reproduce Adam's problem with WordPress as well) in the next few hours and I'll post the results here :)

The issue was indeed a change in LibJPEG and we had to rebuild GD/ImageMagick for it but it *should* be working now. I know it's working in 5.2 but I don't have any test sites to try with 5.3.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#8 kuemerle5

kuemerle5

    Member

  • Clients
  • PipPip
  • 70 posts
  • Gender:Male

Posted 28 June 2011 - 04:49 PM

Well, it looks like I'm getting the same problem:
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of /home/happy_meal/public_html/sb/modules/system/image.gd.inc).
Warning: imagecreatefromjpeg(): 'public://Blue hills.jpg' is not a valid JPEG file in image_gd_load() (line 237 of /home/happy_meal/public_html/sb/modules/system/image.gd.inc).


This time, I'll try and debug a little bit more. I'll set up a PHP error log and see what's happening in there and I'll post this issue in Drupal's issue tracker. Again, I will post what I find in hopes that this pesky bug get fixed.
  • 0

#9 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 04:56 PM

I'm trying one more thing, I'll update this thread momentarily once I'm ready for you to re-try it :)
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#10 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 05:14 PM

Ok, try it now.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#11 kuemerle5

kuemerle5

    Member

  • Clients
  • PipPip
  • 70 posts
  • Gender:Male

Posted 28 June 2011 - 05:38 PM

We have a winner! Thanks Mike!

Btw, what was the issue?
  • 0

#12 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 June 2011 - 05:45 PM

Just needed to do a fresh build of php 5.3. I forgot to run "make clean" before running the rebuild last time.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#13 kuemerle5

kuemerle5

    Member

  • Clients
  • PipPip
  • 70 posts
  • Gender:Male

Posted 28 June 2011 - 05:47 PM

You learn something new everyday... :P
  • 0

#14 Yuri

Yuri

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 21 February 2012 - 08:03 PM

I know the issue is too old but I'm having the same problem today using Drupal 7 in PHP 5.3
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of /home/shepherd/public_html/main/modules/system/image.gd.inc).
Warning: imagecreatefromjpeg(): 'public://latenightinthezone.jpg' is not a valid JPEG file in image_gd_load() (line 237 of /home/shepherd/public_html/main/modules/system/image.gd.inc).
Warning: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: in image_gd_load() (line 237 of /home/shepherd/public_html/main/modules/system/image.gd.inc).
Warning: imagecreatefromjpeg(): 'public://latenightinthezone.jpg' is not a valid JPEG file in image_gd_load() (line 237 of /home/shepherd/public_html/main/modules/system/image.gd.inc).

  • 0

#15 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 21 February 2012 - 08:04 PM

The same as response #4 above, if you haven't opened a ticket - please do so.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#16 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 21 February 2012 - 08:51 PM

This has been fixed on the Cypress server (I tested to make sure).
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#17 Yuri

Yuri

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 21 February 2012 - 10:11 PM

Thanks, It's now working, I'll submit a ticket next time.

This has been fixed on the Cypress server (I tested to make sure).


  • 0

#18 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 23 February 2012 - 02:14 PM

You're welcome to ask here, as others may have an answer. But if somebody asks a question and is advised previously for the same issue to open a ticket, that's probably the best course of action :).
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!


#19 MikeDVB

MikeDVB

    Forum Administrator

  • Staff Administrator
  • PipPipPipPipPip
  • 2,127 posts
  • Gender:Male
  • Location:Central Indiana, USA

Posted 28 May 2012 - 07:09 PM

Oh, and in case anybody is wondering what the issue itself was. It had to do with GD+LibJPEG and mismatched versions. It was a side-effect of something custom that we've done on our servers but it's quite possible for it to happen at another provider as well.
  • 0

Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
Incremental R1Soft CDP Backups on all shared, semi-dedicated, and VPS services!
http://www.mddhosting.com/ - Follow us on Twitter!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users