, 5 min read
Comments are back! But you need to pass a reverse Turing test!
6 thoughts on “Comments are back! But you need to pass a reverse Turing test!”
, 5 min read
6 thoughts on “Comments are back! But you need to pass a reverse Turing test!”
Great to see your comments are back! They’re what make blogs more interesting than plain old web pages.
Nice to see you’re using captcha! 🙂
Thanks for your suggestions.
I didn’t want to change the original hn_captcha class. That’s why I used tmp and ttf folders that way. But you’re right:
Some other people have told me about TTF slash and tmp directory.
TTF Folder can be (not tested, but should work) in any directory readable by Apache/PHP, but TMP directory must be inside the apache published directories, because the image is served as a jpg. 😕
I was thinking of showing the image “on the fly” with a php script, so the TMP could be anywhere in the filesystem (and not into the www) or even not necessary at all.
If you’re interested, I will tell you, and again, Thanks. 🙂
I ran into the same problem with ImageMagick, and installed this instead. Nice. Works cleanly. Agree that it would be better if I could use a system TMP directory rather than a WWW accessible one.
Thomas
Ido:
You have to insure your directory structure lies inside a www directory. To get this result, say your web directory is…
/something/HTTP/…
then do
ln -s /something/HTTP /something/www
In your case, your problem seems more complex… for example, it tells me the image is at….
/opt/www/dubrawsky_org/tmp/hn_captcha_075efa.jpg
But I’ve tried the following URLs and can’t find it…
http://www.dubrawsky.org/tmp/hn_captcha_075efa.jpg
http://www.dubrawsky.org/dubrawsky_org/tmp/hn_captcha_075efa.jpg
So, I’m not sure what you are saying when you say that the “the DOCUMENT_ROOT is /opt/www/dubrawsky_org”, if so, the first URL should work. Have you set permissions right?
What exactly did you do to get around the problem with the directory structure? When you go to the URL for my website (http://www.dubrawsky.org) the DOCUMENT_ROOT is /opt/www/dubrawsky_org and captcha doesn’t seem to want to work. I’m interested to know how you got around the problem.
I found the problem. For reasons I don’t know the gd library didn’t get compiled with jpeg support. I actually had to recompile the jpeg library first (it didn’t include the set_jpeg_defaults() function call for some reason), then the gd library, then PHP and re-install PHP and now everything works great. Thanks for the help!