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

Captcha using TTF & GD

Views: 147,342

Results 81 to 100 of 593
27 Mar 2007, 9:58 AM
#81
a_berezin avatar

a_berezin

Deceased

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

Captcha using TTF & GD

Woody!
I think that it's a non-PHP problem.
Check your hosting, your .htaccess.

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

27 Mar 2007, 6:35 PM
#82
rhutchison avatar

rhutchison

New Zenner

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

Re: Captcha using TTF & GD

Hey Woody and Andrew,

I'm having the same problem with the Captcha image not displaying. I'm on GoDaddy shared hosting with PHP 4.3.11. When I run captcha_img.php on the browser I get:

The image “http://www.patiotoys.com/captcha_img.php” cannot be displayed, because it contains errors.

When I run captcha_test the image is also not displaying.

I don't know if there's a solution yet, but I wanted to be in on any solutions that do come up. Let me know if there are any settings I can try massaging.

-Roger

27 Mar 2007, 7:30 PM
#83
woodymon avatar

woodymon

Totally Zenned

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

Re: Captcha using TTF & GD

rhutchison:

Hey Woody and Andrew,

I'm having the same problem with the Captcha image not displaying. I'm on GoDaddy shared hosting with PHP 4.3.11. When I run captcha_img.php on the browser I get:

When I run captcha_test the image is also not displaying.

I don't know if there's a solution yet, but I wanted to be in on any solutions that do come up. Let me know if there are any settings I can try massaging.

Hi Roger,

Thank you for your report. I was going wacko thinking I was the only one with this issue.

My webhost is quickly tiring of my communications on this issue. They keep saying it is a problem with the script or an "authoring" issue. I say NOT! I'm convinced it is a server configuration issue. But if I am wrong I will eat crow (but I prefer turkey).

Several months ago my hosting company messed up (we are apparently a live guinea pig) and added mod_security rules which prevented the serving of my production shop's product images. Took the webhost two days to find problem and repair (apparently they did not document their changes and they could not remember what they changed... go figure).

A similar rule might be causing the captcha_image to not get served (get filtered). But webhost consistently responds no rules are in place which would filter the image. I suspect otherwise but don't know how to prove as I have no access to server wide rules or server wise error logs (I can access my own error log but that is all clear). Such is life in a shared host environment.

They are aware of this thread and I'm amazed they have not responded or posted here. I would think they would want to learn? I know I do!

Does your host employ mod_security? Any special server wide/global rules applied?

Have you tried testing by quickly and temporarily disabling your .htaccess files? (remove the period in front of htaccess. Be sure to change back quickly after testing). I just tested doing that myself and did not help.

I will PM you latest debug script Andrew sent me. If you learn anything please do post. And I'll do the same.

And an EXTRA BIG thanks to Andrew with helping troubleshoot this issue!

Woody

27 Mar 2007, 9:58 PM
#84
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: Captcha using TTF & GD

rhutchison:

...I'm on GoDaddy shared hosting...
I switched from GoDaddy about a month ago because my shop ran so s l o w... As I put more products into my shopping cart, it got slower, like 5 seconds to load a page with hardly any graphics. They don't know how to configure their servers to run e-commerce apps. I switched to PimaHost (pimahost.com), and I am VERY happy. My shop is FAST!!

Anyway, I still have a few months left on GoDaddy. If I have some time this week, I can try installing the mod on it to see if I have the same issue. In the mean time, don't even try calling them for support - they'll tell you in a roundabout way they're only responsible for server hardware...

28 Mar 2007, 5:50 PM
#85
j0ney3 avatar

j0ney3

New Zenner

Join Date:
Jun 2004
Posts:
36
Plugin Contributions:
0

Re: Captcha using TTF & GD

Andrew (or anyone),

I'm not sure if I'm the only one having this problem but I'm getting that "This page contains both secure and insecure items..." blah blah from IE. I've tried hitting captcha_img.php from the https loca. but it just spits out "The image “https://www.lethalperformance.com/captcha_img.php” cannot be displayed, because it contains errors.". If I could get it to work in ssl mode I'm sure I could hack up the code a bit to determine when to enable the ssl link for it.

Thanks for another kick-*** contrib!

28 Mar 2007, 6:09 PM
#86
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: Captcha using TTF & GD

KTNaturals:

...Anyway, I still have a few months left on GoDaddy. If I have some time this week, I can try installing the mod on it to see if I have the same issue...
Oops. I have shared service, so without a domain name or a dedicated IP, I can't connect to my site. Sorry!

29 Mar 2007, 7:22 PM
#87
jeffey avatar

jeffey

Zen Follower

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

Re: Captcha using TTF & GD

Excuse my ignorance, read the posts but just want to make sure.

This download replaces (appears that it is suggested that you remove the previous CAPTCHA prior to loading this one) the download section CAPTCHA (which only protects the customer sign up process) and provides protection for both the sign up process AND contact_us submission?

Just looking for confirmation if someone has the time. Hoping it's all true, certainly needed.

29 Mar 2007, 10:12 PM
#88
woodymon avatar

woodymon

Totally Zenned

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

Re: Captcha using TTF & GD

UPDATE: Webhost just applied identical mod_security rules to both machines. No changes observed. Sigh.

So I stand corrected as I was pointing to a mod_security issue. I now eat crow.

captcha image correctly displays on one server but does not on the other machine. Error in browser is: The image “http://www.domain.com/shop/captcha_img.php” cannot be displayed, because it contains errors.

Webhost reports the machines are identically configured except PHP4 on one and PHP5 on the other (the latter hosting the account which the captcha image will NOT display).

Any gurus out there with ideas on what might be contributing to the image not displaying (I have confirmed with Andrew's debug script the image is generated).

Something special regards to Apache configuration or MIME types or HTTP headers or...?

Woody

30 Mar 2007, 11:36 AM
#89
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

Woody!
I install PHP 5.1.6 (Zend: 2.1.0) on my local server an test captcha. All works fine.
Can your host company give me a test account for two days? 1Mb+php5.

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

30 Mar 2007, 1:21 PM
#90
j0ney3 avatar

j0ney3

New Zenner

Join Date:
Jun 2004
Posts:
36
Plugin Contributions:
0

Re: Captcha using TTF & GD

a_b,

any advice about getting your mod to cooperate w/ ssl? Depending on the user's settings they may just not see the image at all, or at best they'd get a warning about "This page contains both secure and insecure items...". Thanks again.

30 Mar 2007, 1:56 PM
#91
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

j_3,
I can't test it on ssl.

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

30 Mar 2007, 2:46 PM
#92
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

Woody!
I test it PHP 5.2.1 (Zend: 2.2.0). All work normal.

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

30 Mar 2007, 10:55 PM
#93
woodymon avatar

woodymon

Totally Zenned

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

Re: Captcha using TTF & GD

a_berezin:

Woody!
I install PHP 5.1.6 (Zend: 2.1.0) on my local server an test captcha. All works fine.
Can your host company give me a test account for two days? 1Mb+php5.
Hi Andrew,

Sure deal. I'm getting that set-up for you. Probably won't be ready until Monday. Will PM with further details when available. I appreciate your assistance.

Woody

31 Mar 2007, 3:40 AM
#94
kennyoz avatar

kennyoz

New Zenner

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

Re: Captcha using TTF & GD

j0ney3:

a_b,

any advice about getting your mod to cooperate w/ ssl? Depending on the user's settings they may just not see the image at all, or at best they'd get a warning about "This page contains both secure and insecure items...". Thanks again.

Hi, I too was getting this "secure and nonsecure" issue when I click on the login link. I did some reading and searching, this is what I did to solve this issue.

edit this file /includes/classes/captcha.php

At line 64, change from
$this->img_href = zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'NONSSL', false, false, true);

to

$this->img_href = zen_href_link('captcha_img.php', zen_session_name() . '=' . zen_session_id(), 'SSL', false, false, true);

Notice the underlined word to be changed. Works for me.

Hope this helps. :thumbsup:

Cheers,
KennyOz
http://cheekyjunior.com.au

Cheers,
KennyOz
Cheap Lego in Australia

31 Mar 2007, 6:46 AM
#95
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

Hi KennyOz,
Thank for the decision!

Fixed.

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

31 Mar 2007, 5:00 PM
#96
jeffey avatar

jeffey

Zen Follower

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

Re: Captcha using TTF & GD

Glad you solved you problem!

My question got, understandably, buried during the serious discussion of the real time issue so I thought I would ask it again.

Again, excuse my ignorance, read the posts but just want to make sure since it really wasn't confirmed:

This download replaces (appears that it is suggested that you remove the previous CAPTCHA prior to loading this one) the download section CAPTCHA (which only protects the customer sign up process) and provides protection for both the sign up process AND contact_us submission?

Just looking for confirmation if someone has the time. Hoping it's all true, certainly needed.

Thanks.

31 Mar 2007, 7:05 PM
#97
ktnaturals avatar

ktnaturals

Zen Follower

Join Date:
Dec 2006
Location:
Ohio
Posts:
196
Plugin Contributions:
0

Re: Captcha using TTF & GD

That is correct. The other version is quite differet than this one, so make sure to remove everything. There's no SQL uninstall script, so you'll have to manually remove entries from the database (you might not need to do this, but if you don't, it'll still appear in Admin).

This version can also do Tell a Friend and Reviews.

31 Mar 2007, 7:24 PM
#98
woodymon avatar

woodymon

Totally Zenned

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

Re: Captcha using TTF & GD

QUESTION: Can anyone confirm they have the captcha mod working on Zen Cart 1.37 with IH2 and/or Zen Lightbox installed?

UPDATE on my ongoing issue...I moved the account on which captcha was working (on host with PHP4) over to the same host where captcha was not working (with PHP5). So both accounts are now running on same machine.

I've confirmed captcha IS still working on the moved account (on the host with PHP5)!

So this issue is specific to the specific account and/or Zen Cart install/config! Nothing to do with PHP or mod_security. Sorry for the wild goose chase.

So this leaves me to ponder: why the diff on accounts on the same host? I've installed latest mod v2.6 on both accounts (both running Zen Cart 1.37).

The Zen Cart which captcha works has NO mods installed.
The Zen Cart which captcha does NOT work has MANY mods installed including Image Handler 2 and Zen Lightbox.

I'm wondering if we have a mod compatibility issue?

Repeat Question: Can anyone confirm they have the captcha mod working on Zen Cart 1.37 with IH2 and/or Zen Lightbox installed?

Woody

31 Mar 2007, 7:47 PM
#99
jeffey avatar

jeffey

Zen Follower

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

Re: Captcha using TTF & GD

Thanks, this one looked involved so wanted to head off any problems.

SQL! Oh Nooooo!

Though I've done inserts in Admin. I've never hand added/deleted anything.

Any clues as to entries to remove and procedure?

Going to give it a shot. Tried "browse" and I see "CAPTCHA validation" in configuration_group but that is the only thing I see based on guessing what to look from from Captcha original SQL insert but looks like there should be something else. Specifically, 'Anti-Robot Registration/Verification'.

Search of entire database shows "activate validation" somewhere in "configuration" field but I can't seem to find that entry.

Am I close? Just delete the "CAPTCHA Validation" line?

Thanks for the time, keep thinking I'm near done then there's another great mod! Security is top in my mind so I don't want to rush to live prematurely.

1 Apr 2007, 7:52 AM
#100
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

Woody!
Certainly it works with Zen Lightbox. And with all other normal mods. :)
That with IH2 I do not know. I didn't try, didn't install, didn't look and didn't touch this :censored:.

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