Home » HTML » HTML_QuickForm_CAPTCHA » Bug #10042
Suggestion for new users
Details
| Doc Bug #10042 | Suggestion for new users |
|---|---|
| Submitted | 2007-02-07 06:45 UTC |
| From | alex at akb dot com dot au |
| Status | Open |
| Package | HTML_QuickForm_CAPTCHA |
| PHP Version | 4.3.11 |
| OS | *nix |
| Roadmaps | (Not assigned) |
Comments
[2007-02-07 06:45 UTC] alex at akb dot com dot au
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
[2007-02-15 00:37 UTC] lmiranda at gmail dot com
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.