You are here: Devel > ActiveSf > ActiveSfCaptcha
ActiveSfCaptcha
Table of content :
Sf Active Captcha
Pear
- You'll need pear and the Captcha module for it (and all of it's dependencies)
# pear install channel://pear.php.net/Text_CAPTCHA-0.2.1
# pear install channel://pear.php.net/Image_Text-0.6.0beta
- You'll have to add the path to pear to your include path
Fonts
- Make sure you have some ttf fonts (Arial or so) installed in a good way.
Extra directories
- Create website/images/captcha
- chmod 775 website/images/captcha
- chown www.yoursitegroup website/images/captcha
Extra/Changed Files in sitename
- The template ones are new. so you can use both captcha & non captcha sites.
- the php files contain 'session_start();' directly after <? & the page called is 'publishcap' instead of publish and so on.
New files in shared/classes/pages/
Additional Tweaks.
- in the .inc files you'll have to do:
- change the require_once of the captcha file to something valid
- change the lines pointing to the font-dir & path to something valid
Notes:
- because the captcha files are not deleted automatically, you might want to create a cronscript that simply does a
find /sitename/website/images/captcha/ -type f -ctime 7 -exec rm {} \; Eventually you want to ionice that! (-ctime 7 deletes files older than a week, quite conservative but will keep the directory from getting ridiculous)
- when you use squid to mirror content, be aware to not mirror the captcha! Maybe you want to edit the files in share/classes/pages (publishcap.inc, commentcap.inc, event_display_addcap.inc that define the directory where the captcha should be stored. (
/captcha/ is a better idea although squid doesn't cause problems for the captcha for me)
- I prefer to use reCAPTCHA, it is actually easier to set up than this, and works better. (includes an audio captcha for accessability) See http://recaptcha.net/plugins/php/ -- MattToups - 23 Feb 2008
to top