Is your captcha broken and can not be viewed on your proxy list?
There are three possibilities.
First, your PHP GD is not activated. Second, your mod_rewrite is not activated. Third, your environment setting.
Before checking everything, make sure you have uploaded all necessary files and directories (not even a single one should be ignored) :
- “
/includes/libs/animatedcaptcha_background/“. It contains the background images for the captcha. On the distribution package, it contains various GIF images. - “
/includes/libs/animatedcaptcha_fonts/“. It contains various TTF fonts for the captcha. - “
/includes/libs/animatedcaptcha_temp/“. This seems an empty directory. But still must exist. If you use animated captcha (which can be turned on optionally), this directory will be used and must be writable (chmod it to 777 – but only if you use animated captcha, if you just use the static one, you do not need to chmod it). - “
/includes/libs/animatedcaptcha.class.php“. It is the core PHP class file for our captcha.
Problem on PHP GD
To check if the first issue happens, try to save this file into any file on your web hosting and open it from your browser.
If everything is fine, you should see a blue box (it is an image actually), with a text on it.
<?php
//
// (c) Xrvel.com & ProxyCoder.com
//
// This is just a PHP GD demo to test your environment
// You may delete this file if you want to.
//
if (!isset($_GET['debug'])) {
header('Content-type: image/gif');
}
$image = imagecreate(300, 60);
$background_color = imagecolorallocate($image, 200, 200, 255);
$text_color = imagecolorallocate($image, 0, 0, 5);
imagefilledrectangle($image, 0, 0, 300, 60, $background_color);
imagestring($image, 20, 30, 10, 'THIS IS JUST A PHP GD DEMO', $text_color);
imagestring($image, 20, 30, 30, date('d-M-Y, H:i:s', time()), $text_color);
imagegif($image);
imagedestroy($image);
?>
Problem on mod_rewrite
The captcha is called as a rewritten link. The real URL is “animatedcaptcha.php”, but called on the page as “animatedcaptcha.gif”.
So try to open “http://www.yourwebsitehere.com/animatedcaptcha.gif“. Do you get “404 Not Found” error?
- If you get “404 Not Found” error, it means your server has not activated the mod_rewrite. Try to open “http://www.yourwebsitehere.com/animatedcaptcha.php” instead. And if you can see the image now, you have two options :
- First, ask your webhosting to activate the mod_rewrite.
- Second, just use “animatedcaptcha.php” instead of “animatedcaptcha.gif“.
- If not, there is no problem on your mod_rewrite.
Thanks alot xrvel for guiding through this tutorial. I did try both the methods and I’m sure that GD Library and mod_rewrite both are activated on my server as I’ve a private server with many such scripts installed using both these functions. When I goto animatedcaptcha.php or animatedcaptcha.gif I just get a blank page with nothing being displayed on it. You can have a look at it yourself at www. proxy-list. in/animatedcaptcha.php
Hi Ankit.
I have looked at your website.
I saw nothing there. Still have no idea what causes that at this moment, but let’s try to use more simple captcha (without background, etc).
Open your animatedcaptcha.php, and set line 40-43 into.
$img->use_background(false);// use background ?
$img->use_distortion(false);// distort image ?
$img->distortion_type(‘normal’);// normal | slice | wave | random
$img->use_grid(false);
It still din’t work. Its still showing up just a blank page. I tried my level best in rebuilding the whole configuration for the account but its still the same. Does it requires any more special configuration to be done apart from GD library and mod_rewrite. Did it work for anyone else as I couldn’t find anyone else complainting for the same here.
Hi Ankit, this far, it works for most environment. I noticed you missed one directory here http://www.proxy-list.in/includes/libs/animatedcaptcha_temp/
You don’t have that directory. It should exist. Try to create that.
Oh I wonder how could I miss it. It seems to be working perfectly fine now. Thanks alot xrvel I’ve been working hard enough to find out the issue though you helped alot.
No problem, Ankit. Please come here if you have more questions
everthing i did. but doesnt work captcha ?
mod_write and pHP GD is also succuesfull work.
what can i do?