Having problems implementing the access code (captcha) feature

Problem:

I'm trying to implement the access code (captcha) feature, but I always get a broken image. What I'm doing wrong?

Answer:

Access code validation, known also as captcha, requires the following:

- PHP server with GD library installed
- GD library must support PNG or JPG
- One directory in your web server with full write permision (777 on Unix)

The same script that process the HTML form will create the image for the access code.

A control file for that image will be saved in the captcha directory.

If the directory doesn't have full write and execution access (777), then the control file won't be created and you won't be able to validate the access code.

If the GD library is not installed in PHP, you will get a broken image.

How do I know if my web web/PHP server have the GD library?

Create a text file with the phpinfo command:

<?
phpinfo();
?>

copy those 3 lines in a text file, name it myphpinfo.php and upload it to your web server.

Execute the script from your browser.

Look for a table named 'GD'. This means that GD support is available in your PHP install.

If GD is not installed, then you can't use the access code filtering option.