Author Topic: Captcha not working...  (Read 17157 times)

0 Members and 1 Guest are viewing this topic.

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Captcha not working...
« on: July 31, 2006, 02:20:58 PM »
I did a fresh install of 1.7.3 and I can not get the captcha to work.
all it shows in a small red x where the image should be.

The error log reads...
Could not find/open font in c:\phpdev\www\budduke\includes\captcha_utils.php on line 168

This is a fresh install with no mods added to it..
I am using the GD2 library (I think) Saw that answer in other post...
I have no problems creating thumbnails using it in the settings. Autothumbnails works just fine using GD.

Thanks for any help or sugestions
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #1 on: July 31, 2006, 07:40:13 PM »
Could not find/open font in c:\phpdev\www\budduke\includes\captcha_utils.php on line 168
Did you upload the fonts into includes/captcha/fonts/?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #2 on: August 01, 2006, 12:36:21 AM »
I tried that, did not make any difference. I even went further and placed copies of the fonts all over the place.
The default install has them in the captcha/fonts folder. I tried making an images folder and putting them in there.

I even copied them to the php folder outside of my site in the includes folder

still nothing...
if you need more info about my system it is running on.
I placed the phpinfo at this link..
http://www.budduke.com/test/phpinfo.htm

That is the site that I will be hopefully be moving over to your 4images, but I wanted to stop the spammers first. Was working on my own hack for captcha but yours looked better if I could get it to work. I have already shut down my guestbook because of spammers so I hope someone can get this working

PS: I am running this on a local computer at home and not an actual webserver if that helps any.
I used the phpdev package for the entire PHP/SQL/APACHE server install and it looked like it had GD library already in it. It at least worked when making thumbnails unless you think I need a different version of the GD library.

THanks for a great product and all your support.
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #3 on: August 01, 2006, 01:37:15 AM »
Ok, then, lets try to debug.
In includes/captcha_utils.php above
Code: [Select]
function captcha_validate($code) {Insert this:
Code: [Select]
die(captcha_get_font());
It should show the path to the font file (if any). see if its correct.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #4 on: August 01, 2006, 02:24:59 AM »
The responce I got from that command was...
./captcha/fonts/ariblk.ttf

This link is my directory structure showing all the places I tried putting the fonts...
http://www.budduke.com/test/directory.htm

PS: I have a wallpaper template installed but not running. I am using the default one that came with the download...
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #5 on: August 01, 2006, 03:13:58 AM »
Ok, next step, replce
Code: [Select]
  return $files[$font];
With:
Code: [Select]
  return realpath($files[$font]);
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #6 on: August 01, 2006, 03:48:07 AM »
Still no good...
I did not see where it gave me any information to give back to you...
The error log is the same and there wasn't any information in my browser screen to give you...
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #7 on: August 01, 2006, 04:15:47 AM »
Ok then, add the "debug" line that shows on screen the path...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #8 on: August 01, 2006, 04:21:36 AM »
The response was...
c:\phpdev\www\budduke\captcha\fonts\comic.ttf

That is the exact folder and the file is there....
?????
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #9 on: August 01, 2006, 07:53:32 AM »
alright, next attepmt.
try to replace
Code: [Select]
return realpath($files[$font]);with:
Code: [Select]
return addslashes(realpath($files[$font]));
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #10 on: August 01, 2006, 12:23:07 PM »
response...
c:\\phpdev\\www\\budduke\\captcha\\fonts\\arial.ttf

still get same problem...
Buddy Duke
www.budduke.com

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #11 on: August 01, 2006, 04:03:19 PM »
1) just to clarify, hope you do realize that you must remove the very first change I've asked you to do that displays the path to the font when you are testing the script...(after you saw the path)
2) this is very wierd problem, cause if it would be UNIX based server, it would be 50-50 chance that its permissions issue or a bug in PHP/GD itself...but, since its windows system the problem with permissions would be unlikely...

Anyways, revert all the changes you've made to that file, then replace
Code: [Select]
  return $files[$font];
with:
Code: [Select]
  putenv('GDFONTPATH=' . realpath($captcha_path.'/fonts'));
  return get_file_name($files[$font]);

If that wont help, then try to upgrade to lattest PHP version.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline budduke

  • Hero Member
  • *****
  • Posts: 506
    • View Profile
    • http://www.budduke.com
Re: Captcha not working...
« Reply #12 on: August 01, 2006, 11:52:18 PM »
 :P

That line of code is what I needed. It is working now...
Thank you again for all your time and effort...

I check with my provider to see what version they are running 4.3.11
So I may not even see the problem when I upload it to the server...

What A Great product and the support is outstanding!
Buddy Duke
www.budduke.com

Offline oleg24

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: Captcha not working...
« Reply #13 on: August 21, 2006, 09:48:30 PM »
Try to use this captcha service instaed. Copy past and it works. audio support, reload button, customization etc.
Works for me fine

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Captcha not working...
« Reply #14 on: August 22, 2006, 06:58:40 AM »
what captcha service?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)