Bug #17489
closedInstall Tool image tests fail when there are spaces in the path name
0%
Description
The test "1: Reading image formats" from the Testmenu on page "4: Image Processing" of the Install tool is not working properly in a typo3 4.1.1 system installed on Windows XP, using the winstaller tool.
The test tool tries to execute a command like this:
C:\php\imagemagick\convert.exe -geometry 170x136! -colorspace RGB -quality 70 "C:/Program Files/TYPO3_4.1.1/htdocs/Quickstart/typo3/sysext/install/imgs/jesus.gif0" "C:/Program Files/TYPO3_4.1.1/htdocs/Quickstart/typo3temp/pics/install_read_gif.jpg"
The command uses forward slashes instead of backslashes ("/" vs "\") which I suspected at first to be the problem.
However this same command, when executed in the command prompt, produces the output file.
The gm package supplied by the windows installer did not work at all. The install tool complained that it cannot find the tool in the default location (even though it was there).
Setting the parameters manually in the configuration:
im_path to the correct path, im_version_5 to "gm" and "im" to 1
, also did not give the desired effect - the Install tool still as unable to recognize that there is a working installation of GraphicsMagick available. That's when I switched to ImageMagick. I used this version: ImageMagick-6.3.5-2-Q16-windows-static.exe.
(issue imported from #M6001)
Files
Updated by Alexander Enchevich over 17 years ago
very likely this bug is due to space chars in windows paths (e.g. "Program Files"). After I removed my default typo3 installation and installed into c:\php\typo3_4.1.1 it now works properly:
- install tool reports that both GM and IM are present and reports their versions and locations;
- testmenu image tests work properly (with the exception of PNG scale test - see uploaded files).
Updated by Oliver Hader over 14 years ago
Ernesto, please tell me how to reproduce this bug. Thanks in advance!
Updated by Ernesto Baschny over 14 years ago
@Oli:
in the Install Tool with no im_path configured, just go to "Basic Configuration". Make sure you have ImageMagick (or GM) installed on a path with a space in it.
It won't work because no space is allowed.
The patch changes it to allow spaces in the im_path and quotes it correctly in the tx_div method.
Updated by Ernesto Baschny over 14 years ago
The attached patch should fix the "space in path" problem and also adds the PATH env-var to the detection routine (under windows) so that if you install GM or IM (which usually adds itself to the PATH), it will work out of the box.
Please test, so that I can submit it to the core list.
Updated by Peter Beernink about 14 years ago
I've tested your patch it worked ok.
I did make some modifications:
- match against current trunk (r9220)
- Applied the changes to allow spaces also to im_path_lzw
- Added the PATH environment variable also to the UNIX environment so IM installed using MacPorts should also work.
- In some windows installation the PATH is stored in $_SERVER['Path'] instead of in $_SERVER['PATH'], so when $_SERVER['PATH] is not found, additional check is done of PATH in other cases.
Updated by Ernesto Baschny about 14 years ago
Committed v3 (see core list) to:
- trunk rev 9354
- 4-4 rev 9355