Page 4 of 60 FirstFirst ... 234561454 ... LastLast
Results 31 to 40 of 593
  1. #31
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Andrew-

    Regards to upgrading from v1.33 to 1.34 it looks like the only file needing updating was the classes file, so that's what I did.

    Same issues continue. CAPTCHA image does not display on the shop running on PHP5.

    Error log entry shows:
    Code:
    File does not exist: /home/ergo/public_html/403.shtml
    client denied by server configuration: /home/account/public_html/shop/includes/templates/my_template/images/index.php
    And I tried out your new _test_captcha.php with same negative result.

    I do see IMAGE_CAPTCHA _ALT displays where the CAPTCHA image should be. I'm assuming this a new define that needs to go into the language file?

    Below is the generated source from the contact_us page:

    Code:
    <img id="captimg" src="http://www.domain.com/shop/captcha_img.php?0.588261001174405752" alt="IMAGE_CAPTCHA_ALT" title=" IMAGE_CAPTCHA_ALT " height="50" width="240">
    <input src="includes/templates/my_template/buttons/english/button_redraw.gif" alt="Redraw Capture Image" title=" Redraw Capture Image " onclick="document.getElementById('captimg').src='http://www.domain.com/shop/captcha_img.php?'+Math.random();return false;" type="image">
    <br class="clearBoth">
    <label for="captcha">Verification code:</label>
    <input name="captcha" id="captcha" type="text">&nbsp;<span class="alert">* (case insensitive)</span>
    <br class="clearBoth">
    All of the above is for the shop running on PHP5.

    I updated to v1.34 CAPTCHA on the server running PHP4 and the CAPTCHA image still displays. But font size remains tiny. Changing values for 'Chars minimum size' and 'Chars maximum size 'has no effect.

    I am not understanding the meaning of "(1.0=Image Height)". Is that reference to pixel size or relative aspect ratio or some percentage of something?

    Besides the default values I tried 24.0 and 36.0 respectively.

    Is there anything I can tell my hosting provider what to look for regards he support required for this CAPTCHA mod.

    I'm thinking possibly some server security configuration is disallowing the 0.588261001174405752 parameter appended to http://www.domain.com/shop/captcha_img.php?

    <img src="http://www.domain.com/shop/captcha_img.php?0.588261001174405752">

    Appreciate your advice and assistance in trying out different ideas.

    Woody

  2. #32
    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 do see IMAGE_CAPTCHA _ALT displays where the CAPTCHA image should be. I'm assuming this a new define that needs to go into the language file?
    Sorry, forgotten. Fixed.

  3. #33
    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 updated to v1.34 CAPTCHA on the server running PHP4 and the CAPTCHA image still displays. But font size remains tiny. Changing values for 'Chars minimum size' and 'Chars maximum size 'has no effect.
    Similar that there are no fonts found.
    Quote Originally Posted by Woodymon View Post
    I am not understanding the meaning of "(1.0=Image Height)". Is that reference to pixel size or relative aspect ratio or some percentage of something?
    Yes its a ratio. 1 corresponds to height of the image. 0.9 - 0.9 from height, 0.8 - 0.8 heights etc.

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

    Default Re: Captcha using TTF & GD

    Quote Originally Posted by a_berezin View Post
    Similar that there are no fonts found.
    Thanks for that tip. And indeed after deleted the only TTF in the fonts directory the CAPTCHA image still displays with the six characters still at the same size. So knowing this will assist me in focusing my troubelshooting.

    Quote Originally Posted by a_berezin View Post
    Yes its a ratio. 1 corresponds to height of the image. 0.9 - 0.9 from height, 0.8 - 0.8 heights etc.
    Ahhh... now I understand. 0.9 means the characters will display at 90&#37; of the pixel height of the CAPTCHA image. Thanks for the clarification.

    And FYI, I just submitted a follow-up message to my webhost regarding issue of the CAPTCHA image not displaying properly. I'm quite convinced now that some filtering rule(s) are in place causing the image to not display. I recall a similar error message a month ago or so when my shops product images generated by Image Handler 2 mysteriously quit displaying. After hemming and hawing over thias issue for two days the web host tech finally recalled they began "experimenting" with filtering on files ending with x80 (to protect against some infiltration technique tha's going around). Well if you have Image Handler 2 installed and you configure your small product images to display at 150wx80h size the filename will be appended with 150x80. Thus the webhost filtering rules put a stop to my product images for several days until they could figure out (remember) what they did to cause the issue. Doh! Document your changes boys and girls!! Needless to say they lost some credibility points on that one.

    Woody

  5. #35
    Join Date
    Sep 2004
    Posts
    2,420
    Plugin Contributions
    2

    Default Re: Captcha using TTF & GD

    Quote Originally Posted by a_berezin View Post
    Similar that there are no fonts found.
    Quote Originally Posted by woodymon
    And indeed after deleted the only TTF in the fonts directory the CAPTCHA image still displays with the six characters still at the same size. .
    Further testing shows the characters in the CAPTCHA image disappear after the verdana.TTF font is deleted AND when the three previously provided fonts (captcha_0.ttf...) are uploaded to the /fonts directory.

    So that indicates the script is ndeed "seeing" the /fonts directory.

    Wondering why the CAPTCHA characters don't display when the old fonts are installed but with no fonts installed, generic characters display.

    Something is funky with this picture

    Woody

  6. #36
    Join Date
    Mar 2007
    Posts
    19
    Plugin Contributions
    0

    bug Re: Captcha using TTF & GD

    Just delete the "glob" thing from _getFileList it finally works on my server.

    PHP Code:
        function _getFileList($directory$file_ext) {
            
    $file_list = array();
            if (
    $za_dir = @dir(rtrim($directory'/')))
            {
                    while (
    $filename $za_dir->read()) {
                        if (
    preg_match('/\.' $file_ext '$/i'$filename) > 0)
                        {
                            
    $file_list[] = $directory $filename;
                        }
                    }
                    
    sort($file_list);
            }
            return 
    $file_list;
        } 
    Quote Originally Posted by Woodymon View Post
    Further testing shows the characters in the CAPTCHA image disappear after the verdana.TTF font is deleted AND when the three previously provided fonts (captcha_0.ttf...) are uploaded to the /fonts directory.

    So that indicates the script is ndeed "seeing" the /fonts directory.

    Wondering why the CAPTCHA characters don't display when the old fonts are installed but with no fonts installed, generic characters display.

    Something is funky with this picture

    Woody

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

    Default Re: Captcha using TTF & GD

    Quote Originally Posted by babygekko View Post
    Just delete the "glob" thing from _getFileList it finally works on my server.
    What a problem with "glob" function? It's exist but don't work?

  8. #38
    Join Date
    Mar 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Captcha using TTF & GD

    Yes, the glob function didn't work on my server (shared hosting, PHP4). I also had to delete the ob_start() and ob_end_clean() from captcha_img.php. Things work out perfectly right after that.

    Quote Originally Posted by a_berezin View Post
    What a problem with "glob" function? It's exist but don't work?

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

    Default Re: Captcha using TTF & GD

    Exist but didn't work.. Very strange. And what your hoster talk about this?

    What a problem with ob_* functions in captcha_img.php? They prevent any output in application_top.php.

  10. #40
    Join Date
    Mar 2007
    Posts
    19
    Plugin Contributions
    0

    Have a Drink Re: Captcha using TTF & GD

    I just tried it on my other machine - WinXP with EasyPHP 1.8 (Apache 1.3.33 - PHP 4.3.10 - MySql 4.1.9) and same thing. On the XP/EasyPHP machine, I had to remove ob_start and ob_end_clean from showCaptchaImg before it could work. After that captcha shows fine on my XP.

    I suppose it does exist because PHP > version 4.3

    It's ok - I just had to remove those and it's looking good. My feedback: maybe you can find better color for the fonts? The colors just look ... you know .. yucky... hehehe

    Quote Originally Posted by a_berezin View Post
    Exist but didn't work.. Very strange. And what your hoster talk about this?

    What a problem with ob_* functions in captcha_img.php? They prevent any output in application_top.php.

 

 
Page 4 of 60 FirstFirst ... 234561454 ... 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