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

eZ debug

Timing: Jan 18 2025 04:54:44
Script start
Timing: Jan 18 2025 04:54:44
Module start 'content'
Timing: Jan 18 2025 04:54:45
Module end 'content'
Timing: Jan 18 2025 04:54:45
Script end

Main resources:

Total runtime0.8000 sec
Peak memory usage4,096.0000 KB
Database Queries205

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0077 588.8281180.8359
Module start 'content' 0.00770.6726 769.6641632.0469
Module end 'content' 0.68030.1197 1,401.7109341.0938
Script end 0.8000  1,742.8047 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00420.5241210.0002
Check MTime0.00150.1927210.0001
Mysql Total
Database connection0.00130.161210.0013
Mysqli_queries0.713489.17172050.0035
Looping result0.00210.25652030.0000
Template Total0.757794.720.3789
Template load0.00210.267420.0011
Template processing0.755694.442120.3778
Template load and register function0.00010.016010.0001
states
state_id_array0.00210.260910.0021
state_identifier_array0.00110.138520.0006
Override
Cache load0.00180.2267660.0000
Sytem overhead
Fetch class attribute can translate value0.00150.184140.0004
Fetch class attribute name0.00130.164380.0002
XML
Image XML parsing0.00270.337540.0007
class_abstraction
Instantiating content class attribute0.00000.001980.0000
General
dbfile0.00790.9863340.0002
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
9content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 36
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs