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

Captcha using TTF & GD

Views: 147,342

Results 521 to 540 of 593
2 Jan 2010, 6:15 PM
#521
maska avatar

maska

New Zenner

Join Date:
Jan 2010
Posts:
1
Plugin Contributions:
0

Captcha using TTF & GD

I just wanted to say a big thank you to Andrew and everyone who has posted helpful fixes etc on this thread.

Today I successfully installed this mod, with one minor hiccup that this thread helped me address. In my case the mod accepted any entry as valid on all pages except "create account".

@AmandaGero - I don't know if you have resolved your problem or not but you seem to have the exact opposite of me so I was thinking it might be the same cause. The reason for me was that I had named my old header_php files as header_php_save. I deleted these and now everything works as intended.

22 Feb 2010, 1:20 AM
#522
d1rage5 avatar

d1rage5

Zen Follower

Join Date:
Jan 2008
Location:
Roswell, Ga USA
Posts:
144
Plugin Contributions:
0

Re: Captcha using TTF & GD

1.38a with all security patches

I get this error.
Fatal error: Call to a member function close() on a non-object in /home3/carbsfou/public_html/includes/classes/captcha.php on line 341

get a blank white page on create account or contact us.

If i go to admin and turn off this for the two pages they come up fine (without the captcha of course).

test does not work as well, same error

Any help would be great

25 Feb 2010, 12:14 AM
#523
illusionguy avatar

illusionguy

Zen Follower

Join Date:
May 2007
Posts:
136
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hello everyone,

I am trying to get this module installed, I changed the needed files, added the sql to the database but still no go, it shows up on the create account page, but keeps returning the message: "You did not enter the validation code correctly. Please, try again."

The "captcha_test.php" works great, can someone throw me a bone.

Here is a link to the page: https://www.ecobaba.biz/index.php?main_page=login

1 Mar 2010, 8:07 PM
#524
ajames avatar

ajames

New Zenner

Join Date:
Oct 2006
Posts:
21
Plugin Contributions:
0

Re: Captcha using TTF & GD

I've searched the thead but, alas, no joy.

Have checked proper placement of all Captcha files and cannot find the reason why the text is showing instead og the redraw buttin:
/includes/templates/template_default/buttons/english/BUTTON_IMAGE_CAPTCHA_REDRAW
TITLE_CAPTCHA TEXT_CAPTCHA
The png file is attached

Thanks a pile
AJ

8 Mar 2010, 1:59 PM
#525
sevenhelmets avatar

sevenhelmets

New Zenner

Join Date:
Oct 2009
Location:
Tokyo, Japan
Posts:
52
Plugin Contributions:
0

Re: Captcha using TTF & GD

remoteone:

Ive had Captcha installed for a while now and had noticed on my localhost windoze test machine that I often got an 'incorrect validation code message' for several attempts, even tho the code entered was correct. I have now had complaints from customers that they cannot log in due to the same problem on my Live site.
Ive now disabled CAPTCHA but getting the spambots again.
Any explanation why it works intermittently?

Yep just installed this, and it's happening to me too. Absolutely no idea why, and it would appear Andrew hasn't been checking this forum for a while.

In the interm I've turned it off. Luckily I only need it for the "non user review" page mod, and I can still filter at the admin level for spam, so it's not a biggie.

19 Mar 2010, 2:36 PM
#526
johnchazz avatar

johnchazz

New Zenner

Join Date:
Feb 2010
Location:
Tucson, AZ
Posts:
16
Plugin Contributions:
0

Re: Captcha using TTF & GD

Love this Mod. Running Zen-Cart v1.3.8a with no mod to the Contact Us form. Followed instructions exactly. Works great, with one problem:

In IE8, box is LEFT-justified under "Security Check:".

In Firefox 3.6, box is RIGHT-justified on same line as "Security Check:"

You can see this if you go to my site (using Firefox) at:
http://flairbyjdn.com/catalog/index.php?main_page=contact_us

Anyone else have this same problem? If you're only using IE, I would check your site with Firefox just to be sure you aren't experiencing the same problem I am.

Any ideas?

19 Mar 2010, 2:44 PM
#527
johnchazz avatar

johnchazz

New Zenner

Join Date:
Feb 2010
Location:
Tucson, AZ
Posts:
16
Plugin Contributions:
0

Re: Captcha using TTF & GD

Ignore my replay above - posted to wrong thread by mistake. Argh. :oops:

22 Mar 2010, 11:50 PM
#528
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi. I am using ZC 1.3.8A, with a number of mods, including Captha.

Everything worked fine, until I changed some .htaccess parameters.

I know it's only because of the changes I had made, as when I replace with the old .htaccess file, the Captcha again works 100%.

The .htaccess changes are needed. t I made many changes, however, and I'm wondering if anyone can steer me in the right direction, as far as which change, specifically, did this.

Nothing else on my cart, or the server, seems affected in any kind of negative way by the new .htaccess file.

When using my new .htaccess parameters, instead of displaying the Captcha image, I only see 'Enable This Picture' where the Captcha image should be, and the redraw button at right.

Clicking on that, it looks like the image will be drawn, it shows a rectangle the size of the Captcha block really fast, but then again reverts to the 'Enable This Picture' text.

What I seem to need to find out: How is the Catchpa image generated, as clearly I've disable the ability to do so on my server.

23 Mar 2010, 2:34 PM
#529
orange_juice avatar

orange_juice

Zen Follower

Join Date:
Apr 2009
Location:
Athens, Europe
Posts:
125
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hallo, I would like to ask how I could add captcha verification to be checked by javascript?

My intension is to make certain that if a user inserts the wrong captcha code, the other entries in the form are kept intact instead of being erased and making necessary for the user to enter everything again from the beginning.

Kind regards,
Orange_juice

http://www.dodeca.eu/
Zen Cart is simply Jamming

6 Apr 2010, 3:33 PM
#530
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Re: Captcha using TTF & GD

Donn:

As stated prevoiously...Hi. I am using ZC 1.3.8A, with a number of mods, including Captha.

Everything worked fine, until I changed some .htaccess parameters.

I know it's only because of the changes I had made, as when I replace with the old .htaccess file, the Captcha again works 100%.
.......
When using my new .htaccess parameters, instead of displaying the Captcha image, I only see 'Enable This Picture' where the Captcha image should be, and the redraw button at right.

Clicking on that, it looks like the image will be drawn, it shows a rectangle the size of the Captcha block really fast, but then again reverts to the 'Enable This Picture' text.

What I seem to need to find out: How is the Catchpa image generated, as clearly I've disable the ability to do so on my server.

OK; it was probably a bad idea to leave the cart like that for ANY period of time, but we were concerned about hacks, and in the meantime while securing the site, if someone couldn't log on, then that was OK. Now, I've removed the .htaccess code, and the Captcha STILL isn't working!!!!!!!!!!!!!!! :(:(:(:(:(:(:dontgetit

It's failing as it had been previously, with the new .htaccess changes. I KNOW that removing the new .htaccess code had fixed it instantaneously when I was messing with this, as I even posted that on this thread. (Just in case I am unsure, if I posted it ,I'm certain it was the case!) But now...it's seemingly stuck.

Can any .htaccess parameters stay in effect even after the .htaccess commands are removed???

I'm going to see if it was any of the suggested patches and security upgrades on this board that I installed. It doesn't make sense that it could be that, as changing the .htaccess file from new to old made the Catchpa work and then not work each and every time I tested before leaving the new settings in place.

6 Apr 2010, 6:28 PM
#531
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Re: Captcha using TTF & GD

Running captcha_test.php as a stand-alone PHP file, still the Catchpa image doesn't display. Same as when it's generated on the cart. What does that tell me?? Does that mean it IS a server issue? All files are intact and remain in place; none have any added file length or show a recent modified date.

When I run captcha_debug.php, I get this message:

**Headers already sent in ******/includes/extra_configures/pci_patch_v13x_search.php on line 15 Warning: Cannot modify header information - headers already sent by (output started at *****/includes/extra_configures/pci_patch_v13x_search.php:15) in ********/includes/classes/captcha.php on line 288

Is this possibly because of the patch I applied, and NOT the .htaccess adjustment I had made, as I had thought earlier?
Any help would be **greatly **appreciated.........

7 Apr 2010, 6:23 AM
#532
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Re: Captcha using TTF & GD

When I run captcha_debug.php, I get this message:

**Headers already sent in ******/includes/extra_configures/pci_patch_v13x_search.php on line 15 Warning: Cannot modify header information - headers already sent by (output started at *****/includes/extra_configures/pci_patch_v13x_search.php:15) in ********/includes/classes/captcha.php on line 288

The below code from each of the two files returned in the error message is listed below. So far, I haven't figured anything out on my own with regard to this issue. Does anyone know anything about the patch, and why this might be happening? I don't see the identical commands, but then I'm only a PHP novice, and I'm not familiar with a lot.

Line 287- **********/includes/classes/captcha.php

 if($this->debug) {
      header('Content-Type: text/html');
    } else {
      @header('Content-Transfer-Encoding: binary');
      @header('Content-Disposition:attachment; filename=captcha_img.' . $this->img_type);
      @header('Content-Type: image/' . $this->img_type);
    }

Line 15 ****/includes/extra_configures/pci_patch_v13x_search.php

<?php
if (isset($_GET['keyword']) && $_GET['keyword'] != '')
{
  $count =  substr_count($_GET['keyword'], '"');
  if ($count == 1)
  {
    if(substr(stripslashes(trim($_GET['keyword'])), 0, 1) == '"')
    {
      $_GET['keyword'] .= '"';
    }
  }
  $_GET['keyword'] = stripslashes($_GET['keyword']);
}
7 Apr 2010, 6:46 AM
#533
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

Re: Captcha using TTF & GD

I removed the patch from 27th June 2009, PCI Scans - (patch to handle low-priority warnings on search screen causing scan fail)
/includes/extra_configures/pci_patch_v13x_search.php

http://www.zen-cart.com/forum/showthread.php?t=130701

As soon as I did, the Captcha again resumed working 100%.

I do want the added protection of the patch that keeps certain error messages from appearing and revealing too much, but I also need the Catchpa functionality. :(:(:(

Any solution to this???

7 Apr 2010, 11:06 AM
#534
philmck avatar

philmck

Inactive

Join Date:
Jul 2005
Posts:
33
Plugin Contributions:
0

Re: Captcha using TTF & GD

Most of the problems with this CAPTCHA patch seem to be caused either by extra files that should be removed (e.g. renamed files remaining after a patch) or by extra characters being added to files during editing, for example carriage returns, line feeds or byte order markers. If you read back through this thread (all 54 pages!!!) you'll find a tool for removing invisible characters.

The tool worked for me, but I've since done a clean reinstallation of the whole shop and CAPTCHA then worked without using the tool.

It's definitely very flaky and causing a lot of grief.

I'm not sure if it's the CAPTCHA patch, Zen Cart or PHP that is the problem. Maybe if this CAPTCHA patch were part of the core it would help.

12 May 2010, 6:35 PM
#535
jolion avatar

jolion

New Zenner

Join Date:
Mar 2010
Posts:
21
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi,

:frusty: I hope that someone can give me a helping hand. I have installed the captcha and as far as I've checked it works fine except for the contact us page. When a costumer has forgotten to fill in a field or make a mistake in i.e. the captcha code the page load again with the error messages. But the inquiry field returns emty so the user must type again his message.

I search on the internet for sites with contact page using the captcha and test to see what happen but my problem didn't show there.

I use the original files and have no modifications made to it.

Hope there is somebody out there who can give me a solution.

Thank you in advance!

12 May 2010, 10:17 PM
#536
jolion avatar

jolion

New Zenner

Join Date:
Mar 2010
Posts:
21
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hello orange_juice,

orange_juice:

Hallo, I would like to ask how I could add captcha verification to be checked by javascript?

My intension is to make certain that if a user inserts the wrong captcha code, the other entries in the form are kept intact instead of being erased and making necessary for the user to enter everything again from the beginning.

Kind regards,
Orange_juice

It seems I've the same problem. The inquiry field returns empty when the user push the send button before filling in all the fields.

I was wondering if you solved this problem, and if so, how?

Thanks in advance for your reaction!

20 May 2010, 10:05 PM
#537
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: Captcha using TTF & GD

this is just strange . I installed this mod on 138a , 139a and b with no problem .. i just installed this mod on 139c , file base is working but when i try to install SQL patch using zc sql patch installer . i get this error .

ERROR: Cannot insert configuration_key "" because it already exists

i have gone through everything .. new 139c database has not been altered , this mode is a first one that is adding / modifying this Database .
any clue as what is wrong here ?
previous installation was done on exact same test server with no problem

15 Jun 2010, 4:24 AM
#538
dcitsolutions avatar

dcitsolutions

New Zenner

Join Date:
Apr 2010
Posts:
11
Plugin Contributions:
0

Re: Captcha using TTF & GD

Zen Cart v1.3.9c

Having an issue where after installing this add on I am not getting a validation code showing.

Screenshot:

When I use captcha_debug.php I receive the following :

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

** THERE WAS A WHOLE HEAP OF GIBBERISH HERE THAT LOOKED LIKE WHAT AN IMAGE FILE LOOKS LIKE IF VIEWED IN NOTEPAD - HAVE REMOVED AS IT WAS CAUSING THE POST TO BE TOO LONG - CAN POST SEPERATELY IF REQUIRED **

captcha::__set_state(array(
'captchaCode' => 'CNBIPZ',
'captchaCode_length' => '6',
'img_width' => '180',
'img_height' => '50',
'img_type' => 'png',
'chars_min_size' => '0.6',
'chars_max_size' => '0.8',
'chars_shadow' => true,
'chars_rotation' => '23',
'noise' => 30,
'backgroundColor' =>
array (
0 =>
array (
0 => 220,
1 => 220,
2 => 220,
),
1 =>
array (
0 => 255,
1 => 255,
2 => 255,
),
),
'linesColor' =>
array (
0 =>
array (
0 => 150,
1 => 150,
2 => 150,
),
1 =>
array (
0 => 185,
1 => 185,
2 => 185,
),
),
'textColor' =>
array (
0 =>
array (
0 => 30,
1 => 30,
2 => 30,
),
1 =>
array (
0 => 199,
1 => 199,
2 => 199,
),
),
'dir_fs_fonts' => '/home/www/[site]/fonts/',
'ttf_list' =>
array (
0 => '/home/www/[site]/fonts/VERDANA.TTF',
),
'max_try' => 5,
'failure_proc' => '',
'quality' => 60,
'chars' =>
array (
0 => '1',
1 => '2',
2 => '3',
3 => '4',
4 => '5',
5 => '6',
6 => '7',
7 => '8',
8 => '9',
9 => 'A',
10 => 'B',
11 => 'C',
12 => 'D',
13 => 'E',
14 => 'F',
15 => 'G',
16 => 'H',
17 => 'I',
18 => 'J',
19 => 'K',
20 => 'L',
21 => 'M',
22 => 'N',
23 => 'O',
24 => 'P',
25 => 'Q',
26 => 'R',
27 => 'S',
28 => 'T',
29 => 'U',
30 => 'V',
31 => 'W',
32 => 'X',
33 => 'Y',
34 => 'Z',
),
'_background' => NULL,
'img' => NULL,
'_gd_version' =>
array (
'GD Version' => 'bundled (2.0.28 compatible)',
'FreeType Support' => true,
'FreeType Linkage' => 'with freetype',
'T1Lib Support' => false,
'GIF Read Support' => true,
'GIF Create Support' => true,
'JPG Support' => true,
'PNG Support' => true,
'WBMP Support' => true,
'XPM Support' => true,
'XBM Support' => true,
'JIS-mapped Japanese Font Support' => false,
'version' => '2',
),
'debug' => true,
'img_href' => 'http://[site]/captcha_img.php?zenid=7cjp06ev2cfdi6uhiih4uh8ju7',
'imageColorFunc' => 'imagecolorallocate',
))

Any ideas? Appreciate the help...

15 Jun 2010, 5:45 AM
#539
dcitsolutions avatar

dcitsolutions

New Zenner

Join Date:
Apr 2010
Posts:
11
Plugin Contributions:
0

Re: Captcha using TTF & GD

dcitsolutions:

Zen Cart v1.3.9c

Having an issue where after installing this add on I am not getting a validation code showing.

Screenshot:

When I use captcha_debug.php I receive the following :

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 249

Warning: imagettftext() [function.imagettftext]: Could not read font in /home/www/[site]/includes/classes/captcha.php on line 251

** THERE WAS A WHOLE HEAP OF GIBBERISH HERE THAT LOOKED LIKE WHAT AN IMAGE FILE LOOKS LIKE IF VIEWED IN NOTEPAD - HAVE REMOVED AS IT WAS CAUSING THE POST TO BE TOO LONG - CAN POST SEPERATELY IF REQUIRED **

captcha::__set_state(array(
'captchaCode' => 'CNBIPZ',
'captchaCode_length' => '6',
'img_width' => '180',
'img_height' => '50',
'img_type' => 'png',
'chars_min_size' => '0.6',
'chars_max_size' => '0.8',
'chars_shadow' => true,
'chars_rotation' => '23',
'noise' => 30,
'backgroundColor' =>
array (
0 =>
array (
0 => 220,
1 => 220,
2 => 220,
),
1 =>
array (
0 => 255,
1 => 255,
2 => 255,
),
),
'linesColor' =>
array (
0 =>
array (
0 => 150,
1 => 150,
2 => 150,
),
1 =>
array (
0 => 185,
1 => 185,
2 => 185,
),
),
'textColor' =>
array (
0 =>
array (
0 => 30,
1 => 30,
2 => 30,
),
1 =>
array (
0 => 199,
1 => 199,
2 => 199,
),
),
'dir_fs_fonts' => '/home/www/[site]/fonts/',
'ttf_list' =>
array (
0 => '/home/www/[site]/fonts/VERDANA.TTF',
),
'max_try' => 5,
'failure_proc' => '',
'quality' => 60,
'chars' =>
array (
0 => '1',
1 => '2',
2 => '3',
3 => '4',
4 => '5',
5 => '6',
6 => '7',
7 => '8',
8 => '9',
9 => 'A',
10 => 'B',
11 => 'C',
12 => 'D',
13 => 'E',
14 => 'F',
15 => 'G',
16 => 'H',
17 => 'I',
18 => 'J',
19 => 'K',
20 => 'L',
21 => 'M',
22 => 'N',
23 => 'O',
24 => 'P',
25 => 'Q',
26 => 'R',
27 => 'S',
28 => 'T',
29 => 'U',
30 => 'V',
31 => 'W',
32 => 'X',
33 => 'Y',
34 => 'Z',
),
'_background' => NULL,
'img' => NULL,
'_gd_version' =>
array (
'GD Version' => 'bundled (2.0.28 compatible)',
'FreeType Support' => true,
'FreeType Linkage' => 'with freetype',
'T1Lib Support' => false,
'GIF Read Support' => true,
'GIF Create Support' => true,
'JPG Support' => true,
'PNG Support' => true,
'WBMP Support' => true,
'XPM Support' => true,
'XBM Support' => true,
'JIS-mapped Japanese Font Support' => false,
'version' => '2',
),
'debug' => true,
'img_href' => 'http://[site]/captcha_img.php?zenid=7cjp06ev2cfdi6uhiih4uh8ju7',
'imageColorFunc' => 'imagecolorallocate',
))

Any ideas? Appreciate the help...

Resolved: Corrupt VERDANA.TTF file.

25 Jun 2010, 1:39 AM
#540
dimsumgurl avatar

dimsumgurl

Zen Follower

Join Date:
Dec 2009
Location:
Canada
Posts:
160
Plugin Contributions:
0

Re: Captcha using TTF & GD

schoolboy:

Anyone got ideas on how to get the image to display if (as Dennis points out above) the Customer Approval Status - Authorization Pending or Customer Shop Status - View Shop and Prices are set to 1 (must be authorized to browse) and/or (must login to browse).

I need the restrictions on access, but I ALSO need captcha...

Hello!! I also require help with this too!! This is a frustrating one because I want to limit who can view my products and keep out those bots!

THANK YOU!!!