Hi All,

I am trying to use the phpcaptcha component with Cake 1.1. and I find
that it works fine when a user is logged in but the image does not
appear when no one is logged into the site.  THis makes me think it is
an issue with phpcaptcha needing a Session to be started before it can
appear but I have tried starting and stopping Sessions to no avail.

Anyone have any ideas?  Here is are my default option in php-
captcha.inc.php"

  /************************ Default Options **********************/

   // start a PHP session - this class uses sessions to store the
generated
   // code. Comment out if you are calling already from your
application

        //session_start();

   // class defaults - change to effect globally

   define('CAPTCHA_SESSION_ID', 'php_captcha');
   define('CAPTCHA_WIDTH', 200); // max 500
   define('CAPTCHA_HEIGHT', 50); // max 200
   define('CAPTCHA_NUM_CHARS', 5);
   define('CAPTCHA_NUM_LINES', 70);
   define('CAPTCHA_CHAR_SHADOW', false);
   define('CAPTCHA_OWNER_TEXT', '');
   define('CAPTCHA_CHAR_SET', ''); // defaults to A-Z
   define('CAPTCHA_CASE_INSENSITIVE', true);
   define('CAPTCHA_BACKGROUND_IMAGES', '');
   define('CAPTCHA_MIN_FONT_SIZE', 16);
   define('CAPTCHA_MAX_FONT_SIZE', 25);
   define('CAPTCHA_USE_COLOUR', true);
   define('CAPTCHA_FILE_TYPE', 'jpeg');
   define('CAPTCHA_FLITE_PATH', '/usr/bin/flite');
   define('CAPTCHA_AUDIO_PATH', '/tmp/'); // must be writeable by PHP
process

and here is my image fcn from captcha.php:

        function image(){
                //$imagesPath = realpath(VENDORS . 'phpcaptcha').'/fonts/';
                $imagesPath = APP . 'vendors' . DS . 'phpcaptcha'.'/fonts/';
                $aFonts = array(
                        $imagesPath.'VeraBd.ttf',
                        $imagesPath.'VeraIt.ttf',
                        $imagesPath.'Vera.ttf'
                );

                $oVisualCaptcha = new PhpCaptcha($aFonts, 200, 60);
                $oVisualCaptcha->UseColour(false);
                //$oVisualCaptcha->SetOwnerText('Source: '.FULL_BASE_URL);
                $oVisualCaptcha->SetNumChars(6);
                $oVisualCaptcha->Create();
        }

Other than that I haven't changed anything from the code provided in
the bakery.

Thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to