|
Joined: Mar 2007
Posts: 26
journeyman
|
journeyman
Joined: Mar 2007
Posts: 26 |
I am interested in setting up the CAPTCHA verification, but since I am a UBB and PHP n00b, I am kinda lost. Do I need a special lib for this? Is it free or licensed? I am running win32, if that makes a difference
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
There are 2 ways to run CAPTCHA. The first would be with GD2. If you look at your phpinfo section in the control panel, if you see gd2 and freetype in the list, then you could use that. The second is imagemagick. This requires imagemagick 6 which is a free download. And you'd just specify the path to the convert and mogrify programs in the paths section of the control panel.
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I have installed imagemagick and their test verifies that it's working properly. However no version of the path in the two path fields is getting the images to show up properly. They only show up as red (broken) Xs on the logon screen. I am being *innundated* with spammers and need to figure this out. What exactly does a valid path look like?
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I'm on Windows by the way. I've tried every version I can think of of
c:\Program Files\ImageMagick-6.3.3-Q8\convert.exe
and
c:\Program Files\ImageMagick-6.3.3-Q8\mogrify.exe
with slashes going left, going right, having the program name, just having the directory name, etc.
Also, when I view source, the /images/general/default/wait.gif that it's trying to show on refreshes really doesn't exist in that directory ...
...
OK I'm piecing this together. There was a wait.gif in the downloaded 7.1 set that wasn't in my live set, so I copied that in. I was also missing the CAPTCHA directory in my images directory. What else should I check for?
I've looked in the cache folder, and there are no images being generated in there ...
There are lots of entries in the captcha database table, so it's trying to make them ...
Last edited by BellaOnline; 03/22/2007 5:29 AM.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Are you using IIS or Apache? I ask because some webservers don't like \, instead try: c:/Program Files/ImageMagick-6.3.3-Q8/convert.exe c:/Program Files/ImageMagick-6.3.3-Q8/mogrify.exe
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
Windows IIS - I have tried both back slashes and forward slashes, and neither works. I went into the raw code and then in a CMD window typed in the string it was forming. It actually failed because of the space in program files. However when I moved down into the imagemagick directory and typed the command starting just with the convert command, with all the 'stuff' that came after it, it did make a gif file for me. So the syntax and program seem fine. I wonder if it really is the program files space jamming it - or if something else is going on. Like I said the random number is being written into the database, so it is trying to do something
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
AHA!!!!! Just to test the space theory, I reinstalled ImageMagick in a directory just called C:\imagem - and it WORKED!!!! Good God, that was 4 hours of my life wasted
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
lol I was actually going to tell you to put %20 as the space character; but yours works too! lol
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
just 4? oh just you wait... lol
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
It's 4 hrs on this one - but if you look back through the forums, I was out in Ukraine when my entire forum server went down, and I had to spend days dialed in from rural Urkaine rebuilding it from scratch. Then recently when I was down in New Orleans doing a charity visit, the other forums I run crashed, and I had to completely rebuild and port and upgrade the servers from there. So I have had my fair share of longer-than-four-hour agony ...
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
But in any case, I do think the software should be able to handle a space in the directory name, since that was the default directory the software installed to ...
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
lol; sounds like you need to hire a tech when you go out of towne ... I was up doing dev work on one clients site for like 3 days... though it was in my benefit when paytime came aruond lol
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I don't have any techs or employees - there is only me running my websites So I'm on call 24 hrs a day! On the other hand, there aren't any of the scary employee hassles or security issues!
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Hence the "hire a" vs "Assign a" ... lol, I like disaster recovery, makes me feel special and gives me something to do :x
|
|
|
|
Joined: Jun 2006
Posts: 626
Addict
|
Addict
Joined: Jun 2006
Posts: 626 |
I am trying to use CAPTCHA without any success. This is what shows in phpinfo: gd GD Support enabled GD Version bundled (2.0.15 compatible) FreeType Support enabled FreeType Linkage with freetype GIF Read Support enabled JPG Support enabled PNG Support enabled WBMP Support enabled XBM Support enabled Should it work with the above information? In the forum itself where I am testing this, I see where I should type in the information, however, all I see is an image box with an X in the middle.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
If GD2 is working properly, you can test it by going to the following URL, when logged in as an admin: http://www.yourdomain.com/ubbthreads.php?ubb=captcha&type=gd&test=1If this comes up with a valid image, then GD2 is working as intended.
|
|
|
|
Joined: Jun 2006
Posts: 626
Addict
|
Addict
Joined: Jun 2006
Posts: 626 |
No image.
Only a blank screen.
Any idea why it isn't working?
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
BTW, I had a lot of problems even getting GD to work with mine, it was being very fickle... I still say the CAPTCHA should have been ImageMagick/NetBPM and GD included as a courtesy :x...
|
|
|
|
Joined: Jun 2006
Posts: 626
Addict
|
Addict
Joined: Jun 2006
Posts: 626 |
In that case, there must be some type of a bug here somewhere.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Actually it was a server issue; I don't recall how i fixed it
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
When you upgraded from 7.0.x did you upload the new captcha directory inside the images directory?
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
I want to update that CAPTCHA is working fine now on our system - but that our Sight Loss editor is having a *fit* and threatening to report us and all UBB forum runners to her various blind organizations as being Pure Evil. She says it is very discriminatory for us to have a system that you have to be able to see to use. She is apparently about to mobilize against us.
Is there any hope of having an option that maybe uses a library of words - and then has a library of audio files to match with that? Rather than random letters?
Our influx of spam has dropped to pretty much zero after we added CAPTCHA in - which helps blind people as well as seeing people - so I really can't take that step away ...
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
What she is referencing is Section 508 compliance; whereby if you offer a public service you must also cater to "visually impared users"; what you can take and do is have a contact page which users can sign up through as well and you'll be complaint.
You could additionally recommend that visually impared users utilize a screen magnifier, but that only helps with users who have some sense of sight.
My suggestion for this in the future is to have an auditory captcha, so that users who cannot *SEE* the text, can still *hear* it.
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
Yes we have a contact link but she says it isn't enough. She says we should be able to have the word spoken aloud - or the letters. The system right now randomly generates letters so that would be tough, to string together the six letters in an audio file for the user to hear. If it instead chose from a random list of words, and then used the matching audio word to go with whatever word it chose, then that would meet her needs and not be *too* tricky I would think ...
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
So long as you provide an alternative means of registration to disabled users (as in contacting an admin) you are section 508 compliant.
|
|
|
|
Joined: Jun 2006
Posts: 693
Addict
|
Addict
Joined: Jun 2006
Posts: 693 |
Oh, I agree I'm compliant. I'm just saying that this editor - who apparently is about to become president of the largest "blindness" organization in the US, is livid that there has to be a manual contact option. So it is probably in all of our best interest if we find an automated (i.e. spoken) alternative.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
I'm completely for expanding the captcha abilities; hell, I'll even lend my voice if it'd get it done :x... I myself cannot wait to see when this can happen as it's something i find rather interesting
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
I got GD2 to work on my site, but I can't get ImageMagick to work.
I verified the correct ImageMagick paths with my host for: Path To Convert: Path To Mogrify:
Instead of an image, I just get this text on the registration page: CAPTCHA Image
Any ideas?
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
What are the paths that you've entered? You'll want to make sure that if they're installed in say: /usr/lib
That you're linking to the files themselves: /usr/lib/convert /usr/lib/morgify
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
I'm using these, which came directly from my host in an email: Path To Convert: /usr/bin/convert Path To Mogrify: /usr/bin/mogrify
I also tried: /usr/lib/convert /usr/lib/mogrify
Could it be a permissions issue on one of my directories?
Everything seems to be functioning fine on my board, but I do get some "fail" readings when I check permissions in CP. What directory would effect the Captcha image?
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
On some systems you'll get some error info if you go to the following URL while logged in as an admin:
ubbthreads.php?ubb=captcha&type=im&test=1
The only permissions that matter to the captcha images would be the cache directory as that's where it writes the temporary image.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Was hoping you'd read this one, i forgot the location of the captcha/gd test page :x
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
Rick, if I go to that test URL with GD2 enabled, I see the image fine.
However, if I go there with ImageMagick enabled, I get this text: exec() is not available.
I checked permissions on my cache directory. It, along with all files within the directory, are OK.
Any thoughts? Thanks.
|
|
|
|
Joined: Jun 2006
Posts: 16,369 Likes: 126
|
Joined: Jun 2006
Posts: 16,369 Likes: 126 |
Looks like your webhost doesn't allow usage of the php exec command, which would stop webscripts from using it to utlilze utilities on the server (in this case, the ubb accessing the installed convert/morgify file)
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
Thanks, I'll contact them about it.
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
This is what my host said: "Can you send link to the file in question please make sure you're not trying to run php scripts from within the cgi-bin directory."
What would be the link I should send to help them out?
Thanks
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
In order for them to test it, they'd need admin access, maybe create a temp admin login for them and give them the test link.
Basically, the script just checks to see if the exec() function is available to php. I think they are thinking that the script itself is trying to be executed like a cgi script.
|
|
|
|
Joined: Jun 2006
Posts: 811
old hand
|
old hand
Joined: Jun 2006
Posts: 811 |
Thanks Rick, I will do that.
|
|
|
2 members (Ruben, Gizmo),
1,144
guests, and
120
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|