[TYPO3] Problem with Imagemagick and exec on Solaris vs Linux

christian reiter cr at N-O-S-P-A-M-cxd.de
Fri Nov 10 15:14:55 CET 2006


Hi,

I am migrating a Typo3 project from a Linux environment to Solaris 10.

There is a goof_fotobek installation, which works fine on both environments
except on Solaris 10 whenever a directory contains spaces the rescaled
images (thumbnails) cannot be calculated.

Tyo3 makes a correct imagemagick statement which for instance looks like
this:

/var/httpd/servers/{thewebsitename}/safe_mode_exec_dir/convert -sample
100x67! "fileadmin/images/Folder With Spaces/Symposium_2006_083.jpg[0]"
typo3temp/pics/5add229f53.jpg'

Typo3 automatically adds the quotes when there is a space in the filename.

i.e. that is the string $cmd which is used in

function imageMagickExec($input,$output,$params) {
...
   $ret = exec($cmd);

When I execute this statement directly on the shell, it works.

When I create a little test.php file which just contains "exec(...)" with
the same string in it, it doesn´t work.

However doing the same thing for one of the commands for a file without
spaces, works both on the shell and in the exec test script-

The alternative method to run the command on the shell would be

/var/httpd/servers/{thewebsitename}/safe_mode_exec_dir/convert -sample
100x67! fileadmin/images/Folder\ With\ Spaces/Symposium_2006_083.jpg[0]
typo3temp/pics/5add229f53.jpg'

i.e. without quotes but with escaped spaces. This also works as a shell
command but not from the exec() test file.

So it seems, the exec() function of PHP as such has a bug/limitation in
Solaris 10? Is there anyone with similar experiences?

As I see it, Typo3 is doing everything correctly, because the commands Typo3
generates work on the shell; removing TYPO3 totally from the equation and
using the test.php containing only those exec calls shows the same problems
as from within TYPO3 - it only works with space-free filenames.


Thanks for any hints,

Christian Reiter





More information about the TYPO3-english mailing list