Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.0

Doc Bug #10042 Suggestion for new users
Submitted: 2007-02-07 06:45 UTC
From: alex at akb dot com dot au Assigned:
Status: Open Package: HTML_QuickForm_CAPTCHA (version 0.2.1)
PHP Version: 4.3.11 OS: *nix
Roadmaps: (Not assigned)    
Subscription  


 [2007-02-07 06:45 UTC] alex at akb dot com dot au (Alex Bergin)
Description: ------------ For new users testing/experimenting with the HTML_QuickForm_CAPTCHA package and the Image function: Be aware that the $options array, which contains your font_path , font_file and so on, is stored as Session data. So if you are changing any of the $options values (i.e. the font file), make sure you clear your session data - i.e. close the browser, or clear your cookies, otherwise, you won't see any changes. Also, if you are having difficulties getting your image to display, below is an adjusted version of the sample qfcaptcha_form_image.php script which echo's the session data to a text file. It was helpful for me, I hope it can be helpful for someone else. Test script: --------------- http://blog.akb.com.au/files/code/qfcaptcha_form_image.php.txt

Comments

 [2007-02-15 00:37 UTC] lmiranda at gmail dot com (Louie Miranda)
Will this be the error for the image? [Thu Feb 15 08:36:28 2007] [error] PHP Fatal error: HTML_QuickForm_CAPTCHA::getValue() [<a href='function.getValue'>function.getValue</a>]: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Text_CAPTCHA_Driver_Image" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /usr/local/php5/lib/php/HTML/QuickForm/CAPTCHA.php on line 148
 [2007-02-15 01:33 UTC] alex at akb dot com dot au
It's a bit difficult to know, without seeing the code - are you almost using the same code as the examples: http://www.11abacus.com/dev/pear/doc/HTML/QuickForm/examples/ Perhaps post your code, so we can see and attempt to replicate. It could be a bug, or it could have something to do with PHP5. I did the work I did using PHP4.
 [2007-02-15 15:57 UTC] jausions (Philippe Jausions)
A captcha instance is stored in the session, to you have to be particularly attentive to the order in which the session is opened and when the class is included. If you have session.auto_start enabled, then you have to use __autoload() to support loading the PEAR package, which means you have to use PHP5.