KWPro.net

Kohana's ImageMagick Module is Busted
By: conark
Published On: 3-5-2010

I'm not sure if it's a version problem between PHP 5.3 and PHP 5.2.* or with ImageMagick, but I discovered an issue with how the Kohana ImageMagick plugin detects for ImageMagick on your OS.  What happens is that the plugin attempts to execute the command and examine the status code.  If the status code comes back as anything but a null/0 value, the plugin will throw an exception.  Well, this probably isn't the most elegant solution for checking if ImageMagick is installed.  However, on my hosting service, the return code is 1.  The only thing I can pinpoint is that the ImageMagick and PHP versions differ from my local system, which is using 5.2.6 for PHP.

I figure that exec with PHP might be slightly different, although I cannot be certain if it's a bug in the newer version of PHP.  However, the workaround I'm using is simply hardcoding the returned status code to 0 for now because I know that ImageMagick is, indeed, installed on my hosting service.  Not the greatest solution either.  Perhaps, the guy should've used the unix command which instead if he was going this route.

AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

No Comments Posted Yet
July [August] September
Sun Mon Tue Wed Thu Fri Sat
31 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 1 2 3