|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Ok, I searched this time, and got 8 pages of threads, mostly around why captcha was non compliant for blind people. I sure as heck hope there is an option in the advanced search, next time I look, to ignore replies on the same thread. ANYHOW... Trying to get ImageMagick to throw me the CAPTCHA stuff. All I get is the red X. Paths are in as c:\ImageMagick\convert.exe and mogrify.exe. Have done nothing to php yet, do I need to? I see no sign of that, and there is nothing in the docs anywhere. Ideas?
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
First thing would be to make sure that it is ImageMagick6 that you have installed and not 5. You don't need to do any PHP changes for ImageMagick to work, but you do need to make sure that PHP has the permission to use the exec() function.
A quick way to test if it's setup properly, is to call it directly. When you're logged in as an admin, bring up this page:
ubbthreads.php?ubb=captcha&t=im&test=1
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
I believe you need to point to the imagemagick .exe file in your php.ini as well, eh? ugh, it's been too long since I ran IIS - I need to set it up on my home computer
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
I don't think so Allen. The way we're doing it, we just call the convert.exe via exec() so we're actually executing the convert.exe, so php shouldn't need to know anything about it.
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Ok, test run, and all I get is a blank screen, with a red X on an image. Looked for any reference to exec() in the php.ini and can find none. v6.3.3.6 is the file version of convert.exe. I had it working before, for a photogallery online, and just installed the latest version, prior to installing threads. (trying to avoid problems, not create them)
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Just did the quick check based on IM6's text files, and it converted and displayed a file for me...
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Hmm, one last check, and we might need a support ticket for this. Can you check and make sure that your cache directory is writeable. ImageMagick tries to write to this directory to temporarily store the image that it created.
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Yup, and there's about 20 files in there right now. (various php files)
is there any other way to quickly script a php test of imagemagick?
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Something like this should work to test. If it runs into a problem it should output the error, however this doesn't appear to always be the case. This script works for me, but if I make the path bad it doesn't show any error on my windows test box for some reason.
<?
$output = exec("C:/path/to/convert.exe -background lightblue -fill blue -pointsize 30 label:test C:/Path/to/a/writeable/directory/test.gif",$error);
if (sizeof($error) {
echo "Error is " implode(' ',$error);
} // end if
?>
You'll want to change the paths above. Both to the convert.exe executable, and also to where it will output the test.gif file, it must be a writeable directory.
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Had to edit a bit to get it to run, but can't get past this syntax error... and I'm stuck.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\Inetpub\ca.dsm.org\forums\test.php on line 6
<?php
$output = exec("C:\imagemagick\convert.exe -background lightblue -fill blue -pointsize 30 label:test C:\inetpub\ca.dsm.org\forums\cache\test.gif",$error);
if (sizeof($error)) { echo "Error is " implode(' ',$error); } // end if
?>
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
Whoops, copied the wrong one. There is a . missing on that line. It should be:
echo "Error is " . implode(' ',$error);
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Warning: exec() [function.exec]: Unable to fork [C:\imagemagick\convert.exe -background lightblue -fill blue -pointsize 30 label:test C:\inetpub\ca.dsm.org\forums\cache est.gif] in C:\Inetpub\ca.dsm.org\forums\test.php on line 3 That help any?
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
Ok, I searched this time, and got 8 pages of threads, mostly around why captcha was non compliant for blind people. Not auditory yet, so blind people must contact an admin to register an account (which is Section508 compliant, reguardless of how much they complain). GMail has a nifty auditory reader though I must say
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
I assume section 508 is some law in the USA? My point, and cheapshot I admit, was around the search function... so maybe I should take that to a new thread. Still need help with this Captcha thing, when the west coast rises.
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
The unable to fork sounds like IIS doesn't have permission to read/execute the convert.exe program. At least that's what came up on the google search I jsut did.
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
Ok, PROBLEM FIXED. And, for the record, here's the solution. It would indeed appear that permissions are the problem. But, giving the IUSR account read & execute permissions on ImageMagick directory, didn't make any diff. You were on the right track though... found a Gallery system posting elsewhere that said in order for the exec function to work, you need to give read and exec to the cmd.exe located in the system32 directory. Did that, and it works. Removed read & exec from ImageMagick dir, and it still works. So, looks like cmd.exe is the culprit. Maybe when you guys write the docs for Captcha you can include this? Thanks!
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I assume section 508 is some law in the USA? It more focuses to the US Government websites; but it's a good basis of how to set things up for any site as if you can cater to their anal retentive standings that it'll be well sufficient for any site (let alone those which are being whined about with impaired users and them claiming you're excluding them from your site, which can arise many issues with local established sites). You can read the Wikipedia entry here
|
|
|
|
Joined: Apr 2007
Posts: 120
member
|
member
Joined: Apr 2007
Posts: 120 |
hehehe thanks, but I'm not in the US of A, so I'll just keep offending the blind for now.
...usin' da classic UBB, since the beginning of time.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I'll just keep offending the blind for now. Lol wasn't implying you where, was just showing why/how some are whining about it ... Some countries actually make it more than governmental pages; I think Canada is actually one of them, you may want to check it out
|
|
|
|
Joined: Jun 2006
Posts: 464 Likes: 1
Addict
|
Addict
Joined: Jun 2006
Posts: 464 Likes: 1 |
I just use GD2.. seems to work great without the extra overhead..
Happy Customer !!!
|
|
|
|
Joined: Jun 2006
Posts: 464 Likes: 1
Addict
|
Addict
Joined: Jun 2006
Posts: 464 Likes: 1 |
The unable to fork sounds like IIS doesn't have permission to read/execute the convert.exe program. At least that's what came up on the google search I jsut did. You will probably need to add the .exe to cgi permissions for IIS 6..
Happy Customer !!!
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
I haven't noticed any overhead with IM, and I've been using it for many things for years; i do rather enjoy the additional color depth IM gives as well
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I'm having this same issue. Can you explain this in more detail? (the part about You will probably need to add the .exe to cgi permissions for IIS 6.. )
Last edited by BellaOnline; 08/05/2007 5:16 PM.
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
"You were on the right track though... found a Gallery system posting elsewhere that said in order for the exec function to work, you need to give read and exec to the cmd.exe located in the system32 directory."
Isn't this a *huge* security issue, though? Giving them access to running commands?
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
Yes it is. CMD.EXE would then be able to run ANY COMMAND on the system with the same rights given. I would highly suggest you not do that.
I will try to research this further in the coming week if you don't find a better solution by then.
|
|
|
|
Joined: Jun 2006
Posts: 464 Likes: 1
Addict
|
Addict
Joined: Jun 2006
Posts: 464 Likes: 1 |
I use GD2 and it works perfectly on IIS6
Happy Customer !!!
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Napalm),
806
guests, and
165
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|