Forums / All Other Contributions/Addons / Captcha using TTF & GD

Captcha using TTF & GD

Views: 147,342

Results 121 to 140 of 593
11 Apr 2007, 9:52 PM
#121
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Captcha using TTF & GD

Woody!,
Sending you a message as well to make sure you take notice as this might be the solution.

In frustration I started to read this whole thread yet again and came across a post by babygekko.

First post about "glob" didn't work for me but in trying combinations I got it to work (at least more than once, time and continued tests will tell if I'm truly ready to go) on my end.

All I did was:
"...I also had to delete the ob_start() and ob_end_clean() from captcha_img.php. Things work out perfectly right after that." - thanks babygekko!

Give it a shot!

11 Apr 2007, 10:01 PM
#122
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

Sorry dude, in my excitement I didn't read the next post which was yours, looks like you tried that already.

Hopefully this will help others, mine now appears to work even with additional drop down subject line for contact_us page.

11 Apr 2007, 10:54 PM
#123
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

Jeffey:

Sorry dude, in my excitement I didn't read the next post which was yours, looks like you tried that already.

Hopefully this will help others, mine now appears to work even with additional drop down subject line for contact_us page.

Hey jeffey,

Thanks for the follow-up and the PM. Well I tried the suggestion again and it indeed works on the test version:

<?php
/**
 * @version $Id: captcha_img.php v 2.5 23.03.2007 13:11 AndrewBerezin $
 */

// ob_start();
require('includes/application_top.php');
// ob_end_clean();

require(DIR_WS_CLASSES . 'captcha.php');
$captcha = new captcha();

$captcha->generateCaptcha();
?>

I may be wrong but I had understood Andrew repaired this issue in latest mod version and stated that ob_start() and ob_end_clean() were required for security reasons?

Andrew, is this the case? Or is it ok to comment out those two functions?

What's strange to me is that on one account the test version WITHOUT the two lines having commented out, displays the captcha image. But on another account on the exact same host machine, the image will not display without the the two lines above commented out.

I did a google search on "ob_start php" and see lots of issues posted.

Ideas anyone?

Woody

11 Apr 2007, 10:59 PM
#124
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

$###&$**!

I have the same information in my copy (with two pieces I took out missing of course) so it looks like the most recent version.

What is the nature of the security risk?

Everything is working now and I haven't found another mentioned workaround after this was posted by babygekko.

Gotta be better than nothing and given no help has surfaced with all of our posts I think I will be forced to us this as is. Don't know what else to do, it's either that or trash the project.

12 Apr 2007, 9:47 AM
#126
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

Jeffey:

What is the nature of the security risk?

I may have misspoke and Andrew has not commented regards to the real need for:

ob_start();

  • AND -
    ob_end_clean();

In the mean time I also have commented out those two lines and the captcha image is now displaying where it did not before. But don't ask me why as I'm no PHP guru.

Maybe Andrew can fill us in on the purpose/need of those two lines, within the context of the operation of his mod and why those two entries might cause the captcha image to not display.

I'm still trying to wrap my head around application_top.

Thanks again to Andrew for supplying this mod.

Woody

12 Apr 2007, 7:59 PM
#127
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

Second the thanks to Andrew! Despite this hiccup the mod is a great one.

As to a_berezin's comment, thanks. Problem is that the old mod just doesn't provide as much coverage as this mod in addition to making it more readable which, at least for me, has always been my biggest complaint with this feature on any site. Plus, I removed it once, it ain't going back!

Hopefully your mistaken Woody and/or Andrew will pick this up and let us know the potential implications or a slight modification.

Until I hear otherwise I'm following suit with Woody and running without those two lines.

Thanks again to Woody for noodling this through with me and everyone else for the contributions to the thread which eventually lead me to my "solution".

13 Apr 2007, 5:16 AM
#128
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

I regret, but I have lost interest to this.

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Apr 2007, 6:12 AM
#129
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

I hope you've only lost interest in us (who would blame you?) and not the mod!!

13 Apr 2007, 6:20 AM
#130
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Captcha using TTF & GD

Not in you. In this and other mods.

This mod you can download from DL-area.

P.S. I think it is not necessary to discuss it

NOTE: We are sorry that Andrew is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

13 Apr 2007, 6:25 AM
#131
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

Shame.

Not to discuss, just to say thanks for the work. Sorry I bothered you.

13 Apr 2007, 9:50 AM
#132
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Re: Captcha using TTF & GD

a_berezin:

Not in you. In this and other mods.

This mod you can download from DL-area.

P.S. I think it is not necessary to discuss it

Andrew, please tell me you're not ditching Zen Cart altogether. I am getting concern that lately you've been detaching yourself from all the GREAT mods that you've provided for this community. Is there anything specific you have issues with as of late on this forum?

It would be a shame to lose you here.

26 Apr 2007, 8:53 PM
#133
oxicottin avatar

oxicottin

Zen Follower

Join Date:
Aug 2006
Location:
West Virginia
Posts:
320
Plugin Contributions:
0

Re: Captcha using TTF & GD

Anyone have the reasent download for this?

Thanks,
Chad

26 Apr 2007, 8:58 PM
#134
oxicottin avatar

oxicottin

Zen Follower

Join Date:
Aug 2006
Location:
West Virginia
Posts:
320
Plugin Contributions:
0

Re: Captcha using TTF & GD

Sorry download is working now!!!!! Does this work with the 1.3.7?

26 Apr 2007, 11:40 PM
#135
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Captcha using TTF & GD

It does indeed work with 1.3.7 though some, including myself, have had a few bumps. My solution was #121 in this post for potential future reference.

Mine is working great.

Its a great add and you should definitely give it a shot.

26 Apr 2007, 11:52 PM
#136
oxicottin avatar

oxicottin

Zen Follower

Join Date:
Aug 2006
Location:
West Virginia
Posts:
320
Plugin Contributions:
0

Re: Captcha using TTF & GD

I uploaded the files then installed the sql patch went to my login page and got an error. it said something like I needed to install GD and my screen was completly what except for that writing. I have no clue how to use this?

Thanks,
Chad

27 Apr 2007, 12:06 AM
#137
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

oxicottin:

Does this work with the 1.3.7?

Indeed it does.

You may need to remove two "ob_" (output buffer) related statements from captcha_img.php. See some of my recent posts in this thread on that subject.

And hooray, Andrew is back!

Woody

27 Apr 2007, 12:14 AM
#138
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

oxicottin:

I uploaded the files then installed the sql patch went to my login page and got an error. it said something like I needed to install GD and my screen was completly what except for that writing. I have no clue how to use this?

Chad-

You definitely need GD installed. In Admin go to Tools >Server/Version Info.
Should tell if GD is installed and which version. If you are not certain ask your host. GD is provided by almost all webhosts these days. If yours won't install then I advise a move to another hosting provider. I'm sure you will likely find other uses for GD. For one the Zen Cart Image Handler 2 mod needs GD, a mod I could not do without.

Woody

27 Apr 2007, 12:17 AM
#139
oxicottin avatar

oxicottin

Zen Follower

Join Date:
Aug 2006
Location:
West Virginia
Posts:
320
Plugin Contributions:
0

Re: Captcha using TTF & GD

its on my test server at home. What is GD? this way I can get it installed on my Server.

Thanks,
Chad

27 Apr 2007, 12:30 AM
#140
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Captcha using TTF & GD

oxicottin:

its on my test server at home. What is GD? this way I can get it installed on my Server.

It's amazing what a simple Google Search will do.

GD Graphics Library
What is the GD library? GD is an open source code library for the dynamic creation of images by programmers.
http://www.libgd.org/

This link may of be of significance:
http://www.libgd.org/FAQ_PHP

Good luck,
Woody