Forums / Install & configuration / Imagemagick and path

Imagemagick and path

Author Message

Fred Gueho

Thursday 11 May 2006 4:25:16 am

I have this error in ez debug :

Failed executing: /usr/bin/convert '-quality' '75' '-geometry' '200x200>' 'var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_reference.jpg' 'JPEG:var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_medium.jpg', Error: , Return: 1

My apache log :
convert: unable to open image `var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_reference.jpg': Permission denied.

I tried everything I could to make it work, but it still not working...

Imagemagick convert is install in /usr/bin/.

Here is my override/image.ini.append.php :
[ImageMagick]
ExecutablePath=/usr/bin

Imagemagick work fine by command line when I try :
convert test.jpg test.png

Imagemagick work fine by command line when I try with an ezpublish image :
convert /opt/ezpublish/sites/default/var/mysite/storage/images/accueil/achat/popup/4383-2-fre-FR/popup.jpg test.png

So it's not an imagemagick problem because it works by command line.
It's not a permission problem because it works when I try to convert an ezpublish image.
I think it's a path problem because ez debug outpout should be :

Failed executing: /usr/bin/convert '-quality' '75' '-geometry' '200x200>' '/opt/ezpublish/sites/default/var/mysite/storage/images/accueil/achat/popup/4383-2-fre-FR/popup.jpg' 'JPEG:/opt/ezpublish/sites/default/var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_medium.jpg', Error: , Return: 1

not :
Failed executing: /usr/bin/convert '-quality' '75' '-geometry' '200x200>' 'var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_reference.jpg' 'JPEG:var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_medium.jpg', Error: , Return: 1

So I tried in override/settings.ini.append.php :

[FileSettings]
VarDir=var/mysite
or :
[FileSettings]
VarDir=/opt/ezpublish/sites/default/var/mysite
or :
[FileSettings]
VarDir=//opt/ezpublish/sites/default/var/mysite

But nothing works. The debug output message is always the same :

Failed executing: /usr/bin/convert '-quality' '75' '-geometry' '200x200>' 'var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_reference.jpg' 'JPEG:var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_medium.jpg', Error: , Return: 1

Is anyone has a clue ?
I'm really lost and I would really appreciate some litlle help :)
Thanks.

Fred Gueho

Thursday 11 May 2006 5:16:53 am

Depending of what I try I have the following code :

Error: , Return: 1
Error: , Return: 126
Error: , Return: 127

Where can I find the corresponding description of these errors ?

Thanks

Fred Gueho

Thursday 11 May 2006 8:12:23 am

I tried to put the "convert" file in my ezpublish root.

It works with command line.

it works with php :

exec("convert v.jpg toto.png");
exec("convert '-quality' '75' '-geometry' '600x600>' 'var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman.jpg' 'JPEG:var/mysite/storage/images/media/images/homepage_woman/1770-1-fre-FR/homepage_woman_reference.jpg'");

But it doesn't work with ezpublish... Always the same error.

I just don't understand...

H-Works Agency

Tuesday 16 May 2006 4:14:24 am

I think that php can't find you 'convert' executable.

You should add it manually or to you global pathes.

EZP is Great

Fred Gueho

Tuesday 16 May 2006 12:59:18 pm

Well I've done that in my override/settings.ini.append.php as you can see I my first post.

And it just doesn't work...

I've haven't found yet out to fix it. Please help me...

Nathan Kelly

Sunday 09 July 2006 5:03:08 pm

Hi I'm having this exact same problem, does anyone know of a solution to this?

I've spent all weekend trying to get images working with no luck, I need to show the site to my client this week but I need to get images working before I can do that.

I've tried everything I can think of but nothing has worked.

I know imagemagik is working as i have tested in a similar fashion to Fred, this must be eZpublish related but I've exhausted my knowledge on the problem and desperately need help.

Any ideas are most welcome.

Cheers!

Pardon me while I burst into flames...