ImageMagick - Imageinfo Failed - Thumbnail creation failed due to inability to obtain image size

EQ Admin

EQ Forum Admin
Staff member
I did a couple vBulletin forum moves to a new server this weekend and went through all sorts of frustration trying to get ImageMagick based image uploads working on the new server. There are several discussions about this topic and there is a lot of bad advice about vBulletin suspect versions, reinstalling vBulletin, changing the version of ImageMagick installed on your server, etc. Most of those troubleshooting suggestions should be ignored since they are not relevant to and will not fix your problem.

The first error message when uploading pictures was - Imageinfo Failed

I tried for a couple hours to get a working vBulletin + php safe mode + ImageMagick. I just don't think it's going to work, at least not with vBulletin 3. I did all of the regular steps involving creating a safe bin directory for binaries and setting that path in php.ini but was not able to fix the problem. If you do get ImageMagick working on a vBulletin 3.8.x forum running in php safe mode please let me know!

I turned off php safe mode for the vBulletin forum having the problem.

After turning off safe mode the second error was - Thumbnail creation failed due to inability to obtain image size

This one is an easy fix. Edit your php.ini and set a tmp directory for the option : upload_tmp_dir = /tmp

Restart your apache web server to pick up the changes to your php.ini and you should be all set!
 

Big Dan

EQ Forum Moderator
Awesome info Ray! I'm having the same 'Thumbnail creation failed due to inability to obtain image size' error on my new host. The tech doesn't have a clue as it worked perfectly on my VPS with the same versions of PHP and Imagemagick.

FWIW, I just switched to GD. I know Imagemagick is more versatile but for simple resizing GD gets the job done.
 

EQ Admin

EQ Forum Admin
Staff member
GD couldn't resize the images being thrown at the forums I moved.

Most of those users are less technical and try uploading direct from smart phones to vBulletin forums.

Did you unexpectedly get moved into a php safe mode environment?

Did setting the upload dir variable above help to fix your problem?
 

EQ Admin

EQ Forum Admin
Staff member
Did you have any other problems with your moves?

All I needed to do was update my new forum paths in a few places and everything seems to be working great.
 

Big Dan

EQ Forum Moderator
GD couldn't resize the images being thrown at the forums I moved.

Most of those users are less technical and try uploading direct from smart phones to vBulletin forums.

Did you unexpectedly get moved into a php safe mode environment?

Did setting the upload dir variable above help to fix your problem?

I haven't contacted the host with the new information yet. I'm going link him to your post once I wake up a little bit.

Did you have any other problems with your moves?

All I needed to do was update my new forum paths in a few places and everything seems to be working great.

No problems with my moves at all. A couple of strange cPanel caching issues in regards to add-on domains but the tech was right on top of it. Since it was cPanel to cPanel the paths stayed the same (/home/cpaneluser/....).

Since I moved from a VPS to reseller. I combined a client's cPanel accounts down from 3 to 1. I manage everything for him so it makes no difference to him. This host uses Litespeed over Apache and I see a noticeable difference in php processing even going from a dedicated environment to shared.

In prep for the move I moved attachments, avatars, profile pics, and signature pics into the database then back to the file system once we got on the new host. Figuring it would be less of a headache as that's what I've done when doing moves myself in the past but it didn't seem necessary.
 

EQ Admin

EQ Forum Admin
Staff member
This host uses Litespeed over Apache and I see a noticeable difference in php processing even going from a dedicated environment to shared.

You need to factor in availability of memcache, mod_pagespeed etc too.

There are a lot of network tuning and caching factors that are part of the puzzle besides vanilla apache+php vs. otherWebServer+php
 

Big Dan

EQ Forum Moderator
GD couldn't resize the images being thrown at the forums I moved.

Most of those users are less technical and try uploading direct from smart phones to vBulletin forums.

Did you unexpectedly get moved into a php safe mode environment?

Did setting the upload dir variable above help to fix your problem?

I pointed the host to this thread and he fixed the problem. For some reason the upload_temp_dir directive was commented out. ImagicMagick is working like a charm now. :)
 
Top