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

Captcha using TTF & GD

Views: 147,342

Results 481 to 500 of 593
30 Apr 2009, 10:18 PM
#481
missesbeehaven avatar

missesbeehaven

New Zenner

Join Date:
Apr 2009
Posts:
57
Plugin Contributions:
0

Captcha using TTF & GD

awhfy99:

My best guess (don't think it would actually qualify as help though):

Since line 341 in the classes/captcha.php is

function _get_gd_version() {

I am led to believe that gd library is not either installed on your server, is broken, or some parameter has been changed.

Most hosts will let their users see that info, so if you can verify that gd lib is there, and if it is, then I would check with your host. They may have done an upgrade and haven't tweaked it yet.

If anyone has a better suggestion, please let us know!

Got things sorted out thanks for the help. Turns out that the Admin Profile mod I have installed was the cause. I had to change my admin user permissions and tick the CAPTCHA box and all was good after that. Thanks again for the help.

Melanie
beehavendesignz DOT com

2 May 2009, 3:50 PM
#482
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Captcha using TTF & GD

awhfy99:

Haven't seen this mentioned anywhere so I thought I would see if it had a solution. The captcha doesn't display the code (it's a broken image link) if either 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). Seems to work on any of the other settings.

I did think of a use for that broken link.

If you only want the add customer through admin to be used to create an account, then either of those will definately stop them in their tracks! Actually, a pixel_trans.gif renamed to button_create_account.gif works better, but why be picky?

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...

20 years a Zencart User

10 May 2009, 4:53 PM
#483
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Captcha using TTF & GD

I had this up and running fine for about a month and did not add or remove any other mod since then. And now all of a sudden I notice the images no longer appear. I have a new computer with all the latest browsers and it's the same problem in all.

I deleted all the Captcha files and uninstalled the SQL patch and then re-loaded everything and copied in the install.sql. And the problem persists. I don't know what else to try and didn't see a similar issue in the forum.

My only suspicion is that the image source seems to be on the secure server, https. (I saw this by copying the source of the blank image space.)

Does that mean anything? Any help would be appreciated.

alexandergifts.ca
ZC 1.38a

Cheers,

Robbie

11 May 2009, 9:32 AM
#484
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

Check php-scripts in the presence of extra lines and spaces.
Take this script, unzip it, upload it to a root directory and running it.

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

11 May 2009, 1:37 PM
#485
giftmeister avatar

giftmeister

Zen Follower

Join Date:
Jan 2009
Location:
Montreal, Canada
Posts:
230
Plugin Contributions:
0

Re: Captcha using TTF & GD

That worked!! It found 8 with space at the bottom, I adjusted them myself, it still showed 3 with space and then I used the built-in fixer.

Thanks a lot!

R

30 May 2009, 7:22 PM
#486
philmck avatar

philmck

Inactive

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

Re: Captcha using TTF & GD

I've installed captcha_ttf v2.9 on a fairly basic zen-cart 1.3.8a installation and it almost works, except the image is always blank.

I've read through this thread (49 pages!) and I see lots of other people with the same problem, but none of the solutions work for me.

I've tried removing all backup files, disabling .htaccess temporarily (I'm not using SEO or any other mods), disabling SSL temporarily, checking for extra lines and spaces, checking that the fonts file is found and so on. There are no errors in the log. I'm on PHP v5.2.6 (Zend 2.2.0) in "apache" mode.

There's one interesting thing I don't understand - if I run captcha_test.php then right-click on the blank image and view it using IrfanView (for example) I can see the image. But that only works in jpeg mode - in png or gif mode I get "invalid header". The image never displays in firefox or IE (latest versions).

My captcha_test with the above symptoms can be seen at http://skeptic.org.uk/inquirer/captcha_test.php if that helps. (The captcha in the main store is disabled for obvious reasons.)

Phil McKerracher
https://www.mckerracher.net

31 May 2009, 1:05 PM
#487
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

Yes, you have a bad header in the image file. Some files have a BOM - find and remove it.

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

1 Jun 2009, 11:14 AM
#488
philmck avatar

philmck

Inactive

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

Re: Captcha using TTF & GD

a_berezin:

Yes, you have a bad header in the image file. Some files have a BOM - find and remove it.
Hmm. The image file is purely generated by the script though, isn't it? So how can I stop the script doing this? I can't see any BOM in any of the source files, but it's possible the editor is hiding it.

I thought it might be a UTF-8 issue, but I couldn't find any setting for charset in Zen-Cart. Am I missing it?

1 Jun 2009, 11:48 AM
#489
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

philmck:

I can't see any BOM in any of the source files, but it's possible the editor is hiding it.
Yes, the editor is hiding it. Use my script to find the bad files.

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

2 Jun 2009, 11:21 AM
#490
philmck avatar

philmck

Inactive

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

Re: Captcha using TTF & GD

Aha! That has fixed it, many thanks. I had run your script but hadn't realised the BOMs had to be removed (as well as blank space).

Does anyone have suggestions to avoid this problem affecting people in future?

(Also, how did the BOMs get there in the first place, and why do they only affect the captcha script?)

Also, what is the "built-in fixer" that giftmeister refers to?

15 Jun 2009, 8:43 PM
#491
anworks avatar

anworks

New Zenner

Join Date:
Dec 2007
Posts:
19
Plugin Contributions:
0

Re: Captcha using TTF & GD

I have no idea what is going on but I cant get this thing to pull the fonts file. It just displays small text. I guess its no big deal because it works but its pretty hard to read. I have been searching the forums all day with no luck. Any help is appreciated.

http://palmettomattress.com/index.php?main_page=product_reviews_write&cPath=5&products_id=66&number_of_uploads=0

8 Jul 2009, 12:22 AM
#492
ethical avatar

ethical

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: Captcha using TTF & GD

I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?

Thanks!

John

8 Jul 2009, 9:52 AM
#493
worldmaker avatar

worldmaker

Zen Follower

Join Date:
Jul 2006
Location:
Manchester
Posts:
139
Plugin Contributions:
0

Re: Captcha using TTF & GD

ethical:

I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?

Thanks!

John

Keep digging for the answer I'm sure it is possible, but it's been so long since I came on the answer that I can't remember where I found it.

:blush:

"Why dumb down when we can rise up?" Worldmaker / BonDevZone Store

8 Jul 2009, 3:29 PM
#494
philmck avatar

philmck

Inactive

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

Re: Captcha using TTF & GD

ethical:

I've read the first few pages but did not see my question answered, is it possible to ONLY do the captcha on the contact and tell a friend forms, not the regsitration or others?Yes, in admin/configuration/CAPTCHA set the "Contact us page" and "Tell A Friend page" options to true.

14 Jul 2009, 2:16 AM
#495
remoteone avatar

remoteone

Zen Follower

Join Date:
Jan 2009
Location:
Macclesfield, South Australia
Posts:
104
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hmmm..:frusty:
Ive installed the "Captcha using TTF & GD" module on my Windows LocalHost test machine. Alas.. she no worky.
I followed instructions explicitly, but my site will not show the images on the validation pages ! ReDraw dont help.
My cart uses PHP 5. with database prefix"zcprefix_" (not the actual name).
Ive installed the SQL seq as per instruction.
Attached image ... contact_Us example

The Log-In page shows no CAPTCHA data at all.
All admin>CAPTCHA options are set to true as installed.

Can anyone please help? I have big problems with SPAMBots and MUST fix this asap !
Is my prefix causing sql problems, I changed nothing in install.sql ?
Cheers

The Poor Pay Twice.........remoteone.com.au

14 Jul 2009, 2:40 AM
#496
remoteone avatar

remoteone

Zen Follower

Join Date:
Jan 2009
Location:
Macclesfield, South Australia
Posts:
104
Plugin Contributions:
0

Re: Captcha using TTF & GD

I may have not followed instructions properly...
It looks like there are 8 files I need to edit ????? !!!
I assumed that these files did not need to be edited as the my existing files are all unchanged from the original install.
Do I still need to edit these files?:shocking:

remoteone:

Install:

  1. BACKUP! BACKUP! BACKUP! BACKUP! BACKUP! BACKUP!
  2. Unzip and upload all new files to your store directory;
  3. EDIT:
    Use applied files as a sample. All changes of a code are made in brackets
    // BOF CAPTCHA
    ... code ...
    // EOF CAPTCHA
    /includes/modules/pages/contact_us/header_php.php
    /includes/modules/pages/links_submit/header_php.php
    /includes/modules/pages/tell_a_friend/header_php.php
    /includes/modules/YOUR_TEMPLATE/create_account.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_links_submit_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_contact_us_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_tell_a_friend_default.php

The Poor Pay Twice.........remoteone.com.au

3 Aug 2009, 2:00 AM
#497
remoteone avatar

remoteone

Zen Follower

Join Date:
Jan 2009
Location:
Macclesfield, South Australia
Posts:
104
Plugin Contributions:
0

Re: Captcha using TTF & GD

Well after installing CAPTCH ttf on my local windows server, and re-booting, clearing the cache etc etc etc. CAPTCHA still would not show the Validation Image.
Then several days after installing it just started working! even tho I made no changes. Go figure that out? !

So I uploaded and SQL patched to my live site and I get the same problem. :
Instead of a Validation Image, I get a box that says: "enable this picture"

How can I fix this please ?:frusty:

The Poor Pay Twice.........remoteone.com.au

3 Aug 2009, 2:27 AM
#498
remoteone avatar

remoteone

Zen Follower

Join Date:
Jan 2009
Location:
Macclesfield, South Australia
Posts:
104
Plugin Contributions:
0

Re: Captcha using TTF & GD

Ok its working.
I found that on both my localhost and my live Linux host that started to work only after running the tesy and/or debug files.
*captcha_test.php ,captcha_debug.php and/or captcha_img.php"
Not sure wich one triggered it to start working, but it just would not work until I broused to those files.
No mention of that in the Install Text.
http://www.remoteone.com.au

The Poor Pay Twice.........remoteone.com.au

6 Aug 2009, 6:18 PM
#499
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Captcha using TTF & GD

Hi,
I am using version 2.9.
Congratulations on this mod, very well done, worked first time apart from the sql would not run in zen admin without an error, fine in phpmyadmin though.

I have found two minor validation errors, I could not find any reference to them in the thread so,

in classes/captcha.php
there are two unencoded ampersands.
1)
change this line:

$image = '<img id="captcha-img" src="' . $this->img_href . '&rand=' . str_replace(' ', '', microtime()) . '" alt="' . $alt . '"';

to this:

$image = '<img id="captcha-img" src="' . $this->img_href . '&rand=' . str_replace(' ', '', microtime()) . '" alt="' . $alt . '"';

change this line:

$redraw = ' onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';

to this:

$redraw = ' onclick="document.getElementById(\'captcha-img\').src=\'' . $this->img_href . '&rand=\'+Math.random();return false;"';

regards
Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

6 Aug 2009, 9:10 PM
#500
autoace avatar

autoace

Totally Zenned

Join Date:
Jun 2009
Posts:
618
Plugin Contributions:
0

Re: Captcha using TTF & GD

Hi all,

I was trying to decide on a captcha addon and initially installed captcha number subject in 1.0 and was having trouble getting it to work. There is no support thread and I have not seen it mentioned much on the forums, so I decided to change.

Captcha using ttf & gd has some got some great remarks so I decided to change to that one.

After I ran the uninstall for the previous addon, I went to work on installing Captcha using ttf & gd, all went smooth!

However I do have an error:

Fatal error: Call to a member function close() on a non-object in /home/autoXXX/public_html/includes/classes/captcha.php on line 341

Does anyone know what this is? Any ideas/solutions are greatly appreciated. Thanks.

Thank you,
autoace