Previous Thread
Next Thread
Print Thread
Hop To
Joined: Apr 2007
Posts: 120
A
member
member
A Offline
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. smile

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.
wink
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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 smile


- Allen
- ThreadsDev | PraiseCafe
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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
A
member
member
A Offline
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)

smile


...usin' da classic UBB, since the beginning of time.
wink
Joined: Apr 2007
Posts: 120
A
member
member
A Offline
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.
wink
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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
A
member
member
A Offline
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.
wink
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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.

Code
<?

$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
A
member
member
A Offline
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.
wink
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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
A
member
member
A Offline
Joined: Apr 2007
Posts: 120
Quote
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.
wink
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Originally Posted by Andrew Bienhaus
Ok, I searched this time, and got 8 pages of threads, mostly around why captcha was non compliant for blind people. smile
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 wink


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Apr 2007
Posts: 120
A
member
member
A Offline
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. smile


...usin' da classic UBB, since the beginning of time.
wink
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
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
A
member
member
A Offline
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? smile

Thanks!


...usin' da classic UBB, since the beginning of time.
wink
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Originally Posted by Andrew Bienhaus
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


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Apr 2007
Posts: 120
A
member
member
A Offline
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. wink


...usin' da classic UBB, since the beginning of time.
wink
Joined: Jun 2006
Posts: 16,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
Likes: 116
Originally Posted by Andrew Bienhaus
I'll just keep offending the blind for now. wink
Lol wasn't implying you where, was just showing why/how some are whining about it wink...

Some countries actually make it more than governmental pages; I think Canada is actually one of them, you may want to check it out


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Jun 2006
Posts: 464
Likes: 1
M
Addict
Addict
M Offline
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
M
Addict
Addict
M Offline
Joined: Jun 2006
Posts: 464
Likes: 1
Originally Posted by Rick
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,292
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,292
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 wink


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
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.

Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
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?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
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
M
Addict
Addict
M Offline
Joined: Jun 2006
Posts: 464
Likes: 1
I use GD2 and it works perfectly on IIS6


Happy Customer !!!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
spam issues
by ECNet - 03/19/2024 11:45 PM
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Who's Online Now
0 members (), 744 guests, and 147 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)