ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Windows Server / IIS 7 and ImageMagick

January 14, 2011 2:28pm

Subscribe [4]
  • #1 / Jan 14, 2011 2:28pm

    Robfletcher

    149 posts

    This question may be related to a resolved thread.

    I’m using Windows Server, IIS 7, PHP5, EEv2.1.3

    I had stumbled upon a PHP script called phpThumb for creating thumbnails. I had my server admin install ImageMagick.

    I want to set this up on my server and get EE to use imagemagick.

    I’m unsure what path i should use in the image resizing preferences.

    I’m guessing it will be something like:

    C:/Program Files (x86)/ImageMagick-6.6.7-Q16/

    or

    C:/Program Files (x86)/ImageMagick-6.6.7-Q16/converter.exe

    Which one should i use OR are both wrong?

  • #2 / Jan 14, 2011 7:08pm

    Sue Crocker

    26054 posts

    Hi, CDPRfletcher.

    When it comes to Windows paths in general, they can be tricky. What server path do you use for your file directories?

  • #3 / Jan 17, 2011 5:51pm

    Robfletcher

    149 posts

    I suppose I would use C:\Program Files (x86)\imagemagick\

    that looks correct right?

  • #4 / Jan 18, 2011 9:13am

    Sue Crocker

    26054 posts

    I have absolutely no idea, unfortunately. It looks like you have another outstanding issue, so perhaps we can add this thread to your login request.

  • #5 / Jan 18, 2011 12:03pm

    Robfletcher

    149 posts

    For me, this is a secondary issue right now. I would like to get imagemagick working, but right now i am using CD2 and EE2 plugin for creating cached images instead of using phpThumb. That seems to be doing the trick. 

    The main and what is holding up production is that other thread issue. That is definitely a critical thing.

  • #6 / Jan 19, 2011 12:50am

    John Henry Donovan

    12339 posts

    A common path for ImageMagick would be /usr/local/bin/convert

    If that fails then do the following.

    Create a file call imtest.php with the following content. Upload it to your root

    <html> <head> <title>Test for ImageMagick</title> </head>
    <body> <?
    function alist ($array) {  //This function prints a text array as an html list.
      $alist = "<ul>";
      for ($i = 0; $i < sizeof($array); $i++) {
        $alist .= "<li>$array[$i]";
      }
      $alist .= "</ul>";
      return $alist;
    }
    exec("convert -version", $out, $rcode); //Try to get ImageMagick "convert" program version number.
    echo "Version return code is $rcode 
    "; //Print the return code: 0 if OK, nonzero if error.
    echo alist($out); //Print the output of "convert -version"
    
    ?> </body> </html>


    load the page up in your browser

    If you have access to “convert,” you will get a return code of 0 plus two or three lines of text, reporting the version and location of ImageMagick.

  • #7 / Jan 19, 2011 12:26pm

    Robfletcher

    149 posts

    ok, I uploaded the imtest.php file.

    The result is

    Version return code is 4
    Invalid drive specification.

    What does that mean?

  • #8 / Jan 20, 2011 3:20am

    Ingmar

    29245 posts

    Looks like it invokes Windows’ standard tool “convert” instead of the ImageMagick program. Try providing a full path like exec(”\\path\\to\\convert”). Since this is no longer an EE issue as such, though, I’m moving this thread to the CSC. Thanks.

  • #9 / Jan 20, 2011 12:20pm

    Robfletcher

    149 posts

    well I put the path to imagemagick in the php script using this path:
    “C:\Program Files (x86)\ImageMagick-6.6.7-Q16\convert -version”

    The result is Version return code is 1.

    Any suggestions? What does code 1 mean?

  • #10 / Jan 20, 2011 6:12pm

    Lisa Wess

    20502 posts

    Hi, CDPRfletcher -

    It looks like you’re going to need to talk to your server admin about getting this up and running.  Unfortunately troubleshooting server issues is beyond technical support.  But your host/admin should be able to help you get ImageMagick up and running.

    Please let us know what you find out!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases