The path you enter should be a directory; that directory should contain "convert" and "identity" (or convert.exe and identity.exe on windows). Each of those files should be executable.
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Fri, 2004-09-24 21:52
shungokustasu wrote:
I get an error everytime I try to set the path in Imagemagick module. It states Bad_Path, but it the right path I downloaded in. need help on this.
I am having the same issues. G2 spits out the following when I test the ImageMagick Module:
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:
The system is:
Windows Server 2003
IIS 6
PHP: php-4.3.8
MySQL: mysql-4.0.21
The Path to ImageMagick is C:\Inetpub\Apps\ImageMagick so there are no spaces in the path. I have already tried that solution. Any ideas would be greatly appreciated.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-09-24 23:23
Try enabling buffered debug mode in your config.php and running the imagemagick tests again. Look for "Executing" in the debug output.. find the section for "identify" and post the output from "Executing" down to the "Status:" line.
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Sat, 2004-09-25 19:56
Mindless-
Here is what I got from running in DEBUG:
so it looks like it sees the ImageMagick installation but for some reason its giving an error output of 1 instead of 0. From this log though it doesn't really seem to tell what the problem is exactally. I even tried granting IUSR_SERVER full control of CMD and that doens't help either. Any ideas? Thanks for the help!
C:\Docuuments and Settings\Administrator> C:\Inetpub\Apps\ImageMagick\identify C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif
C:\Docuuments and Settings\Administrator>
cmd /c "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
Spits out:
The file name, directory name, or volume label syntax is incorrect.
BUT:
If i run CMD /C FIRST from the prompt then hit enter, then enter "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif" then it spits out GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01 so I assume that this must be a bug with the way the syntax is handled by Server 2003. Is there any thing else I should try or do you think this is something the G2 team needs to have a look at?
rdnovo
Joined: 2003-11-08
Posts: 24
Posted: Wed, 2004-09-29 01:27
I have a similar problem. Gallery2 is installed fine, but when I try to configure ImageMagick, it burps.
My ISP (Globat.com) swears the path they have given me is correct. Their suggestion was to try this, and I quote:
Quote:
Could you please try to add a function wherein it would call for the function to load the module before using it.
For example, to load the ImageMagick module, do:
dl("imagick.so");
I don't know which php file to put that in, or where to put it in the file.
Does this make sense to anyone? Is it related to this thread? Can anyone help me?
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-09-29 03:40
The imagick.so suggestion doesn't really apply.. we're calling external binaries, not loading dynamic libraries.
I don't really know why the "cmd.exe /c" syntax isn't working.. any windows experts know what's going on?
rdnovo, we probably need more detail than "it burps" to know what is happening on your setup..
baschny
Joined: 2003-01-04
Posts: 328
Posted: Wed, 2004-09-29 08:53
There seems to be an oddity on how cmd parses the parameters when multiple of them are quoted. See:
C:\>cmd /c C:\WINNT\system32\notepad.exe C:\AUTOEXEC.BAT
(works)
C:\>cmd /c C:\WINNT\system32\notepad.exe "C:\AUTOEXEC.BAT"
(works)
C:\>cmd /c "C:\WINNT\system32\notepad.exe" C:\AUTOEXEC.BAT
(works)
C:\>cmd /c "C:\WINNT\system32\notepad.exe" "C:\AUTOEXEC.BAT"
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
(The file name, directory name, or volume label syntax is incorrect.)
So when quoting the executable AND the first parameter (like we are doing in G2), it doesn't work. But then I don't see a way of running an executable with spaces in it with an argument with spaces in it through "cmd /c"!
Bug? Feature? Maybe there is some solution to this?
baschny
Joined: 2003-01-04
Posts: 328
Posted: Wed, 2004-09-29 08:56
Ah, the solution is already commented in WinNtPlatform.class:
note the leading and ending double-quotes (") around the whole stuff.
What is the output?
rdnovo
Joined: 2003-11-08
Posts: 24
Posted: Wed, 2004-09-29 11:06
Yes, I figured. "It burps" = the following:
When I enter the path to Image Magick and hit Test, I get three tests returned.
Quote:
Identify: passed
Convert: failed
Error messages:
problem executing binary:
Composite: failed
Error messages:
problem executing binary:
Would it be helpful to have access to my setup? I know G2 is alpha and there is no "support" per se, but it seems like this might be an issue with G2, since I have exhausted my ISP's goodwill on the matter (they are pretty insistent that it is not on their end).
I did just download the latest daily build (9/28) and no difference.
rdnovo
baschny
Joined: 2003-01-04
Posts: 328
Posted: Wed, 2004-09-29 11:44
rdnovo, I suspect this is another issue. To be able to know what's going on in your case, it would be helpful to know:
What OS? What version?
What PHP, version, and SAPI (CGI, ISAPI, Apache?)?
What ImageMagick version is installed?
Could you activate the "buffering" logging (in config.php) and redo the test on ImageMagick and post the resulting logging output here?
To keep on topic, my previous question for TomServo9 remains.
rdnovo
Joined: 2003-11-08
Posts: 24
Posted: Fri, 2004-10-01 03:58
baschny,
My problem is solved, but the developers may have a headache brewing. Turning on buffered logging helped me figure it out on my own, thank you for the suggestion. The images that Gallery2 uses to test the presence and functions of ImageMagick had been uploaded as ASCII. I uploaded them as binary, and it all works now.
I feel stupid, but this does bring up a couple of valid points for the final Gallery2.
Most of us regular folks will be using FTP clients to upload the Gallery2 files to our servers. I have yet to find an FTP client (I'm on a Mac, but even the best, Transmit fails at this), I have yet to find a client that will automatically and easily upload ASCII files and binary files in their respective modes.
You can choose to upload as ASCII, as binary, or in an "automatic" mode.
The "Choose mode automatically" functions always let you determine what extensions should be uploaded as ASCII, then loads everything else binary. The Gallery2 install includes at least ten or more extensions not included in the default lists (.class, .po, .tpl, .mo, .raw, .htc, .dtd, .inc...) I am sure I have missed a few hidden somewhere. I'm not even sure if all of those *should* be transferred as ASCII.
It would be better if the "automatic" mode let you choose which file extensions to load as binary, then loaded everything else as ASCII, but none I have seen work that way.
So my answer has been to upload everything as ASCII, then go back and selectively upload image files as binary. But, of course, I miss some of those, too, as they are scattered all throughout the install.
Most notably, I missed the test images for the ImageMagick module, located at the following path:
/modules/imagemagick/test/data/
They are not even in a folder labeled images (another tactic of mine was to do a search for "images").
Now, I know full well that this is alpha quality stuff, and I'm not complaining at all. But I think the developers should be made aware that people like me, regular users who want to use Gallery2, may be tripped up by this, even once the final edition is out the door.
Solutions I can think of?
Warn people about this particular issue with ImageMagick and the test images. I had the path correct to ImageMagick, but because the images were corrputed, the test failed, and Gallery2 never let me "activate" ImageMagick. If I had been able to activate it anyway, ImageMagick would have worked with all the files i added top my albums.
Consolidate all (or most) of the images Gallery2 uses in one simple directory for upload purposes (e.g., docs say, "and be sure to upload the all-images directory as binary...")
Or, write your own FTP program that allows users to determine what file extensions are uploaded as binary, rather than which ones are uploaded as ASCII. That would be so much simpler.
Thanks for all the assistance you offered. As a tester of alpha-labeled (but beta-quality) software, I never expected this much support.
rd
beckett
Joined: 2002-08-16
Posts: 3474
Posted: Fri, 2004-10-01 04:50
One point to remember here is PHP doesn't give a damn whether your carriage returns are Unix, Mac, or DOS, regardless of the PHP platform. So the best way to alleviate this issue, IMO, is always FTP everywhere in binary mode. Or at least, that sounds like a good recommendation for "Joe User" who's never going to peek inside any of the code, and just wants to FTP the damn thing up without any hassle. Not perfect, but perhaps a simple "common case" solution?
-Beckett (
)
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2004-10-01 05:01
beckett, I agree. Those users who have shell access and are unzipping directly on the server effectively get everything transferred as "binary" anyway.. our README should recommend all ftp operations be done in binary.
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Fri, 2004-10-01 05:47
Baschny-
Sorry I disappeared for the past few days. Things were really crazy at work. Anyways I tried quoting everything like Baschny recommened I try. The good news is that it DID work. Bad thing is that I am assuming this is a little bug with G2
So now the question is where do we go from here. As a side note I am pretty knowlegeable when it comes to IIS and Windows if there is anything I can do to help the dev of G2 with these platforms let me know. Thanks for all your help so far!
baschny
Joined: 2003-01-04
Posts: 328
Posted: Sat, 2004-10-02 07:17
TomServo9, That's strange, the ImageMagick module works correctly here for me on WinXP and latest ImageMagick (6.1.0 as of today).
What ImageMagick version have you installed? Can you try out the following PHP-script:
System:
Windows Server 2003 Web Edition
IIS 6
php-4.3.8-Win32.zip (ISAPI)
mysql-4.0.21-win.zip
gallery2-2004-09-24.zip
ImageMagick-6.0.8-Q16-windows-dll.exe
stealth401
Joined: 2003-09-11
Posts: 3
Posted: Wed, 2004-10-06 22:22
I have the same problem .... is this a bug ... or is there something else we can do ?
iis5 windows 2000
latest php
thanks
stealth401
Joined: 2003-09-11
Posts: 3
Posted: Fri, 2004-10-08 16:23
*bump
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Wed, 2004-10-13 19:55
Still no ideas on this problem? Any help is appreciated. Thanks!
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-10-13 20:38
It's been a while, so let me re-summarize what's going on..
"Test Settings" fails in ImageMagick Site Admin, even though the given path should be valid.
Here is a snippet from the debug output during Test Settings:
Post the results and also the contents of the test.out file, if any.
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Wed, 2004-10-20 13:10
Well here is my finding. I tried the code and heres what it outputs:
Status: 1
Results:
Array
(
)
Doesn't really help us too much. I'm willing to try anything else anyone comes up with. Let me know.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-10-20 15:24
um, shouldn't that be quite helpful? we know between baschny's test script and mine it went from working to not working.. are you sure there was no output in the test.out file?? I'd hoped for an error message there.
mindless
Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2004-10-20 15:47
TomServo9, a couple things to try:
1) some examples i found via a google search don't have a space after 2>
try removing that space in your test php file, but keep the quotes, so it's
2>"C:\\.....
2) if that still doesn't work, try moving the quote before the 2>..
"2>C:\\.....
TomServo9
Joined: 2004-09-24
Posts: 8
Posted: Sat, 2004-10-30 02:40
Mindless-
I was just saying that it doesn't help us much because it wasn't more descriptive. I tried the your suggestions but they yielded the same results. This is so frustrating, you know its something simple in the syntax...but what!
Status: 1
Results:
Array
(
)
grifter
Joined: 2004-10-30
Posts: 2
Posted: Sat, 2004-10-30 20:45
G2 version 10/30 (nightly build)
ImageMagick-6.1.2-Q16
Windows XP
Fresh install and am receiving generally the same thing. ImageMagick is installed in c:\imagemagick and when I hit test I receive
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\identify" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" 2> "C:\galleryimages\tmp\g2dC.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\convert" "-size" "200x200" "-geometry" "200x200" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "C:\galleryimages\tmp\imgD.tmp" 2> "C:\galleryimages\tmp\g2dE.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\composite" "-geometry" "+0+0" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.jpg" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "C:\galleryimages\tmp\imgF.tmp" 2> "C:\galleryimages\tmp\g2d10.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
If I copy and paste those exact same command strings into a command prompt I recieve the following output:
For convert and composite:
no output but returns to command prompt
Any progress on finding the problem? Anything you would like me to try?
h0bbel
Joined: 2002-07-28
Posts: 13451
Posted: Sat, 2004-10-30 20:50
grifter, unable to fork, eh? Tried a spoon? Or a spork?
Well, normally this issue is related to permissions on cmd.exe. You need to give the IUSR_<machinename> user account (the one that IIS 5.1 runs as) read and execute permissions om %systemroot%\system32\cmd.exe
baschny
Joined: 2003-01-04
Posts: 328
Posted: Sat, 2004-10-30 21:49
grifter, take a look at our FAQ, which is currently being maintained in this forum. Its one of the first sticky notes right on top. There should be a step-by-step answer to avoid that non-fork situation.
grifter
Joined: 2004-10-30
Posts: 2
Posted: Sat, 2004-10-30 22:33
Sorry about that :-? I did a search but didn't dig deep enough.
Anyway, up and working now.
Thanks for the quick response and excellent program! :D
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sat, 2004-11-06 19:05
h0bbel wrote:
grifter, unable to fork, eh? Tried a spoon? Or a spork?
Well, normally this issue is related to permissions on cmd.exe. You need to give the IUSR_<machinename> user account (the one that IIS 5.1 runs as) read and execute permissions om %systemroot%\system32\cmd.exe
That is a mayor risk, to let a IIS user execute your CMD.
So if you running "Gallery2" on your WINxx platform,
your making it easy for the BAD guys.
h0bbel
Joined: 2002-07-28
Posts: 13451
Posted: Sat, 2004-11-06 19:28
Gu_Flater, well, thats the design of PHP on Windows, not much we can to about it I'm afraid. The standard exec() calls in PHP, uses cmd.exe (perhaps it uses %ComSpec%, but I'm not 100% certain about that) to run external binaries.
Sadly, there is not much Gallery can do about it.
bharat
Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2004-11-06 20:27
This is also why we're providing the GD module in G2, so that you can use it as a graphics toolkit without having to make exec() calls. See if that works for you instead.
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sun, 2004-11-07 15:22
Thanks, for your altenatieve but then I have to pearse PHP again.
And that is because the Gallery2 say's there is no CD installed.
I have installed CD today because iam concerned about the safety off my board.
Thanks for your support,
Gu.
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sun, 2004-11-07 15:28
h0bbel wrote:
Gu_Flater, well, thats the design of PHP on Windows, not much we can to about it I'm afraid. The standard exec() calls in PHP, uses cmd.exe (perhaps it uses %ComSpec%, but I'm not 100% certain about that) to run external binaries.
Sadly, there is not much Gallery can do about it.
%ComSpec% is nice but still who ore with user use the exec.
Its maby posible the let %system% carryout the job.
Gu.
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sun, 2004-11-07 15:32
If there is somthing I can test tell me and I sall try to carry out your request to anproof the Gallery.
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2004-11-07 15:34
Gu_Flater, CD? You mean GD, right? And check your last post for typos
h0bbel
Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-11-07 19:06
Gu_Flater, as for how PHP handles executable files on Windows, thats a PHP issue. Gallery just uses standard calls...
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sun, 2004-11-07 20:02
h0bbel wrote:
Gu_Flater, as for how PHP handles executable files on Windows, thats a PHP issue. Gallery just uses standard calls...
First sorry for my typo's :oops:
but in IIS v6 is it posible to allow "Web service extentions" !
So wat I have done: make simple allowed PHP to use only the Magick exec..
And it works, my CMD.exe is more save now! :wink:
h0bbel
Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-11-07 21:41
Gu_Flater, cool! Glad you got it sorted.
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2004-11-07 21:51
maybe we should add this to the FAQ or other platform specific instructions and hints.
h0bbel
Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2004-11-07 22:02
valiant, sure. I'll see if I can't look into that. I have a Windows 2003 server to play with at work.
Gu_Flater
Joined: 2004-11-06
Posts: 7
Posted: Sun, 2004-11-14 21:36
h0bbel wrote:
valiant, sure. I'll see if I can't look into that. I have a Windows 2003 server to play with at work.
Ok I've tried everything I could think of to get ImageMagick working on OS X 10.3 with Gallery 2.
All the 4 tests fail and it spits this debug info up:
is_dir(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/)
getcwd()
chdir(/Volumes/Sidekick/WebServer/g2data/tmp/)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/gm)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/identify)
Executing: (
"/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/identify"
"/Volumes/Sidekick/WebServer/Documents/gallery2/modules/imagemagick/classes/../test/data/test.gif"
) 2>/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgiEvd3I
file_exists(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgiEvd3I)
filesize(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgiEvd3I)
fopen(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgiEvd3I, r, 0)
feof(Resource id #103)
fgets(Resource id #103, 4096)
feof(Resource id #103)
fgets(Resource id #103, 4096)
feof(Resource id #103)
fclose(Resource id #103)
unlink(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgiEvd3I)
Regular Output:
Error Output:
dyld: /Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/identify
can't open library: /ImageMagick-6.2.1/lib/libMagick.6.dylib (No such
file or directory, errno = 2)
Status: 133 (expected 0)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/gm)
tempnam(/Volumes/Sidekick/WebServer/g2data/tmp/, imgk_)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/convert)
Executing: (
"/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/convert"
"-size" "200x200" "-geometry" "200x200"
"/Volumes/Sidekick/WebServer/Documents/gallery2/modules/imagemagick/classes/../test/data/test.gif"
"/Volumes/Sidekick/WebServer/g2data/tmp/imgk_Y1RVPU" )
2>/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgESHm7V
file_exists(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgESHm7V)
filesize(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgESHm7V)
fopen(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgESHm7V, r, 0)
feof(Resource id #105)
fgets(Resource id #105, 4096)
feof(Resource id #105)
fgets(Resource id #105, 4096)
feof(Resource id #105)
fclose(Resource id #105)
unlink(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgESHm7V)
Regular Output:
Error Output:
dyld: /Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/convert
can't open library: /ImageMagick-6.2.1/lib/libMagick.6.dylib (No such
file or directory, errno = 2)
Status: 133 (expected 0)
unlink(/Volumes/Sidekick/WebServer/g2data/tmp/imgk_Y1RVPU)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/gm)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/combine)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/composite)
is_executable(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/composite)
file_exists(/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/gm)
tempnam(/Volumes/Sidekick/WebServer/g2data/tmp/, imgk_)
Executing: (
"/Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/composite"
"-geometry" "+0+0"
"/Volumes/Sidekick/WebServer/Documents/gallery2/modules/imagemagick/classes/../test/data/test.jpg"
"/Volumes/Sidekick/WebServer/Documents/gallery2/modules/imagemagick/classes/../test/data/test.gif"
"/Volumes/Sidekick/WebServer/g2data/tmp/imgk_S1VSuZ" )
2>/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgPvoyil
file_exists(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgPvoyil)
filesize(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgPvoyil)
fopen(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgPvoyil, r, 0)
feof(Resource id #107)
fgets(Resource id #107, 4096)
feof(Resource id #107)
fgets(Resource id #107, 4096)
feof(Resource id #107)
fclose(Resource id #107)
unlink(/Volumes/Sidekick/WebServer/g2data/tmp/g2dbgPvoyil)
Regular Output:
Error Output:
dyld: /Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/composite
can't open library: /ImageMagick-6.2.1/lib/libMagick.6.dylib (No such file
or directory, errno = 2)
Status: 133 (expected 0)
file_exists(/Volumes/Sidekick/WebServer/g2data/tmp/imgk_S1VSuZ)
unlink(/Volumes/Sidekick/WebServer/g2data/tmp/imgk_S1VSuZ)
chdir(/Volumes/Sidekick/WebServer/Documents/gallery2)
any help?
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-04-20 11:39
sprynmr, obviously, you haven't installed imagemagick properly.
Error Output:
dyld: /Volumes/Sidekick/WebServer/Documents/ImageMagick-6.2.1/bin/composite
can't open library: /ImageMagick-6.2.1/lib/libMagick.6.dylib (No such file
or directory, errno = 2)
Status: 133 (expected 0)
-> not properly installed.
btw: you can test imagemagick outside G2 too.
When you think you've installed imagemagick correctly, you can open a shell in OSX and try /path/to/convert -h or /path/to/identify -h /change /path/to).
Of course it doesn't suffice to just copy the source code of imagemagick to OSX.
I don't know much about OSX, but you may want to try:
ImageMagick-powerpc-apple-darwin7.8.0.tar.gz download download Mac OS X from http://www.imagemagick.org/script/binary-releases.php .
sprynmr
Joined: 2003-01-15
Posts: 31
Posted: Wed, 2005-04-20 17:59
Yes that's what I did do. I used the binary release and the commands work just fine from the command line. That's why I thought my problem sounded similar to the one above.
calderson
Joined: 2005-04-18
Posts: 5
Posted: Tue, 2005-08-30 02:34
From the FAQ:
----------------
A: You need to give permissions for IIS to be able to read and execute the command interpreter ("cmd.exe"). Without it, Gallery won't be able to call external executables (like ImageMagick). Required steps:
1. Open a cmd-prompt with "Start", "Execute", then type "cmd.exe". Hit ENTER.
2. At the prompt, type:
Code:
C:\> cacls %COMSPEC% /E /G %COMPUTERNAME%\IUSR_%COMPUTERNAME%:R
This adds the "read" permission to the IIS-user for the cmd.exe. Close the prompt and then try activating the imagemagick module again.
----------------
sprynmr
Joined: 2003-01-15
Posts: 31
Posted: Tue, 2005-08-30 02:37
I use apache on OS X. I gave up on ImageMagick awhile ago... never could get it to work.
Posts: 8601
The path you enter should be a directory; that directory should contain "convert" and "identity" (or convert.exe and identity.exe on windows). Each of those files should be executable.
Posts: 8
I am having the same issues. G2 spits out the following when I test the ImageMagick Module:
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:
The system is:
Windows Server 2003
IIS 6
PHP: php-4.3.8
MySQL: mysql-4.0.21
The Path to ImageMagick is C:\Inetpub\Apps\ImageMagick so there are no spaces in the path. I have already tried that solution. Any ideas would be greatly appreciated.
Posts: 8601
Try enabling buffered debug mode in your config.php and running the imagemagick tests again. Look for "Executing" in the debug output.. find the section for "identify" and post the output from "Executing" down to the "Status:" line.
Posts: 8
Mindless-
Here is what I got from running in DEBUG:
file_exists(C:\Inetpub\wwwroot\Domain.com\gallery2\modules\core\classes/../../../modules/imagemagick/AdminImageMagick.inc)
file_exists(C:\Inetpub\wwwroot\Domain.com\gallery2\modules\core\classes/../../../modules/imagemagick/AdminImageMagick.inc)
file_exists(C:\Inetpub\Apps\ImageMagick\)
is_dir(C:\Inetpub\Apps\ImageMagick\)
file_exists(C:\Inetpub\Apps\ImageMagick\gm)
file_exists(C:\Inetpub\Apps\ImageMagick\identify.exe)
Executing: cmd /c " "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
2> "C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d90.tmp" "
file_exists(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d90.tmp)
filesize(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d90.tmp)
unlink(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d90.tmp)
Regular Output:
Error Output:
Status: 1 (expected 0)
file_exists(C:\Inetpub\Apps\ImageMagick\gm)
tempnam(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\, imgk_)
file_exists(C:\Inetpub\Apps\ImageMagick\convert.exe)
Executing: cmd /c " "C:\Inetpub\Apps\ImageMagick\convert" "-size"
"200x200" "-geometry" "200x200"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
"C:\Inetpub\wwwroot\Domain.com\g2data\tmp\img91.tmp" 2>
"C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d92.tmp" "
file_exists(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d92.tmp)
filesize(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d92.tmp)
unlink(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d92.tmp)
Regular Output:
Error Output:
Status: 1 (expected 0)
unlink(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\img91.tmp)
file_exists(C:\Inetpub\Apps\ImageMagick\gm)
file_exists(C:\Inetpub\Apps\ImageMagick\combine)
file_exists(C:\Inetpub\Apps\ImageMagick\composite)
file_exists(C:\Inetpub\Apps\ImageMagick\gm)
tempnam(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\, imgk_)
Executing: cmd /c " "C:\Inetpub\Apps\ImageMagick\composite" "-geometry"
"+0+0"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.jpg"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
"C:\Inetpub\wwwroot\Domain.com\g2data\tmp\img93.tmp" 2>
"C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d94.tmp" "
file_exists(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d94.tmp)
filesize(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d94.tmp)
unlink(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\g2d94.tmp)
Regular Output:
Error Output:
Status: 1 (expected 0)
file_exists(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\img93.tmp)
unlink(C:\Inetpub\wwwroot\Domain.com\g2data\tmp\img93.tmp)
so it looks like it sees the ImageMagick installation but for some reason its giving an error output of 1 instead of 0. From this log though it doesn't really seem to tell what the problem is exactally. I even tried granting IUSR_SERVER full control of CMD and that doens't help either. Any ideas? Thanks for the help!
Posts: 8601
Try from the command line:
C:\Inetpub\Apps\ImageMagick\identify C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif
and
cmd /c "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
Do these work?
Posts: 8
Ok here are my findings:
From the C prompt:
C:\Docuuments and Settings\Administrator> C:\Inetpub\Apps\ImageMagick\identify C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif
Spits out:
GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01
Whereas:
C:\Docuuments and Settings\Administrator>
cmd /c "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif"
Spits out:
The file name, directory name, or volume label syntax is incorrect.
BUT:
If i run CMD /C FIRST from the prompt then hit enter, then enter "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif" then it spits out GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01 so I assume that this must be a bug with the way the syntax is handled by Server 2003. Is there any thing else I should try or do you think this is something the G2 team needs to have a look at?
Posts: 24
I have a similar problem. Gallery2 is installed fine, but when I try to configure ImageMagick, it burps.
My ISP (Globat.com) swears the path they have given me is correct. Their suggestion was to try this, and I quote:
I don't know which php file to put that in, or where to put it in the file.
Does this make sense to anyone? Is it related to this thread? Can anyone help me?
Posts: 8601
The imagick.so suggestion doesn't really apply.. we're calling external binaries, not loading dynamic libraries.
I don't really know why the "cmd.exe /c" syntax isn't working.. any windows experts know what's going on?
rdnovo, we probably need more detail than "it burps" to know what is happening on your setup..
Posts: 328
There seems to be an oddity on how cmd parses the parameters when multiple of them are quoted. See:
So when quoting the executable AND the first parameter (like we are doing in G2), it doesn't work. But then I don't see a way of running an executable with spaces in it with an argument with spaces in it through "cmd /c"!
Bug? Feature? Maybe there is some solution to this?
Posts: 328
Ah, the solution is already commented in WinNtPlatform.class:
(quoting the whole thing again).
So I think this is not the problem here...
Posts: 328
TomServo9, could you try this command from your prompt:
note the leading and ending double-quotes (") around the whole stuff.
What is the output?
Posts: 24
Yes, I figured. "It burps" = the following:
When I enter the path to Image Magick and hit Test, I get three tests returned.
Would it be helpful to have access to my setup? I know G2 is alpha and there is no "support" per se, but it seems like this might be an issue with G2, since I have exhausted my ISP's goodwill on the matter (they are pretty insistent that it is not on their end).
I did just download the latest daily build (9/28) and no difference.
rdnovo
Posts: 328
rdnovo, I suspect this is another issue. To be able to know what's going on in your case, it would be helpful to know:
What OS? What version?
What PHP, version, and SAPI (CGI, ISAPI, Apache?)?
What ImageMagick version is installed?
Could you activate the "buffering" logging (in config.php) and redo the test on ImageMagick and post the resulting logging output here?
To keep on topic, my previous question for TomServo9 remains.
Posts: 24
baschny,
My problem is solved, but the developers may have a headache brewing. Turning on buffered logging helped me figure it out on my own, thank you for the suggestion. The images that Gallery2 uses to test the presence and functions of ImageMagick had been uploaded as ASCII. I uploaded them as binary, and it all works now.
I feel stupid, but this does bring up a couple of valid points for the final Gallery2.
Most of us regular folks will be using FTP clients to upload the Gallery2 files to our servers. I have yet to find an FTP client (I'm on a Mac, but even the best, Transmit fails at this), I have yet to find a client that will automatically and easily upload ASCII files and binary files in their respective modes.
You can choose to upload as ASCII, as binary, or in an "automatic" mode.
The "Choose mode automatically" functions always let you determine what extensions should be uploaded as ASCII, then loads everything else binary. The Gallery2 install includes at least ten or more extensions not included in the default lists (.class, .po, .tpl, .mo, .raw, .htc, .dtd, .inc...) I am sure I have missed a few hidden somewhere. I'm not even sure if all of those *should* be transferred as ASCII.
It would be better if the "automatic" mode let you choose which file extensions to load as binary, then loaded everything else as ASCII, but none I have seen work that way.
So my answer has been to upload everything as ASCII, then go back and selectively upload image files as binary. But, of course, I miss some of those, too, as they are scattered all throughout the install.
Most notably, I missed the test images for the ImageMagick module, located at the following path:
/modules/imagemagick/test/data/
They are not even in a folder labeled images (another tactic of mine was to do a search for "images").
Now, I know full well that this is alpha quality stuff, and I'm not complaining at all. But I think the developers should be made aware that people like me, regular users who want to use Gallery2, may be tripped up by this, even once the final edition is out the door.
Solutions I can think of?
Warn people about this particular issue with ImageMagick and the test images. I had the path correct to ImageMagick, but because the images were corrputed, the test failed, and Gallery2 never let me "activate" ImageMagick. If I had been able to activate it anyway, ImageMagick would have worked with all the files i added top my albums.
Consolidate all (or most) of the images Gallery2 uses in one simple directory for upload purposes (e.g., docs say, "and be sure to upload the all-images directory as binary...")
Or, write your own FTP program that allows users to determine what file extensions are uploaded as binary, rather than which ones are uploaded as ASCII. That would be so much simpler.
Thanks for all the assistance you offered. As a tester of alpha-labeled (but beta-quality) software, I never expected this much support.
rd
Posts: 3474
One point to remember here is PHP doesn't give a damn whether your carriage returns are Unix, Mac, or DOS, regardless of the PHP platform. So the best way to alleviate this issue, IMO, is always FTP everywhere in binary mode. Or at least, that sounds like a good recommendation for "Joe User" who's never going to peek inside any of the code, and just wants to FTP the damn thing up without any hassle. Not perfect, but perhaps a simple "common case" solution?
-Beckett (
)
Posts: 8601
beckett, I agree. Those users who have shell access and are unzipping directly on the server effectively get everything transferred as "binary" anyway.. our README should recommend all ftp operations be done in binary.
Posts: 8
Baschny-
Sorry I disappeared for the past few days. Things were really crazy at work. Anyways I tried quoting everything like Baschny recommened I try. The good news is that it DID work. Bad thing is that I am assuming this is a little bug with G2
So:
Code:
cmd /c " "C:\Inetpub\Apps\ImageMagick\identify"
"C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "
Outputs:
GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01
So now the question is where do we go from here. As a side note I am pretty knowlegeable when it comes to IIS and Windows if there is anything I can do to help the dev of G2 with these platforms let me know. Thanks for all your help so far!
Posts: 328
TomServo9, That's strange, the ImageMagick module works correctly here for me on WinXP and latest ImageMagick (6.1.0 as of today).
What ImageMagick version have you installed? Can you try out the following PHP-script:
Thanks!
Posts: 8
Baschny-
Good news, that php code works. IIS outputs the following:
[output]
Status: 0
Results:
Array
(
[0] => C:\Inetpub\wwwroot\Domain.com\gallery2\modules\imagemagick\classes\..\test\data\test.gif GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01
)
[/output]
Now what? heh
System:
Windows Server 2003 Web Edition
IIS 6
php-4.3.8-Win32.zip (ISAPI)
mysql-4.0.21-win.zip
gallery2-2004-09-24.zip
ImageMagick-6.0.8-Q16-windows-dll.exe
Posts: 3
I have the same problem .... is this a bug ... or is there something else we can do ?
iis5 windows 2000
latest php
thanks
Posts: 3
*bump
Posts: 8
Still no ideas on this problem? Any help is appreciated. Thanks!
Posts: 8601
It's been a while, so let me re-summarize what's going on..
"Test Settings" fails in ImageMagick Site Admin, even though the given path should be valid.
Here is a snippet from the debug output during Test Settings:
baschny suggested a test php file, which TomServo9 tried and it works correctly.
I don't know what's going wrong.. all I can suggest is make the syntax of the test php file match more closely what G2 actually does.. try this:
Post the results and also the contents of the test.out file, if any.
Posts: 8
Well here is my finding. I tried the code and heres what it outputs:
Doesn't really help us too much. I'm willing to try anything else anyone comes up with. Let me know.
Posts: 8601
um, shouldn't that be quite helpful? we know between baschny's test script and mine it went from working to not working.. are you sure there was no output in the test.out file?? I'd hoped for an error message there.
Posts: 8601
TomServo9, a couple things to try:
1) some examples i found via a google search don't have a space after 2>
try removing that space in your test php file, but keep the quotes, so it's
2>"C:\\.....
2) if that still doesn't work, try moving the quote before the 2>..
"2>C:\\.....
Posts: 8
Mindless-
I was just saying that it doesn't help us much because it wasn't more descriptive. I tried the your suggestions but they yielded the same results. This is so frustrating, you know its something simple in the syntax...but what!
Posts: 2
G2 version 10/30 (nightly build)
ImageMagick-6.1.2-Q16
Windows XP
Fresh install and am receiving generally the same thing. ImageMagick is installed in c:\imagemagick and when I hit test I receive
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\identify" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" 2> "C:\galleryimages\tmp\g2dC.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\convert" "-size" "200x200" "-geometry" "200x200" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "C:\galleryimages\tmp\imgD.tmp" 2> "C:\galleryimages\tmp\g2dE.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec(): Unable to fork [cmd /c " "c:\imagemagick\composite" "-geometry" "+0+0" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.jpg" "c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "C:\galleryimages\tmp\imgF.tmp" 2> "C:\galleryimages\tmp\g2d10.tmp" "] in c:\inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
If I copy and paste those exact same command strings into a command prompt I recieve the following output:
For identify:
c:\inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif GIF 50x50 50x50+0+0 PseudoClass 8c 232 0.000u 0:01
For convert and composite:
no output but returns to command prompt
Any progress on finding the problem? Anything you would like me to try?
Posts: 13451
grifter, unable to fork, eh? Tried a spoon? Or a spork?
Well, normally this issue is related to permissions on cmd.exe. You need to give the IUSR_<machinename> user account (the one that IIS 5.1 runs as) read and execute permissions om %systemroot%\system32\cmd.exe
Posts: 328
grifter, take a look at our FAQ, which is currently being maintained in this forum. Its one of the first sticky notes right on top. There should be a step-by-step answer to avoid that non-fork situation.
Posts: 2
Sorry about that :-? I did a search but didn't dig deep enough.
Anyway, up and working now.
Thanks for the quick response and excellent program! :D
Posts: 7
That is a mayor risk, to let a IIS user execute your CMD.
So if you running "Gallery2" on your WINxx platform,
your making it easy for the BAD guys.
Posts: 13451
Gu_Flater, well, thats the design of PHP on Windows, not much we can to about it I'm afraid. The standard exec() calls in PHP, uses cmd.exe (perhaps it uses %ComSpec%, but I'm not 100% certain about that) to run external binaries.
Sadly, there is not much Gallery can do about it.
Posts: 7994
This is also why we're providing the GD module in G2, so that you can use it as a graphics toolkit without having to make exec() calls. See if that works for you instead.
Posts: 7
Thanks, for your altenatieve but then I have to pearse PHP again.
And that is because the Gallery2 say's there is no CD installed.
I have installed CD today because iam concerned about the safety off my board.
Thanks for your support,
Gu.
Posts: 7
%ComSpec% is nice but still who ore with user use the exec.
Its maby posible the let %system% carryout the job.
Gu.
Posts: 7
If there is somthing I can test tell me and I sall try to carry out your request to anproof the Gallery.
Posts: 32509
Gu_Flater, CD? You mean GD, right? And check your last post for typos
Posts: 13451
Gu_Flater, as for how PHP handles executable files on Windows, thats a PHP issue. Gallery just uses standard calls...
Posts: 7
First sorry for my typo's :oops:
but in IIS v6 is it posible to allow "Web service extentions" !
So wat I have done: make simple allowed PHP to use only the Magick exec..
And it works, my CMD.exe is more save now! :wink:
Posts: 13451
Gu_Flater, cool! Glad you got it sorted.
Posts: 32509
maybe we should add this to the FAQ or other platform specific instructions and hints.
Posts: 13451
valiant, sure. I'll see if I can't look into that. I have a Windows 2003 server to play with at work.
Posts: 7
And have u found the option ?
See at my test site its working fine
http://www.gewoonzeeland.dyndns.info/gallery2
Posts: 31
Ok I've tried everything I could think of to get ImageMagick working on OS X 10.3 with Gallery 2.
All the 4 tests fail and it spits this debug info up:
any help?
Posts: 32509
sprynmr, obviously, you haven't installed imagemagick properly.
-> not properly installed.
btw: you can test imagemagick outside G2 too.
When you think you've installed imagemagick correctly, you can open a shell in OSX and try /path/to/convert -h or /path/to/identify -h /change /path/to).
Of course it doesn't suffice to just copy the source code of imagemagick to OSX.
I don't know much about OSX, but you may want to try:
ImageMagick-powerpc-apple-darwin7.8.0.tar.gz download download Mac OS X from http://www.imagemagick.org/script/binary-releases.php .
Posts: 31
Yes that's what I did do. I used the binary release and the commands work just fine from the command line. That's why I thought my problem sounded similar to the one above.
Posts: 5
From the FAQ:
----------------
A: You need to give permissions for IIS to be able to read and execute the command interpreter ("cmd.exe"). Without it, Gallery won't be able to call external executables (like ImageMagick). Required steps:
1. Open a cmd-prompt with "Start", "Execute", then type "cmd.exe". Hit ENTER.
2. At the prompt, type:
Code:
C:\> cacls %COMSPEC% /E /G %COMPUTERNAME%\IUSR_%COMPUTERNAME%:R
This adds the "read" permission to the IIS-user for the cmd.exe. Close the prompt and then try activating the imagemagick module again.
----------------
Posts: 31
I use apache on OS X. I gave up on ImageMagick awhile ago... never could get it to work.