I am stuck. I installed image magick. Look at the bottom here.
http://gallery.menalto.com/node/68491
Whatever I try, it won't work. That means on command line everything works, but for none of the php scripts it works. What am I doing wrong? It worked before, but I had to downgrade php since Plesk wouldn't work with the latest version of php but still using 5.1
Installing imagemagick
Re: Installing imagemagick
Alright nobody reacts so I will try one more time
According to me exec() is allowed. Installing ImageMagick gave me the following installation configuration
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: i686-pc-linux-gnu
Build system type: i686-pc-linux-gnu
Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no
Delegate Configuration:
BZLIB --with-bzlib=yes yes
Autotrace --with-autotrace=no no
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=no no
FreeType --with-freetype=yes no
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (unknown)
result_ghostscript_font_dir='none'
Ghostscript fonts --with-gs-font-dir=default
Ghostscript lib --with-gslib=yes no
Graphviz --with-gvc=yes no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=yes no
LQR --with-lqr=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PERL --with-perl=yes /usr/bin/perl
PNG --with-png=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=yes no
Windows fonts --with-windows-font-dir=
WMF --with-wmf=yes no
X11 --with-x= no
XML --with-xml=no no
ZLIB --with-zlib=yes yes
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.4.9
CC = gcc -std=gnu99
CFLAGS = -g -O2 -Wall -W -pthread
MAGICK_CFLAGS = -g -O2 -Wall -W -pthread
CPPFLAGS = -I/usr/local/include/ImageMagick
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS =
MAGICK_LDFLAGS = -L/usr/local/lib
LIBS = -lMagickCore -ljpeg -lbz2 -lz -lm -lpthread
CXX = g++
CXXFLAGS = -g -O2 -Wall -W -pthread
Why can't the php programs find imagemagick?
According to me exec() is allowed. Installing ImageMagick gave me the following installation configuration
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: i686-pc-linux-gnu
Build system type: i686-pc-linux-gnu
Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=yes yes
Static libraries --enable-static=yes yes
Module support --with-modules=yes yes
GNU ld --with-gnu-ld=yes yes
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no
Delegate Configuration:
BZLIB --with-bzlib=yes yes
Autotrace --with-autotrace=no no
DJVU --with-djvu=yes no
DPS --with-dps=yes no
FlashPIX --with-fpx=yes no
FontConfig --with-fontconfig=no no
FreeType --with-freetype=yes no
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (unknown)
result_ghostscript_font_dir='none'
Ghostscript fonts --with-gs-font-dir=default
Ghostscript lib --with-gslib=yes no
Graphviz --with-gvc=yes no
JBIG --with-jbig=yes no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=yes no
LCMS --with-lcms=yes no
LQR --with-lqr=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PERL --with-perl=yes /usr/bin/perl
PNG --with-png=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=yes no
Windows fonts --with-windows-font-dir=
WMF --with-wmf=yes no
X11 --with-x= no
XML --with-xml=no no
ZLIB --with-zlib=yes yes
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.4.9
CC = gcc -std=gnu99
CFLAGS = -g -O2 -Wall -W -pthread
MAGICK_CFLAGS = -g -O2 -Wall -W -pthread
CPPFLAGS = -I/usr/local/include/ImageMagick
PCFLAGS =
DEFS = -DHAVE_CONFIG_H
LDFLAGS =
MAGICK_LDFLAGS = -L/usr/local/lib
LIBS = -lMagickCore -ljpeg -lbz2 -lz -lm -lpthread
CXX = g++
CXXFLAGS = -g -O2 -Wall -W -pthread
Why can't the php programs find imagemagick?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Installing imagemagick
Are you using a PHP module or command line calls.
More than likely you are making command line calls. However PHP from the web usually runs in a different environment to the command line with a differect path, and sometimes as a completely different user. These can cause problems.
For the path look at IM Examples, API, PHP
http://www.imagemagick.org/Usage/api/#php
Or find Rubble Web ImageMagick pages who specializes in using IM command line from PHP.
As for user problems, you may need to make sure directories and files are readable and if needed writeable by the user PHP runs as.
More than likely you are making command line calls. However PHP from the web usually runs in a different environment to the command line with a differect path, and sometimes as a completely different user. These can cause problems.
For the path look at IM Examples, API, PHP
http://www.imagemagick.org/Usage/api/#php
Or find Rubble Web ImageMagick pages who specializes in using IM command line from PHP.
As for user problems, you may need to make sure directories and files are readable and if needed writeable by the user PHP runs as.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Installing imagemagick
It looks as if it is attempting to run command line IM but with images and extra error output in a specified application 'tmp' directory
It is not reporting any error results from the IM commands, (are they in /usr/local/bin ?) but as the command and errors are being directed into that temporary file it may be the application is not seeing any results at all.
Check that the directory is a proper 'tmp' that is read and writable, and usually with a directory sticky 't' permission (only owner can delete rename files). and that it is empty at the start.
A listing should have permission flags like... drwxrwxrwt
Note the 'd' for directory and 't' for 'sticky'. that is the same permissions
used for "/tmp"
There are lots of methods that can be used for debugging the above situation, though many require experience and knowledge about how things work to use.
For example replacing the IM command with a shell script wrapper to log things like.... time, date, environment, check permissions, run the real IM command, check results are generated and not zero, etc etc etc. In such a way it is posible to collect and check on possible problems and fix them to restore the system.
It is not reporting any error results from the IM commands, (are they in /usr/local/bin ?) but as the command and errors are being directed into that temporary file it may be the application is not seeing any results at all.
Check that the directory is a proper 'tmp' that is read and writable, and usually with a directory sticky 't' permission (only owner can delete rename files). and that it is empty at the start.
A listing should have permission flags like... drwxrwxrwt
Note the 'd' for directory and 't' for 'sticky'. that is the same permissions
used for "/tmp"
There are lots of methods that can be used for debugging the above situation, though many require experience and knowledge about how things work to use.
For example replacing the IM command with a shell script wrapper to log things like.... time, date, environment, check permissions, run the real IM command, check results are generated and not zero, etc etc etc. In such a way it is posible to collect and check on possible problems and fix them to restore the system.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Installing imagemagick
Anthony, thank you for your patience and kind help.
[root@plesk bin]# ls -l /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/g2data/
total 4156
drwxrwxrwx 8 wildejong psacln 4096 Dec 1 2007 albums
drwxrwxrwx 7 wildejong psacln 4096 Feb 6 04:26 cache
drwxrwxrwx 2 wildejong psacln 4096 Feb 6 04:38 locks
drwxrwxrwx 3 wildejong psacln 4096 Mar 1 2006 plugins_data
drwxrwxrwx 3 wildejong psacln 4096 Aug 28 2007 smarty
drwxrwxrwx 2 wildejong psacln 4096 Feb 14 14:38 tmp
[root@plesk bin]# ls -l
total 14528
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 animate
-rwxr-xr-x 1 root root 24725 Feb 14 07:37 compare
-rwxr-xr-x 1 root root 24207 Feb 14 07:37 composite
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 conjure
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 convert
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 display
lrwxrwxrwx 1 root root 21 Sep 16 2007 els -> /usr/local/els/els.sh
-rwxr-xr-x 1 root root 63384 Oct 15 2007 ffmpeg
-rwxr-xr-x 1 root root 234686 Oct 15 2007 ffserver
-rw-r--r-- 1 root root 3440 Feb 14 06:47 geometry.h
-rwxr-xr-x 1 root root 24727 Feb 14 07:37 identify
-rwxr-xr-x 1 root root 24193 Feb 14 07:37 import
-rw-r--r-- 1 root root 46274 Feb 14 06:46 jpeglib.h
-rwxr-xr-x 1 root root 421331 Oct 15 2007 lame
-rwxr-xr-x 1 root root 1330 Feb 14 07:37 Magick-config
-rwxr-xr-x 1 root root 1386 Feb 14 07:37 Magick++-config
-rwxr-xr-x 1 root root 1524 Feb 14 07:37 MagickCore-config
-rwxr-xr-x 1 root root 1356 Feb 14 07:37 MagickWand-config
-rwxr-xr-x 1 root root 6554024 Oct 15 2007 mencoder
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 mogrify
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 montage
-rwxr-xr-x 1 root root 7033492 Oct 15 2007 mplayer
-rw-r--r-- 1 root root 2367 Feb 14 06:45 png.h
-rwxr-xr-x 1 root root 151427 Sep 16 2007 rkhunter
-rwxr-xr-x 1 root root 69 Sep 5 2007 sb_config
-rwxr-xr-x 1 root root 24193 Feb 14 07:37 stream
-rw-r--r-- 1 root root 2127 Feb 14 06:44 tiff.h
-rwxr-xr-x 1 root root 1338 Feb 14 07:37 Wand-config
/usr/local/bin/convert -size 200x200 -geometry 200x200 /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/modules/imagemagick/data/test.gif /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/g2data/tmp/imgk_UmiowU
gives me nicely imgk_UmiowU in the tmp directory.
The directory is there, and these are the permissionsanthony wrote:It looks as if it is attempting to run command line IM but with images and extra error output in a specified application 'tmp' directory
[root@plesk bin]# ls -l /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/g2data/
total 4156
drwxrwxrwx 8 wildejong psacln 4096 Dec 1 2007 albums
drwxrwxrwx 7 wildejong psacln 4096 Feb 6 04:26 cache
drwxrwxrwx 2 wildejong psacln 4096 Feb 6 04:38 locks
drwxrwxrwx 3 wildejong psacln 4096 Mar 1 2006 plugins_data
drwxrwxrwx 3 wildejong psacln 4096 Aug 28 2007 smarty
drwxrwxrwx 2 wildejong psacln 4096 Feb 14 14:38 tmp
This is what I have in /usr/local/binanthony wrote:It is not reporting any error results from the IM commands, (are they in /usr/local/bin ?) but as the command and errors are being directed into that temporary file it may be the application is not seeing any results at all.
[root@plesk bin]# ls -l
total 14528
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 animate
-rwxr-xr-x 1 root root 24725 Feb 14 07:37 compare
-rwxr-xr-x 1 root root 24207 Feb 14 07:37 composite
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 conjure
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 convert
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 display
lrwxrwxrwx 1 root root 21 Sep 16 2007 els -> /usr/local/els/els.sh
-rwxr-xr-x 1 root root 63384 Oct 15 2007 ffmpeg
-rwxr-xr-x 1 root root 234686 Oct 15 2007 ffserver
-rw-r--r-- 1 root root 3440 Feb 14 06:47 geometry.h
-rwxr-xr-x 1 root root 24727 Feb 14 07:37 identify
-rwxr-xr-x 1 root root 24193 Feb 14 07:37 import
-rw-r--r-- 1 root root 46274 Feb 14 06:46 jpeglib.h
-rwxr-xr-x 1 root root 421331 Oct 15 2007 lame
-rwxr-xr-x 1 root root 1330 Feb 14 07:37 Magick-config
-rwxr-xr-x 1 root root 1386 Feb 14 07:37 Magick++-config
-rwxr-xr-x 1 root root 1524 Feb 14 07:37 MagickCore-config
-rwxr-xr-x 1 root root 1356 Feb 14 07:37 MagickWand-config
-rwxr-xr-x 1 root root 6554024 Oct 15 2007 mencoder
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 mogrify
-rwxr-xr-x 1 root root 24199 Feb 14 07:37 montage
-rwxr-xr-x 1 root root 7033492 Oct 15 2007 mplayer
-rw-r--r-- 1 root root 2367 Feb 14 06:45 png.h
-rwxr-xr-x 1 root root 151427 Sep 16 2007 rkhunter
-rwxr-xr-x 1 root root 69 Sep 5 2007 sb_config
-rwxr-xr-x 1 root root 24193 Feb 14 07:37 stream
-rw-r--r-- 1 root root 2127 Feb 14 06:44 tiff.h
-rwxr-xr-x 1 root root 1338 Feb 14 07:37 Wand-config
See above, I have never seen the sticky 't' permission and wouldn't know how to make it that way. This is a linux machine.anthony wrote:Check that the directory is a proper 'tmp' that is read and writable, and usually with a directory sticky 't' permission (only owner can delete rename files). and that it is empty at the start.
Well, I am not ignorant but not knowledgeable either. I can do a lot with finding solutions on the web, copy and paste, it's not my main job. I am a web hoster by chance. This machine is installed with Plesk and that's not supported by the company I am hiring from. I didn't know that from the start, so I am more or less on my own there. The other machine is installed with cPanel and that works fine. The Plesk machine is sometimes giving me headaches, but then again, I need it. My own (huge) websites are on it and a couple of other customers have websites there. I haven't had any complaints yet that imagemagick doesn't work, except from myself.anthony wrote:A listing should have permission flags like... drwxrwxrwt
Note the 'd' for directory and 't' for 'sticky'. that is the same permissions
used for "/tmp"
There are lots of methods that can be used for debugging the above situation, though many require experience and knowledge about how things work to use.
I tried some things. e.g.anthony wrote:For example replacing the IM command with a shell script wrapper to log things like.... time, date, environment, check permissions, run the real IM command, check results are generated and not zero, etc etc etc. In such a way it is posible to collect and check on possible problems and fix them to restore the system.
/usr/local/bin/convert -size 200x200 -geometry 200x200 /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/modules/imagemagick/data/test.gif /var/www/vhosts/genealogy.henny-savenije.pe.kr/httpdocs/gallery/g2data/tmp/imgk_UmiowU
gives me nicely imgk_UmiowU in the tmp directory.
Re: Installing imagemagick
Anthony, found it. Obviously the directive disabled_functions was twice in the php.ini. So I could change the first one as much as I wanted but it would be overridden by the second.
That's what you get if you let others (read Plesk support) fool around with your server.
Thanks for thinking with me.
Greetings from Korea
That's what you get if you let others (read Plesk support) fool around with your server.
Thanks for thinking with me.
Greetings from Korea