Gallery Project can't find ImageMagick

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
AfternoonShift
Posts: 4
Joined: 2015-04-13T16:28:29-07:00
Authentication code: 6789

Gallery Project can't find ImageMagick

Post by AfternoonShift »

Well i know Gallery Project is a bit old... but i still have all my photos stored there. i just moved to a new CentOS (6.6) server and i migrating all my data over.

When i enable ImageMagick, i get an error saying "The path you entered is not a valid directory or is not accessible."

i have created a PHP file that i've seen online to test imagemagick. It loosk to be working correctly on my test file.

http://www.constantly.org/testing/testing.php

everything seems to output correctly. What am i missing? i never had this issue on any of my past servers. It it some kinda permission issue?

here the permission to the "convert" -rwxr-xr-x 1 root root 27475 Apr 11 20:56 convert
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Gallery Project can't find ImageMagick

Post by fmw42 »

I am not sure I understand when and how you get failure if your test project works fine. Please clarify further. What are your exact commands?

Do you have a permission problem with where your images are stored or how you are specifying the path to them in your convert command?

Are you sure you do not have two versions of IM enabled simultaneously?

Is this a PHP issue? Does IM convert work fine in a terminal window?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Gallery Project can't find ImageMagick

Post by Bonzo »

Gallery is an online gallery script and I would guess it is an error in the setup.

I do not believe this "The path you entered is not a valid directory or is not accessible." is a Imagemagick error; it looks more like a php one.

Imagemagick could be installed in a different folder and you may need to change the path to convert.
AfternoonShift
Posts: 4
Joined: 2015-04-13T16:28:29-07:00
Authentication code: 6789

Re: Gallery Project can't find ImageMagick

Post by AfternoonShift »

fmw42 & Bonzo, i did a clean install of Gallery just to test with same result. During the setup page with gallery, it does check the permissions for where the images are stored, which is chmod to 777.

[root@server bin]# convert --version
Version: ImageMagick 6.9.1-1 Q16 x86_64 2015-04-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC OpenMP
Delegates (built-in): bzlib freetype jng jpeg lcms png tiff x xml zlib

how would i check to see if i had 2 versions of IM enabled simultaneously?



i still have my old server online, so i've been trying to compare the two, but i'm not seeing any differences, unless it something with php, where i'm not sure where to look.

Here's the php script i have for testing above. which seems to work. If its a php issue, is there something i should look into? I've had 3-4 other servers, and imagemagick worked great, so i'm pretty lost of what could be the problem.





<?php

echo "Using convert:<br>";
$array = array();
echo "<pre>";
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("convert input.jpg -thumbnail 500x500 output1.jpg 2>&1", $array);
print_r( $array );
echo"</pre>";

echo "Using /usr/local/bin/convert:<br>";
$array = array();
echo "<pre>";
// Replace input.jpg with the name of a jpg image in the same folder as this code and run it.
exec("/usr/local/bin/convert input.jpg -thumbnail 500x500 output2.jpg 2>&1", $array);
print_r( $array );
echo"</pre>";

?>
<img src="output1.jpg"><br>
<img src="output2.jpg">

<br />
<br />


<?php
system("/usr/local/bin/convert -version");
?>
<br />

<?php
$IM_version=shell_exec("/usr/local/bin/convert -version");
echo $IM_version
?>
<br />

<?php
exec("/usr/local/bin/convert -version",$out,$returnval);
print_r($out[0]);
?>
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Gallery Project can't find ImageMagick

Post by Bonzo »

I do not think we can help as it is a gallery problem and most of us do not use it. Looking at the gallery forum there are some posts on the " The path you entered is not a valid directory or is not accessible " error and I would check a few of them out.
AfternoonShift
Posts: 4
Joined: 2015-04-13T16:28:29-07:00
Authentication code: 6789

Re: Gallery Project can't find ImageMagick

Post by AfternoonShift »

Will do.. Thanks Bonzo. i will dig around. Hopefully find out whats causing the problem.
AfternoonShift
Posts: 4
Joined: 2015-04-13T16:28:29-07:00
Authentication code: 6789

Re: Gallery Project can't find ImageMagick

Post by AfternoonShift »

one last questions...

i just tried this:

[root@server admin]# rpm -Uvh ImageMagick-6.9.1-1.x86_64.rpm
error: Failed dependencies:
ImageMagick-libs = 6.9.1-1 is needed by ImageMagick-6.9.1-1.x86_64
libMagickCore-6.Q16.so.2()(64bit) is needed by ImageMagick-6.9.1-1.x86_64
libMagickWand-6.Q16.so.2()(64bit) is needed by ImageMagick-6.9.1-1.x86_64
libfftw3.so.3()(64bit) is needed by ImageMagick-6.9.1-1.x86_64
libltdl.so.3()(64bit) is needed by ImageMagick-6.9.1-1.x86_64


could this be causing my issues?
Post Reply