+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: Security Image - Quick Fix

  1. #1
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,440
    Blog Entries
    5

    Default Security Image - Quick Fix

    If your security image does not show - you should

    1) Uncheck "Use GD library for image processing" in your admin panel global settings.

    Try it by going to http://www.yoursite.com/simg/simg.php

    If still no numbers and/or letters,

    Edit /inc/images.inc.php

    Find:

    Code:
    $textX += $backgroundOffsetX;
    		$textY += $backgroundOffsetY;
    Change to:

    Code:
    //$textX += $backgroundOffsetX;
    		//$textY += $backgroundOffsetY;
    		$textX += 1;
    		$textY += 1;
    Give it another try at the link above - see if you see letters and numbers.

    You may also want to edit /simg/simg.php

    and change the array of numbers and letters to:

    Code:
    $chars = array("2","3","4","5","6","7","8","9");
    This should get you going... I usually replace the funky background image with just white - and make the text an easy to read size - but that is beyond this post.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  2. #2
    uhom
    Guest

    Default

    Thank you for this fix, but it's still not working for me

  3. #3
    gbarber
    Guest

    Default

    in an earlier version of aedating (4.0) it happened to me (catchas not showing). i solved uploading another font and changed reference in images.inc.php (search for "verdana.ttf").
    hope it helps.

  4. #4
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,440
    Blog Entries
    5

    Default

    Yea - I have fixed simg.php and the associated inc files (in later aedating) many times - and it can be one or more of several things.

    It usually takes some fooling with to get working.

    Another point - you may want to install ghostscript (it installes several font libs) on the server, as sometimes just imagemagick alone does not have all the necessary libs to support the font functions.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  5. #5

    Join Date
    Feb 2006
    Posts
    2

    Default

    Never mind
    Last edited by footprint; 09-03-2006 at 03:56 PM.

  6. #6
    QuantumNet
    Guest

    Default

    I had the same problem of GD not working, and all I did was add ttf support to php, their implementation of GD requires it.


    when configuring PHP do:

    --with-gd
    --with-ttf
    --enable-gd-native-ttf




    ps the freetype2 library must be installed for this!

  7. #7
    scliburn
    Guest

    Default ideas..

    PHP Code:
    ob_start();
    session_start();

    $chars = array("a","A","b","B","c","C","d","D","e","E","f","F","g","G","h","H","i","I","j","J",
                   
    "k","K","L","m","M","n","N","o","p","P","q","Q","r","R","s","S","t","T",
                   
    "u","U","v","V","w","W","x","X","y","Y","z","Z","2","3","4","5","6","7","8","9");

    $textstr '';
    for (
    $i 0$length 6$i $length$i++) {
       
    $textstr .= $chars[rand(0count($chars) - 1)];
    }
    $hashtext md5($textstr);
    $_SESSION['strSec'] = $hashtext;

    # custom image
    header("Content-type: image/jpeg");
    $im = @imagecreatetruecolor(7030)
       or die(
    "Cannot Initialize new GD image stream");

    # custom image
    $background_color imagecolorallocate($im000);
    $text_color imagecolorallocate($im255255204);
    imagestring($im2577$textstr$text_color);
    imagejpeg($im);


    ob_end_flush(); 
    You can tweak it as needed to include a custom background and many other aspects and elements.

    Can anyone see any issues with this?

  8. #8
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,440
    Blog Entries
    5

    Default

    You can do as you wish here - but I recommend as simple as possible = perhaps only 4 chars, and either numbers or letters, not both - and if letters, only upper OR lower case.

    If you don't keep it simple - your users will be frustrated on the join...

    But "simple" means perhaps an automated script could "read" the image and do automated joins - but as far as I know - this has not been a problem yet.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  9. #9
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,440
    Blog Entries
    5

    Default

    You may want to do this - so the font is always 24... or larger - and easy to read. Did this in GPLdate.

    Code:
    // $fontSize = rand( 14, 24 );
    $fontSize = 24;
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  10. #10
    afrogeek
    Guest

    Default I'm having the same problem. What should I do?

    // write text on image
    $workFilename = "{$dir['root']}tmp/{$hash}.png";
    $color = '#' . sprintf( '%02x', $fontColorR ) . sprintf( '%02x', $fontColorG ) . sprintf( '%02x', $fontColorB );
    //$textX += $backgroundOffsetX;
    //$textY += $backgroundOffsetY;
    $textX += 1;
    $textY += 1;

    I tried the above fixes. I did get the image to show, but not the numbers or letters. What should I do next?

+ Reply to Thread (include dating software, release, and patch number!)
Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. security image problem
    By polscot in forum Security / Server Administration
    Replies: 3
    Last Post: 01-15-2008, 09:37 AM
  2. Security Image....new problem
    By diamontay69 in forum General Issues, Comments, Questions
    Replies: 2
    Last Post: 10-29-2007, 12:21 AM
  3. Security Image Array Contains 0 and o
    By Smoge in forum Bugs Dolphin 6.00
    Replies: 6
    Last Post: 09-07-2007, 11:50 PM
  4. security image
    By dgk in forum Dolphin General Discussion v5.0 to v5.21
    Replies: 7
    Last Post: 11-21-2006, 02:31 AM
  5. security image
    By ijk in forum Security / Server Administration
    Replies: 0
    Last Post: 07-02-2005, 02:07 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