You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Chen (JIRA)" <ji...@apache.org> on 2011/01/26 14:58:46 UTC

[jira] Created: (ZETACOMP-48) ImageMagick doesn't work with space path on Windows

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.


[jira] Commented: (ZETACOMP-48) ImageMagick doesn't work with space path on Windows

Posted by "Derick Rethans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZETACOMP-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987035#action_12987035 ] 

Derick Rethans commented on ZETACOMP-48:
----------------------------------------

We can't use this patch because it would make a dependency on the SystemInformation component from ImageConversion.

> 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.


[jira] Commented: (ZETACOMP-48) ImageMagick doesn't work with space path on Windows

Posted by "Chen (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (ZETACOMP-48) ImageMagick doesn't work with space path on Windows

Posted by "Derick Rethans (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZETACOMP-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987045#action_12987045 ] 

Derick Rethans commented on ZETACOMP-48:
----------------------------------------

Maybe you could add your comments to the PHP bug report to try to speed things up?

cheers,
Derick

> 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 Xiongjie
>
> 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.