Forums / Install & configuration / ImageMagick path missing

ImageMagick path missing

Author Message

Lo' F.

Thursday 10 June 2010 12:29:16 pm

Hi there,

here's the problem:

Issues

1. Missing ImageMagick program

The ImageMagick program is not available to eZ Publish. Without it eZ Publish will not be able to do image conversion unless the imagegd extension is available.

If you know where the program is installed (the executable is called convert orconvertim)then enter the directory in the input field below and do a recheck (Separate multiple directories with a colon : ).

Path to ImageMagick:

...

Through the shell I downloaded the latest ImageMagick from the source (after having succesfully installed the latest build of Ghostscript), unpacked it, moved to the newly created ImageMagick directory, configured it, compiled it and finally installed in the root directory of my aruba server where this eZproject site is about to be launched.

I then executed the shell command "which convert" which returned convert lives in the usr/local/bin directory.

I then entered the path as requested in the ez page /usr/local/bin:/usr/bin:/bin but without any success since the finetune is not happy about it!

I also uploaded an image.ini.append.php file in the override directory where I gave the /usr/local/bin path but nothing has changed.

What should I do?

Do I need to create a symbolic link?

Please I really look forward to any workable suggestion!!

Many, many thanks in advance!

loredanaebook.it

Lo' F.

Friday 11 June 2010 1:05:13 pm

Hi there,

It's me again!

As I read in some other posts reporting the same issue, I attempted to add ExecutableUnix=convert (since I am using Linux OS) into the image.ini.append.php file.

But no luck, man!

I went ahead installing eZ (image System set to ImageGD .. but I want ImageMagick to be enabled!) and once finished the installation the image.ini.append.php shows [ImageMagick]IsEnabled=false and ...that's it!

What's wrong? Did I miss something? ..sure! But what?

Hope somebody helps!

loredanaebook.it

Lo' F.

Tuesday 15 June 2010 12:50:36 pm

I guess it might be out of eZ concerns... since this topic has been faced so many other times in the forum (and it is mostly ImageMagick related) but I just must have missed something and it starts driving me crazy.. so if anybody could give me a hint I'd really appreciate!

Among all my attempts here is the most noteworthy:

If I run "which convert" (..or "convert --version" ) from the shell it works fine and it shows me where the convert is located (..or the ImageMagick version),
while if I launch a php file uploaded inside the eZ project website - hosted by the server - with the command <?php echo system("which convert" ); ?> it doesn't return anything.
Although if I give the full path <?php echo system("which /usr/local/bin/convert" ); ?> it does return the requested output.
...
How to make ImageMagick as the default image system?

loredanaebook.it

Bertrand Dunogier

Moderated by: Nicolas Pastorino

Tuesday 15 June 2010 11:45:37 pm

Well, you should not need much. I think convert wasn't part of your web server's user's PATH at install time and couldn't detect ImageMagick. Your file.ini should probably look like this:

[ImageMagick]
IsEnabled=true
ExecutablePath=/usr/local/bin

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Lo' F.

Wednesday 16 June 2010 4:16:45 am

Thanks for your reply!

My image.ini.append.php simply shows:

[ImageMagick]
IsEnabled=false

I think I followed all the required steps during the eZ installation wizard..

During finetune check, I first installed Gostscript in the server root directory. And no matter how I test it - from php commands or from the shell (with "which gs" ) - it just appears fine, while I can't say the same for convert, mogrify or any other which I just can find if I test from the shell.

While I was configuring the image system, in the wizard screen I entered the path in the field as requested but none of my attempt was accepted so I edited the .ini.append file manually but the setting changed automatically after the installation was completed as outlined above.

What else can I try?

loredanaebook.it

Bertrand Dunogier

Wednesday 16 June 2010 5:41:54 am

Well, now that you're done with the setup wizard, the INI files should never be automatically changed. Just replace image.ini's content with what I gave you above, and it should work fine based on the informations you gave us. What's blocking you there ? Even if convert isn't in apache's PATH, ExecutablePath will give it the absolute path, and it should work.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Lo' F.

Wednesday 16 June 2010 6:29:56 am

Thanks again!

..What's blocking me here?! Well...it's a long, sore story..!

I did something which literally messed up the whole site configuration and so I have to restart from scratch reinstalling eZ again!

I'll get back to you shortly - once this is fixed - and let you know!

...

One more thing? It might that depends on open_basedir enabled, by any chance? It also happens that most of the time the web server doesn't allow me the access to /bin directories...
In order to disable that I just need to set the safe_mode to 0 and open_basedir to none in the php.ini file, right?!

loredanaebook.it

Lo' F.

Saturday 19 June 2010 6:20:00 am

I think it's solved, thanks to your clue!

Added..

<?php /* #?ini charset="utf-8"?

[ImageMagick]
IsEnabled=true
ExecutablePath=/usr/local/bin

*/ ?>

..to settings/override/image.ini.append.php after eZ installation.

I said "I think" because now I cannot test ImageMagick functionalities from within the site directory.

When I try to run any php file I got a 403 message "Forbidden. You do not have permission to access this document."

I thought it could have had something to do with basedir restrictions but now that open_basedir is turned off the problem's still there...

loredanaebook.it

Lo' F.

Sunday 20 June 2010 7:38:06 am

I took away the .htaccess for a while (which seems to be the reason blocking the access to .php files) and was able to run the testing page which again got trouble locating "convert".

- open_basedir restrictions has been unset;

- ExecutablePath has been set to /usr/local/bin in the image.ini.append.php

...

Do I need to install IMagic package?

..is there a way I can test convert functionality from within eZ back or front-end to check imageMagick's working or not?

loredanaebook.it

Gaetano Giunta

Sunday 20 June 2010 12:47:21 pm

The fact that when running system('which convert'); from a php script you got no answer is due to the fact that in the environment used by the Apache server the PATH does not contain /usr/local/bin, as does the environment you have when connecting via ssh.

That's the reason why you can set the path to 'convert' in image.ini ;-)

If you can access your web pages, the best way to see if imagemagick is working is to upload an image to any content object in the admin interface, then see if it shows up in the front. Of course, looking at the eZ Publish logs helps (in var/log within the eZP dir).

If the "executablepath" setting is ok, you might have some problems due to unix filesystem permissions: eZP can find the 'convert' executable, but not run it.

Run "ps -ef" to see which unix user runs the apache process and "ls -la /usr/local/binconvert" to see the permissions on the convert binary.

The Imagic package you do not need - it's the php extension for imagemagick, which is not used by eZP.

Principal Consultant International Business
Member of the Community Project Board