Page 3 of 60 FirstFirst 123451353 ... LastLast
Results 21 to 30 of 593
  1. #21
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    My local dev server is set-up with register_globals disabled (just like the production server I want to run the mod on). Could this be cause to my issue?

    Megaman, do you have register globals on or off on your demo site?

    Woody

  2. #22
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Captcha using TTF & GD

    v 2.3 16.03.2007 10:51
    1. Some Admin configuration adjustments added;
    2. Remove non CAPTCHA updated code from Review Write page;
    3. Add gif support;

  3. #23
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Captcha using TTF & GD

    Quote Originally Posted by Woodymon View Post
    I see in web server error log:
    Code:
    [error] PHP Fatal error:  imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png:  fatal libpng error: zlib error in /home/my_account/public_html/my_shop/includes/classes/captcha.php on line 214
    ...
    So for testing I changed image type (Config > Captcha) from png to jpeg and try again... but image still does not display in browser. However this time different message in error log:

    Code:
    client denied by server configuration: /home/my_account/public_html/my_shop/includes/templates/my_template/images/index.php
    Does this last error indicate a possible htaccess mod-security issue?
    This errors indicate that you use bad configurated server.
    Quote Originally Posted by Woodymon View Post
    The segment of relevant code from the class file:

    Code:
    if($this->img_type == 'png') {
    	imagepng($this->img, '', (int)$this->quality);
    } elseif($this->img_type == 'gif') {
    	imagegif($this->img, '');
    } else {
    	imagejpeg($this->img, '', (int)$this->quality);
    }
    How to change to gif? Config > CAPTCHA in the admin provides png and jpeg options but don't see how to set gif image type.
    Gif support only by last 2.3 version.

  4. #24
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Quote Originally Posted by a_berezin View Post
    This errors indicate that you use bad configurated server.
    Ha! I figured that much out. Just was inquiring if anyone had ideas how to resolve. My local server is set-up to emulate my production server on webhost. If it does not run on my local server then it will not run on web host. But to be certain I just installed a fresh Zen cart on same host machine production shop is running on and installed previous version of your mod (v2.2) and same exact errors observed. Hosting provider grepped through the server logs and did not find anything unusual but observed same errors in the server error log. He asked me if the mod requires register_globals enabled. I stated I did not know but probably not as the mod developer is super security conscious.

    How would I test if CAPTCHA mod requires register_globals?

    Quote Originally Posted by a_berezin View Post
    Gif support only by last 2.3 version.
    OK I will install and test the new version.

    Anyone have ideas what might contribute to above reported errors? Thanks for any recommends.

    Woody

  5. #25
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Captcha using TTF & GD

    Tips:
    Script for testing CAPTCHA:
    Code:
    <?php
    require('includes/application_top.php');
    
    require(DIR_WS_CLASSES . 'captcha.php');
    $captcha = new captcha();
    
    if(isset($_POST['action']) && $_POST['action'] == 'GO') {
    	if($captcha->validateCaptchaCode()) 
    		echo 'You enter VALID code - "' . $_POST["captcha"] . '"';
    	else
    		echo 'You enter INVALID code - "' . $_POST["captcha"] . '"';
    }
    ?>
    <form action="<?php echo $PHP_SELF; ?>" method="post">
    <?php
    // BOF Captcha
    if(is_object($captcha)) {
    ?>
    <?php echo $captcha->img(); ?>
    <?php echo $captcha->redraw_button(BUTTON_IMAGE_CAPTCHA_REDRAW, BUTTON_IMAGE_CAPTCHA_REDRAW_ALT); ?>
    <br class="clearBoth" />
    <label for="captcha"><?php echo TITLE_CAPTCHA; ?></label>
    <?php echo $captcha->input_field('captcha', 'id="captcha"') . '&nbsp;<span class="alert">' . TEXT_CAPTCHA . '</span>'; ?>
    <br class="clearBoth" />
    <?php
    }
    // EOF Captcha
    ?>
    <input type="submit" name="action" value="GO" />
    </form>

  6. #26
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Captcha using TTF & GD

    Woody!
    I use this CAPTCHA more than six months on different hosting. And only you have so problems.
    How can I help you if you can't give me any usefull information or url for you test site?

  7. #27
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Andrew,

    Thanks for the follow-up and the upgrades!I discovered there is one diff between the two servers. The production shop was recently moved to a server with different version of PHP. Not sure why I forgot something so significant.

    Anyway, the good news is I now have your new v.2.3 CAPTCHA working on PHP 4.4.4. I see many nice new v2.3 options in admin!

    But mod v2.2 is still not working on the server running PHP 5.1.6. Thus I will try your test script and also install new mod version 2.3.

    Woody

  8. #28
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Installed v.2.3 (on server running PHP 4.4.4)

    Good News: I can change the width and height of the background image and change the code length. And the shadows appear behind the characters. And the random diagonal lines appear behind the characters.

    Bad News: The redraw button does not respond. And the characters are small and vertical, and not rotated as expected. In admin (Config >CAPTCHA) I changed the max and min "chars" sizes to no effect.

    I've tried all three image type options (png, jpeg, gif) to same effect.

    All of the above applies to both the contact_us and login page.

    Before I spend too much time investigating thought I'd check to see if others observe the same with v2.3.

    Woody

  9. #29
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Thanks again for the test script Andrew.

    I installed both the test script and v2.3 on on Zen Cart 1.37 on a host running PHP 4.4.4 and all is good (well a few errors as reported above but the image displays in both Firefox and IE6).

    But the test script does not display image on Zen Cart 1.37 running on PHP 5.1.6.

    Not wanting to jump to conclusion but is there possibly a PHP version compatibility issue here?

    Could others whom have success with the mod and/or success running the test script above, please post their PHP version? Thanks.

    Woody

  10. #30
    Join Date
    Aug 2004
    Location
    Saint Petersburg, Russia
    Posts
    1,786
    Plugin Contributions
    13

    Default Re: Captcha using TTF & GD

    v 2.4 20.03.2007 11:39
    1. Support for GD 1;
    2. Use of a class dir instead of function opendir;

    Woody!
    Test this version.

 

 
Page 3 of 60 FirstFirst 123451353 ... LastLast

Similar Threads

  1. Replies: 68
    Last Post: 29 Jul 2013, 06:33 PM
  2. CAPTCHA using TTF & GD - not working
    By derrr99 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 Dec 2010, 04:05 PM
  3. Replies: 13
    Last Post: 2 Jun 2008, 03:29 PM
  4. Captcha using TTF & GD & Tel Not Required (how do I Avoid Overwrites?)
    By CelticKatt in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 8 Apr 2008, 04:18 AM
  5. Can CAPTCHA Using TTF & GD be installed in check out?
    By Lainee in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 8 May 2007, 04:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR