Project

General

Profile

Actions

Bug #27197

closed

No ImageMagick installation available (safe_mode = ON)

Added by C. Lambert over 13 years ago. Updated over 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 #1

Updated by Chris topher over 13 years ago

  • Assignee deleted (Chris topher)
Actions #2

Updated by Dmitry Dulepov over 13 years ago

  • Status changed from New to Rejected

Firsts, TYPO3 does not support safe mode.

Secondly, safe mode is deprecated in PHP (and will disappear in PHP 6).

Please, use other ways to secure your server.

Actions #3

Updated by Chris topher over 13 years ago

  • Target version deleted (4.5.4)
Actions

Also available in: Atom PDF