View Full Version : Problems with getting ImageMagick to work
marjo
31st of March 2005 (Thu), 15:16
Hi Pekka &Co,
First of all, I am soo happy to ahve found EE! I installed the v 1.22 and it looked great, but when I saw the new 1.5 and the capability to intergarte paypall etc, I knew this is the thing for me! The uploading and install of the new EE 1.5 to webserver happened happily and I though all would be well in the land of the nerds. However, I am just not able to get the darn Imagemagick thingy to work! The settings path says that Imagemagick was found from a saved path and the paths for Convert And Config report "OK", however I can't see the small image you're supposed to see after running the text. I KnOW I'm suppoed to see a reindeer, but I am NOT seeing a reindeer!
Soo.. I went to the Imagemagick website and understood absolutely nothing of the instructions on installing it. Yes, I am feeling a bit challenged. :oops: Then I ventured further out in cyberia and fond this other sitte that said "YES, even you CAN install ImageMagick on your webserver even if you aren't very clever and it doesn't even need to go into your cgi-bin, you can plop it right into it's own directory". This sounded so good! So I FTPed all the imagemagick files to a new folder on my webspace, and unzipped them there. Thereafter the instrutions got fuzzy, I tried following them, but ...no love for me.:cry:
So who can I bribe, marry or seduce into helping out a poor soul who's only dream is to have a working EE site of her very own?
EricKonieczny
31st of March 2005 (Thu), 15:26
Hi Pekka &Co,
So who can I bribe, marry or seduce into helping out a poor soul who's only dream is to have a working EE site of her very own?
I think I am correct to say that , that updates to IM need to be made by your server admin. Where are you hosting your site? did you buy a domain name and web space from a company , contact them.
Welcome and good luck
Pekka
31st of March 2005 (Thu), 15:31
Have you tried all the three "remove profiles" settings?
To troubleshoot:
Do you have Imagemagick installer in your server, what is the path to it, and do you have PHP safe mode off?
Those three questions need answering first.
So first thing is that you should really verify that IM is indeed installed. Do you have shell access to your server, i.e. do you administer your server or is it a hired web account? If you do not have shell access, ask your system support "do I have Imagemagick, and if I do what is the path to it?"
Which brings us to IM path. Sometimes the IM path in EE says OK even if it is not, because some system admins have disabled PHP exec command with a clever text response that that command is not allowed (a text response is what IM usually gives so it fools EE to think it is there). Only system admin can really say what the correct path is.
Then there is the safe mode problem. To use Imagemagick EE needs to use exec command in PHP. This command runs the imagemagick executable, and running system executables is allowed only when PHP safe mode is OFF. Safe mode is PHP's setting, which is set in php.ini. YOu can see your safe mode settings in a big information page you can access from EE via "server info/ Display full PHP info". The safe mode info is in the first big table on that page. Safe mode can only be set by system admin.
Let me know what happens.
marjo
31st of March 2005 (Thu), 16:04
Wow Pekka and Eric! You guys are fast!!! Iam impressed by the terabyte speed of your replies!
- I have tried all the three "remove profiles" settings.
Do you have Imagemagick installer in your server, what is the path to it,
_well, I do belive that I have the installer files, because I downloaded and put them there. However, they might not be in the correct location, becuase I made a folder under my "public_html" and just unzipped them in there.
...and do you have PHP safe mode off?
Not sure, how can I tell?
Do you have shell access to your server, i.e. do you administer your server or is it a hired web account? Not sure what this means.I't a hired account (not physically on a server of my own), but I administer the contents via X-panel, upload paths etc. There are all the tools to install script and stuff.
If you do not have shell access, ask your system support "do I have Imagemagick, and if I do what is the path to it?"
Not sure there are "real ppl" behind this account, but I'll investigate that.
Which brings us to IM path. Only system admin can really say what the correct path is.
So if I were to root around, what should it look like?
Then there is the safe mode problem. YOu can see your safe mode settings in a big information page you can access from EE via "server info/ Display full PHP info". The safe mode info is in the first big table on that page.
Went to the "display full PHP info" page, but I guess I'm a bit blur, because I don'tr know where here it is indicated if the safe mode is off or on. Anyway, here's all that comes up:
System Linux bender.servercorp.com 2.4.20-40.9.legacysmp #1 SMP Mon Jan 10 10:38:52 EST 2005 i686 Build Date Nov 7 2004 21:02:18 Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety disabled Registered PHP Streams php, http, ftp, https, ftps, compress.zlib
Gosh, does this tell us if it is off or on?
Very grateful for your help!!!
Pekka
31st of March 2005 (Thu), 16:18
Wow Pekka and Eric! You guys are fast!!! Iam impressed by the terabyte speed of your replies!
- I have tried all the three "remove profiles" settings.
Do you have Imagemagick installer in your server, what is the path to it,
_well, I do belive that I have the installer files, because I downloaded and put them there. However, they might not be in the correct location, becuase I made a folder under my "public_html" and just unzipped them in there.
No, installing is not that simple. We are dealing with computers here, nothing is simple :)
Do you have shell access to your server, i.e. do you administer your server or is it a hired web account? Not sure what this means.I't a hired account (not physically on a server of my own), but I administer the contents via X-panel, upload paths etc. There are all the tools to install script and stuff.
If you do not have shell access, ask your system support "do I have Imagemagick, and if I do what is the path to it?"
Not sure there are "real ppl" behind this account, but I'll investigate that.
I think that is the easiest and also fastest way to solve the Imagemagick problem - all servers have root users - if you do not have root pass then someone else does.
Which brings us to IM path. Only system admin can really say what the correct path is.
So if I were to root around, what should it look like?
If it is a LInux box then you could try command
locate /convert
It will produce lots of lines. If you see a line which ENDS to convert (like /usr/bin/convert) then you have IM there on that path.
Went to the "display full PHP info" page, but I guess I'm a bit blur, because I don'tr know where here it is indicated if the safe mode is off or on. Anyway, here's all that comes up:
System Linux bender.servercorp.com 2.4.20-40.9.legacysmp #1 SMP Mon Jan 10 10:38:52 EST 2005 i686 Build Date Nov 7 2004 21:02:18 Configure Command './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zip' '--with-zlib' Server API Apache Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/Zend/etc/php.ini PHP API 20020918 PHP Extension 20020429 Zend Extension 20021010 Debug Build no Thread Safety disabled Registered PHP Streams php, http, ftp, https, ftps, compress.zlib
Gosh, does this tell us if it is off or on?
No, that part tells you have ftp, exif and gd installed for example, the safe mode part is below that in a very big table "Configuration / PHP Core" which has three columns
Directive Local Value Master Value
You can see "safe_mode" in left column and two colunms to its right tell the values.
marjo
31st of March 2005 (Thu), 16:30
Found it. Safe mode is OFF.
The site is running on a UNIX server.
I have tried writing to the hosting company, not sure if it will produce and answer, but I'll give it a day or so. Wish everyone were as responsive as you. You make this Finn in excile very proud!
Will write when I hear from the hosting ppl.
Thanks
XXXX
Pekka
31st of March 2005 (Thu), 16:38
Ok, meanwhile you CAN use GD2 for resize - to get you know EE better. When IM works you can just switch it on in Resize Methods. Of course already-uploaded images will not be re-converted - that will come to EE some day...
Pekka
1st of April 2005 (Fri), 03:21
I develop EE on Windows XP so running it all on Windows is not a workaround :)
I have
Apache 2
MySQL 4
Cerberus FTP server
Imagemagick 6
BTW: next EE has Unsharp Mask sharpening for GD2, quite slow compared to IM, but produces great quality. I'll try to add watermarking to GD2, too - that way the Imagemagick is not really needed (but for speed and more file formats).
KO_300D
6th of April 2005 (Wed), 11:38
Hi marjo and welcome to the forums
just a quick question - although you don't see the image itself, are you able to see the filename and it's new size? Do images still get resized when you upload them?
Reason I ask is that I've installed EE twice, and on only one I saw the resized image. Both work absolutely fine though!
Like Pekka says - computers are never simple
xenon2000
27th of April 2005 (Wed), 16:22
I just started with a fresh EE 1.5 RC4 install, I have the same issue. It shows the paths as correct, but no result image.
msg 481 | imagemagick: IMAGEMAGICK COMMAND | convert -size 110x73 UPLOAD/d70_test_photos_d_044.jpg -resize 110x73! +profile '*' -unsharp 0.4x0.5+2+0.1 -quality 80 UPLOAD/ee_temp_upload/d70_test_photos_d_044.jpg
IMAGEMAGICK ERROR:
POSSIBLE REASONS:
SAFE MODE ON? EE can not use ImageMagick when is it located outside PHP safe mode exec dir.
IMAGE IS EMPTY? Perhaps source image was zero size.
IMAGEMAGICK PATH CHANGED? Maybe your server admin has moved IM to another location.
FOLDER PERMISSIONS WRONG? check that UPLOAD folder and all folders inside it are chmod 0777 (full permissions)
That is what I get when doing the upload process, so obviously IM is not resizing.
Image is not empty, path has not changed, and all folder permssions are properly set, including 777 on the folder where it writes the result image.
I have already asked my ISP admin about Safe Mode for IM and waiting for an answer. Until then, is there anything I should also be checkging?
MichaelChristopher
28th of April 2005 (Thu), 14:06
I'm having the same issue. I've had to transfer my EE site to a new hosting provider to get ImageMagick, but I can't get the graphics module test for ImageMagick to produce a moose. I have the path from the host sysadmin, and it checks out with the EE path test. I have checked that both my photo folder structure and the UPLOAD folder structure are all 777 permissioned.
When I try to upload to the database I get these errors:
msg 797 | ftp: web_mother_earth.jpg: UPLOAD ERROR. Reason: Undefined offset: 0
msg 796 | imagemagick: IMAGEMAGICK COMMAND | convert -size 60x45 UPLOAD/web_mother_earth.jpg -resize 60x45! +profile * -unsharp 0.6x0.7+2+0.1 -quality 50 UPLOAD/ee_temp_upload/web_mother_earth.jpg
IMAGEMAGICK ERROR:
POSSIBLE REASONS:
SAFE MODE ON? EE can not use ImageMagick when is it located outside PHP safe mode exec dir.
IMAGE IS EMPTY? Perhaps source image was zero size.
IMAGEMAGICK PATH CHANGED? Maybe your server admin has moved IM to another location.
FOLDER PERMISSIONS WRONG? check that UPLOAD folder and all folders inside it are chmod 0777 (full permissions)
Can you hep me figure out what I've done wrong?
MichaelChristopher
28th of April 2005 (Thu), 14:11
One more note. I've run phpinfo and safe mode is off. I'm not sure if this makes any difference, but safe_mode_exec_dir shows "no value." ALSO: I am still using the temporary non-dns pointer to my domain (a server name instead of alliej.com). Should that make a difference (I did do a domain transfer test two days ago and tried it that way, but I'm not sure all other settings were the same)?:rolleyes:
Pekka
29th of April 2005 (Fri), 10:35
Michael,
Got your PM.
Sorry for late reply! I was playing 3 concerts in Spain.
I went to your editor and fixed the Imagemagick problem by choosing another profile command in Graphics modules editor. They have updated imagemagick to version 6 and this needed another profile command. Also, IM 6 has a small bug which makes thumbnail in test page show 14 KB in size because it has a default compression ratio of 99% instead of standard 75%. That does not affect resize methods because the compression ratio is always defined there.
I tested the upload: B61 web mother earth was uploaded ok.
marjo
30th of April 2005 (Sat), 06:02
Holy smoke! I see a reindeer! Yee-hoo! Thanks guys!
I guess my host decided Imagemagick is a good thing!
xenon2000
2nd of May 2005 (Mon), 10:55
Any idea on my issue? My host swears up and down that everything is fine on their end. And I believe them since my other IM based scripts work. I don't know what version of IM they use. My paths show as working, but I don't get a thumbnail. I look in the folder and no image there. 777 permissions are set on all the right folders and I have tried all 3 of the profiles listed. Is it possible to add a profile that doesn't try to strip the EXIF and other info? Maybe the version of IM they use doesn't support that?
I can change the script if you tell me which php file to change, approximate line(s) and even the code change would be nice if you already have a change I should make.
xenon2000
2nd of May 2005 (Mon), 11:55
Well, I added a blank profile, added lines at 146, 735, 744 in EDITOR_graphics_modules.php.
Yet even without a a profile appended to the IM convert statement, I still don't get a result image.
Pekka
2nd of May 2005 (Mon), 14:02
xenon2000,
Do not alter souce code - use the original code and try this:
Open Resize methods page.
In Resize Methods pick the topmost one with Imgemagick and set "watermark" OFF, "remove profiles" OFF and "sharpen" OFF, see that there is nothing in "extracommand", choose "JPEG compression" 75% and save the methods. Now try the preview link for the method you just edited. What do you get?
xenon2000
2nd of May 2005 (Mon), 15:26
/usr/local/bin/convert -size 43x28 UPLOAD/test/source.jpg -resize 43x28! -quality 75 UPLOAD/test/result.jpg
That is the command it is running, doing as you mentioned. I get just a red X, I check the folder via FTP and the image is not there.
I personally think that my Host has PHP Safe Mode ON, but they won't tell me either way. Yet the path validates and my Host also says the path is correct.
Pekka
2nd of May 2005 (Mon), 15:35
Have you tried only
convert
as Imagemagick path?
Do you have shell access? If you do you could log in and go to your EE's input folder and give command
/usr/local/bin/convert -size 43x28 UPLOAD/test/source.jpg -resize 43x28! -quality 75 UPLOAD/test/result.jpg
There you could see what IM really responds.
xenon2000
2nd of May 2005 (Mon), 15:41
I only have FTP access at iPowerWeb as my host. First my path for your app was just
convert
as it defaulted to, and it validated fine that way. But they changed something when I asked them for support and then it no longer validated that way and then I had to put in /usr/local/bin/convert to get it to validate.
I wish I had SSH access, then I wouldn't have to use the control panel webpage to see very basic and rather useless error messages.
Pekka
2nd of May 2005 (Mon), 15:43
I only have FTP access at iPowerWeb as my host. First my path for your app was just
convert
as it defaulted to, and it validated fine that way. But they changed something when I asked them for support and then it no longer validated that way and then I had to put in /usr/local/bin/convert to get it to validate.
I wish I had SSH access, then I wouldn't have to use the control panel webpage to see very basic and rather useless error messages.
If you will, PM me your ftp info and url/passes to your EE editor, and I'll see if there is a way to make it work.
xenon2000
3rd of May 2005 (Tue), 23:51
I got my Host to run the command on the server. And they finally admitted it was on their end of things. They said JPG support wasn't correctly compiled and now it is fixed. So I can start customizing. Thanks for your help. I wish my Host would listen to me from the beginning, probably why I have had so many problems with IM. Thanks again.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.