Project

General

Profile

Actions

Bug #27197

closed

No ImageMagick installation available (safe_mode = ON)

Added by C. Lambert almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2011-06-03
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Description:

ImageMagick utilities are located in safe_mode_exec_dir but not found. It may be suitable as some ISP still have safemode on their server infrastructure.

The safe_mode_exec_dir is prepended to the command line while executing t3lib_utility_Command::exec. The Imagemagick utilities are not found because it try to execute /usr/local/php/bin/usr/local/php/bin/convert instead of /usr/local/php/bin/convert.

php.ini
safe_mode = ON
safe_mode_exec_dir = "/usr/local/php/bin/"

Additional information:

In safemode you will automatically execute the program convert in the safe_mode_exec_dir no matter what other path you specify. To match this restriction, a safemode check should be added in each related functions.

typo3/sysext/install/mod/class.tx_install.php

function _checkImageMagick_getVersion($file, $path) {
...

+ if($this->config_array['safemode']) $path = '';
$cmd = t3lib_div::imageMagickCommand($file, $parameters, $path);

$retVal = false;
t3lib_utility_Command::exec($cmd, $retVal);
...
}

/t3lib/class.t3lib_div.php

public static function gif_compress($theFile, $type) {
$gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
+ if(t3lib_utility_PhpOptions::isSafeModeEnabled()) $gfxConf['im_path_lzw'] = '';
$returnCode = '';

t3lib/utility/class.t3lib_utility_command.php

public static function imageMagickCommand($command, $parameters, $path = '') {
$gfxConf = $GLOBALS['TYPO3_CONF_VARS']['GFX'];
$isExt = (TYPO3_OS == 'WIN' ? '.exe' : '');
$switchCompositeParameters = FALSE;

- if (!$path) {
+ if (!$path && !t3lib_utility_PhpOptions::isSafeModeEnabled()) {
$path = $gfxConf['im_path'];
}

Actions

Also available in: Atom PDF