Current time: 11-23-2024, 07:03 AM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] Gallery2 can't use Imagemagick ?
Author Message
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #1
[SOLVED] Gallery2 can't use Imagemagick ?
I wish i could understand german a little bit better, but i'm having the same issue as in this post:

http://www.isp-control.net/forum/erledig...-1816.html

I can't seem to get imagemagick installed on my server, i've built from source without error, but my Gallery2 installation can't seem to use it...

Quote:psygarden:/usr/local/bin# l
total 316K
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 animate
-rwxrwxrwx 1 root root 28K 2008-01-23 19:13 compare
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 composite
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 conjure
-rwxrwxrwx 1 root root 28K 2008-01-23 19:13 convert
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 display
-rwxrwxrwx 1 root root 28K 2008-01-23 19:13 identify
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 import
-rwxrwxrwx 1 root root 1.3K 2008-01-23 19:13 Magick-config
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 mogrify
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 montage
-rwxrwxrwx 1 root root 26K 2008-01-23 19:13 stream
-rwxrwxrwx 1 root root 1.3K 2008-01-23 19:13 Wand-config


This is the error i get from gallery2 when i test the availability for the functions:

Quote: ImageMagick binary test results
Binary Name Pass/Fail
identify
Failed
Error messages:

Problem executing binary:

identify
Failed
Error messages:

Problem executing binary:

convert
Failed
Error messages:

Problem executing binary:

composite
Failed
Error messages:

Problem executing binary:

Debug output (4 failed tests) -

We gathered this debug output while testing your ImageMagick binaries. If you read through this carefully you may discover the reason why your ImageMagick binaries failed the tests.

realpath(/usr/bin/)
realpath(/var/www/virtual/psygarden.be/)
realpath(/usr/share/php/)
Loading plugin imagemagick
imagemagick plugin successfully instantiated
Check the version of the imagemagick plugin
The version of the imagemagick plugin is ok
getcwd()
chdir(/var/www/virtual/psygarden.be/g2data/tmp/)
file_exists(/usr/bin/gm)
realpath(/usr/bin/identify)
realpath(/var/www/virtual/psygarden.be/)
realpath(/usr/share/php/)
getParameter exec.beNice for core plugin
Executing: ( "/usr/bin/identify"
"/var/www/virtual/psygarden.be/htdocs/g2/modules/imagemagick/data/test.gif"
) 2>/var/www/virtual/psygarden.be/g2data/tmp/g2dbga17pze
getParameter exec.expectedStatus for core plugin
file_exists(/var/www/virtual/psygarden.be/g2data/tmp/g2dbga17pze)
filesize(/var/www/virtual/psygarden.be/g2data/tmp/g2dbga17pze)
unlink(/var/www/virtual/psygarden.be/g2data/tmp/g2dbga17pze)
Regular Output:
Error Output:
Status: (expected 0)
file_exists(/usr/bin/gm)
tempnam(/var/www/virtual/psygarden.be/g2data/tmp/, imgk_)
realpath(/usr/bin/convert)
realpath(/var/www/virtual/psygarden.be/)
realpath(/usr/share/php/)
Executing: ( "/usr/bin/convert" "-size" "200x200" "-geometry" "200x200"
"/var/www/virtual/psygarden.be/htdocs/g2/modules/imagemagick/data/test.gif"
"/var/www/virtual/psygarden.be/g2data/tmp/imgk_7lapMO" )
2>/var/www/virtual/psygarden.be/g2data/tmp/g2dbgdptpZo
file_exists(/var/www/virtual/psygarden.be/g2data/tmp/g2dbgdptpZo)
filesize(/var/www/virtual/psygarden.be/g2data/tmp/g2dbgdptpZo)
unlink(/var/www/virtual/psygarden.be/g2data/tmp/g2dbgdptpZo)
Regular Output:
Error Output:
Status: (expected 0)
unlink(/var/www/virtual/psygarden.be/g2data/tmp/imgk_7lapMO)
file_exists(/usr/bin/gm)
file_exists(/usr/bin/combine)
file_exists(/usr/bin/composite)
file_exists(/usr/bin/gm)
tempnam(/var/www/virtual/psygarden.be/g2data/tmp/, imgk_)
Executing: ( "/usr/bin/composite" "-geometry" "+0+0"
"/var/www/virtual/psygarden.be/htdocs/g2/modules/imagemagick/data/test.jpg"
"/var/www/virtual/psygarden.be/htdocs/g2/modules/imagemagick/data/test.gif"
"/var/www/virtual/psygarden.be/g2data/tmp/imgk_4clucZ" )
2>/var/www/virtual/psygarden.be/g2data/tmp/g2dbg0MXzpz
file_exists(/var/www/virtual/psygarden.be/g2data/tmp/g2dbg0MXzpz)
filesize(/var/www/virtual/psygarden.be/g2data/tmp/g2dbg0MXzpz)
unlink(/var/www/virtual/psygarden.be/g2data/tmp/g2dbg0MXzpz)
Regular Output:
Error Output:
Status: (expected 0)
unlink(/var/www/virtual/psygarden.be/g2data/tmp/imgk_4clucZ)
chdir(/var/www/virtual/psygarden.be/htdocs/g2)

Does anyone have any suggestion what i might be missing out on?
(This post was last modified: 01-24-2008 07:53 PM by BeNe.)
01-24-2008 07:50 AM
Visit this user's website Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: Gallery2 can't use Imagemagick ?
Did you enable the disabled functions in php.ini?

Try to enable php error-logging...
01-24-2008 09:09 AM
Visit this user's website Find all posts by this user Quote this message in a reply
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #3
RE: Gallery2 can't use Imagemagick ?
Try to remove "passthrough" from the disabled functions in the right php.ini. restart apache and test it.
01-24-2008 05:36 PM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #4
RE: Gallery2 can't use Imagemagick ?
I can't find any reference to passthrough in

/etc/php5/apache2/php.ini
nor
/etc/php5/cgi/php.ini

Am i looking in the wrong place?
01-24-2008 07:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #5
RE: Gallery2 can't use Imagemagick ?
You have PM!

Greez BeNe
01-24-2008 07:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #6
RE: Gallery2 can't use Imagemagick ?
I got it working now, thanks a lot!

Here is a small roundup for other people that have the same issue:

1) Install imagemagick (compile from source or "apt-get install imagemagick" for debian users

2) You need to disable some security features in your php.ini so gallery can use the commands needed to resize images.

There are many php.ini files on your system, a global one for your apache2, one for cgi (both in /etc/php5/...) These are not the ones!

The one you should be looking for (example from my debian install):

/var/www/fcgi/YOURDOMAIN.COM/php5/php.ini

Here you look for this part of the file:

Quote:; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, shell, symlink, popen, proc_open

This is a security mesure for certain actions, we need to disable a few... here is my current line that i'm using:

Quote:disable_functions = show_source, system, shell, popen, proc_open

3) restart apache2 using the "/etc/init.d/apache2 restart" command

4) go to your gallery admin panel and activate the imagemagick module, and configure it with the folder "/usr/bin/"

Tests should succeed now.

greetings,
Rik
(This post was last modified: 01-24-2008 07:30 PM by psygarden.)
01-24-2008 07:30 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: Gallery2 can't use Imagemagick ?
Fine!
Thanks for your short howto Smile

Marked as [SOLVED]

Greez BeNe
01-24-2008 07:53 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)