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...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:45:39
Script start
Timing: Jan 18 2025 11:45:39
Module start 'layout'
Timing: Jan 18 2025 11:45:39
Module start 'content'
Timing: Jan 18 2025 11:45:39
Module end 'content'
Timing: Jan 18 2025 11:45:39
Script end

Main resources:

Total runtime0.0205 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.9141152.6250
Module start 'layout' 0.00700.0044 740.539139.4453
Module start 'content' 0.01150.0067 779.984497.4609
Module end 'content' 0.01820.0023 877.445338.3047
Script end 0.0205  915.7500 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003316.0041140.0002
Check MTime0.00125.7696140.0001
Mysql Total
Database connection0.00083.992610.0008
Mysqli_queries0.003918.854730.0013
Looping result0.00000.141610.0000
Template Total0.00188.710.0018
Template load0.00104.815510.0010
Template processing0.00083.869610.0008
Override
Cache load0.00063.081510.0006
General
dbfile0.00042.190180.0001
String conversion0.00000.059240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs