[ 
https://issues.apache.org/jira/browse/ZETACOMP-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987042#action_12987042
 ] 

Chen commented on ZETACOMP-48:
------------------------------

That's reasonable. Just think how to solve this. Ideally it should be solved in 
php proc_open

> ImageMagick doesn't work with space path on Windows
> ---------------------------------------------------
>
>                 Key: ZETACOMP-48
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-48
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: ImageConversion
>         Environment: Window 7, php5.3.5
>            Reporter: Chen
>
> 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 )

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to