Failed to config ImageMagic in CentOS

inori0821

Joined: 2010-02-01
Posts: 13
Posted: Sat, 2011-04-09 14:36


Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.13 apache2handler
Webserver = Apache/2.2.17 (EL)
Database = mysqli 5.0.91, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, Thumbnail, Gd
Acceleration = none, none

Hi guys,

I'm trying to install ImageMagic plugin for my gallery2. Now I can use command "convert --version" to get the IM version

Version: ImageMagick 6.2.8 04/17/08 Q16 file:/usr/share/ImageMagick-6.2.8/doc/index.html
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC

But in plugin config page, I type the path "/usr/bin" and press the test button, it show "The path you entered is not a valid directory or is not accessible. "

May I have the help please?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2011-04-09 14:55

type whereis convert to see where it's installed on centos.
____________________________________________
Like Gallery? Like the support? Donate now!

 
inori0821

Joined: 2010-02-01
Posts: 13
Posted: Sat, 2011-04-09 15:01

convert: /usr/bin/convert /usr/share/man/man1/convert.1.gz

It looks corrected. But gallery still say a invalid path

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sat, 2011-04-09 15:12

Just looked at my G2 install. Try /usr/bin/ (ending slash)

If that doesn't work, check your open_basedir setting and if you don't have anything enabled there, then I can only think that it's some security setting on the server preventing the user that PHP (or Apache) run as from accessing that path or those binaries.

Try creating a php page with this:

<?php echo shell_exec("/usr/bin/convert"); ?>:

Does that output anything?
____________________________________________
Like Gallery? Like the support? Donate now!

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Sat, 2011-04-09 15:15

Make sure "/usr/bin" is excluded from open_basedir restrictions.

--
dakanji.com

 
inori0821

Joined: 2010-02-01
Posts: 13
Posted: Sat, 2011-04-09 15:16

Hi nivekiam,

Thank you so much for your response. I have created the test.php which contents is
<?php echo shell_exec("/usr/bin/convert"); ?>:
The output is :

 
inori0821

Joined: 2010-02-01
Posts: 13
Posted: Sat, 2011-04-09 15:47

I have disabled open_basedir function in kloxo and now worked.Thanks a lot