XF 1.5 GD imagecreatefromjpeg() Fatal Error


Well-known member
I get about three of these per day (or more if a user gets error and keeps trying to upload their image again and again). I've googled the error and get surprisingly little information... Anyone have any clues? Maybe user is trying to upload a corrupt file or something?

ErrorException: Fatal Error: imagecreatefromjpeg(): gd-jpeg, libjpeg: recoverable error: - library/XenForo/Image/Gd.php:78
Generated By: joedoe, Thursday at 6:31 PM
Stack Trace
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
array(3) {
  ["url"] => string(45) "http://www.talkbass.com/attachments/do-upload"
  ["_GET"] => array(0) {
  ["_POST"] => array(8) {
    ["_xfToken"] => string(8) "********"
    ["hash"] => string(32) "98a577672a0a3af186014e2xxxxxxxx"
    ["content_type"] => string(4) "post"
    ["key"] => string(0) ""
    ["content_data"] => array(1) {
      ["thread_id"] => string(7) "1201xxx"
    ["_xfNoRedirect"] => string(1) "1"
    ["_xfResponseType"] => string(9) "json-text"
    ["_xfUploader"] => string(1) "1"
That is almost certainly a corrupt image. The best you could really do is make sure you're on the latest PHP (which should be the latest GD itself, though I suppose this could vary based on how you're installing PHP). If it's still happening then, you would need the original image from the user. It would need to be fixed within PHP/GD for a future PHP release. (It appears to be a fatal error so we can't actually do anything to stop it.)
Top Bottom