Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] CI 3.1.0 ImageMagick not working

(08-24-2016, 03:04 PM)cartalot Wrote:
(08-24-2016, 02:58 AM)Narf Wrote: Seriously, for the Nth time - stop using the develop branch. It is NOT stable, of course you'll have problems with it.

Ok then lets download and try the official 3.1.0 link from the home page and use that system. And it does not work. It gives the error message that the path to the image library is not correct.

When that happens, you should look if it's not already a reported bug, and if not - report it yourself, like this guy did: https://github.com/bcit-ci/CodeIgniter/issues/4736

(08-24-2016, 03:04 PM)cartalot Wrote: Then lets download the 3.1 'stable' branch from Github and use that system. And that version does not even do the upload and it does not return any errors - it just gives a white screen. That situation is why earlier this month I started using 3.2.0 dev because it does not have the upload issue.

No significant changes to CI_Upload have been made since the 3.0.0 release, so that "upload issue" you're talking about is not only news (which apparently you've been keeping to yourself), but also most likely something on your end.

There are ZERO differences in file uploading, image processing between 3.1-stable and develop:

$ git diff 3.1-stable develop system/libraries/Upload.php
$ git diff 3.1-stable develop system/libraries/Image_lib.php

If there were any at the time you tried it, you know what they would've been? develop being multiple commits behind 3.1.0
You would've been better with just keeping 3.0.6 instead.

(08-24-2016, 03:04 PM)cartalot Wrote: So again the only fix i found that did work for getting ImageMagick to work was what was posted above by John Betong.

Do you know what that does? Reverts to the 3.0.6 behavior.

(08-24-2016, 08:17 PM)Diederik Wrote: I'm not using the codeigniter image manipulation library myself so I dont know if it can help you with the conversion. But it's so easy in regular php
(08-24-2016, 08:17 PM)Diederik Wrote: I would not want to be dependent of the availability of the exec command in my application since it is usualy turned off on a shared hosting server.

Yeah I was about to totally scrap what i had and use something completely different. But then i found John's post,
and a few seconds later everything worked. My host does support ImageMagick so hopefully that won't be an issue. Besides the fact that i already had the code written, whats nice with the Codeigniter implementation is that you can easily resize the image and convert to another file format in one method.

(08-25-2016, 02:34 AM)Narf Wrote: You would've been better with just keeping 3.0.6 instead.

Well you must be right but I did not know that at the time. So I was sharing what i discovered on this thread - primarily to thank John but also in case anyone else was having the same issue.
And yes I would have furthered researched the upload issue but upgrading to a dev version solved it immediately. I did not keep it a secret I posted about it immediately on a thread where other people were having issues with upgrading - but at the time I had no idea if the issue was the image or upload library - and as you say it could very well be something specific to my server or application.

(This post was last modified: 08-26-2016, 06:02 AM by spjonez.)

(08-23-2016, 03:51 PM)albertleao Wrote: Haven't looked deep into this, but is this related to this?


Yes that is the issue I reported and includes a fix which was added verbatim to the develop branch.

i just tested this fix over and over again - and it did not work on my server, the file path to the image library is not found.
CI 3.0.6 works. Johns fix for the later version of CI works. Again this is not to say this is universal, it might be something unique in the way the imagemagick library is set up on the server -- I'm just posting this in case other people are having the same issue with imagemagick.


I am running Ubuntu 16.04.1 on both the locahost and server and for some unknown reason the ImageMagick path is different?

To find ImageMagick Path:

  <?php define( 'LOCALHOST', 'localhost'===$_SERVER['SERVER_NAME'] );?>

  <?php system("type convert");?>
    convert is /usr/local/bin/convert
  # ONLINE  
    convert is /usr/bin/convert

ImageMagick CodeIgniter Settings:
  $config["image_library"] = "imagemagick"
  $config["library_path"]  = LOCALHOST ? "/usr/local/bin/" : "/usr/bin/"
ImageMagick Info
  <?php exec("/usr/local/bin/convert -version", $outByRef, $returnvalByRef)

  <?php print_r($outByRef)
      [0] => Version: ImageMagick 7.0.2-7 Q16 x86_64 2016-08-11 http://www.imagemagick.org
      [1] => Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
      [2] => License: http://www.imagemagick.org/script/license.php
      [3] => Features: Cipher DPC HDRI OpenMP
      [4] => Delegates (built-in): bzlib djvu fontconfig freetype gvc jbig jng jpeg lcms lqr lzma openexr png tiff wmf x xml zlib

Theme © iAndrew 2016 - Forum software by © MyBB