Project

General

Profile

Actions

Bug #16950

closed

exec() with ImageMagick/GraphicsMagick fails on Windows with safe_mode = On

Added by Andreas Eberhard almost 18 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2007-02-07
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
4.0
PHP Version:
5.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

On Windows-Systems with safe_mode = On the exec()-Command for ImageMagick/GraphicsMagick fails.
It's not possible to run TYPO3 correct with IM e.g. GM when safe_mode is On.

Same Problem in TYPO3 4.0.2 and 4.0.4

Tested with PHP 4.4.4 and PHP 5.0.2

Affected File: t3lib/class.t3lib_div.php

Function: imageMagickCommand

Solution: Unset the path when on Windows and safe_mode = On, see the Code-Snippet below

function imageMagickCommand($command, $parameters, $path='')    {
$gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
$isExt = (TYPO3_OS=='WIN' ? '.exe' : '');
$switchCompositeParameters=false;
if(!$path)    { $path = $gfxConf['im_path']; }
> if ((TYPO3_OS=='WIN') and (ini_get('safe_mode')==1) ) {
> $path = '';
-> }

(issue imported from #M4937)

Actions

Also available in: Atom PDF