Uploaded image for project: 'Zeta Components'
  1. Zeta Components
  2. ZETACOMP-48

ImageMagick doesn't work with space path on Windows

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: ImageConversion
    • Labels:
      None
    • Environment:
      Window 7, php5.3.5

      Description

      If there is space for imagemagick path(like C:\Program Files\Imagick\convert.exe), It will get an error: ImageMagick not installed or not available in PATH variable.

      The reason is because of php bug: http://bugs.php.net/bug.php?id=49139

      Related issue: http://issues.ez.no/IssueView.php?Id=17756&

      Suggest patch(I don't like OS detecting, but I can't find a better way.. ):

      Index: ImageConversion/src/handlers/imagemagick_base.php
      ===================================================================
      — ImageConversion/src/handlers/imagemagick_base.php (revision 11476)
      +++ ImageConversion/src/handlers/imagemagick_base.php (working copy)
      @@ -189,6 +189,12 @@
      escapeshellarg( $this->tagMap[$this->getReferenceData( $image, 'mime' )] . ':' . $this->getReferenceData( $image, 'resource' ) );
      }

      + // workaround for php bug: http://bugs.php.net/bug.php?id=49139
      + $systemInfo = ezcSystemInfo::getInstance();
      + if( $systemInfo->osType == 'win32' )
      +

      { + $command = '"' . $command . '"'; + }

      // Prepare to run ImageMagick command
      $descriptors = array(
      @@ -398,7 +404,7 @@
      }
      else if ( file_exists( $settings->options['binary'] ) )

      { - $this->binary = $settings->options['binary']; + $this->binary = '"' . $settings->options['binary'] . '"'; }

      if ( $this->binary === null )

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xc Chen Xiongjie
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: