Hello friends,
i find very difficult to read captcha code in my forum:
http://galileo2007.netsons.org/forum/ after updating to 1.4.3. Before the
background of captcha was white, but now il black. Besides I see that the capthca code in
this forum is much more legible. How I can work out the issue?
Thanks.
Strange - the 1.4.3 upgrade shouldn't have interfered with your CAPTCHA (at least, it hasn't been reported before).
Could you open your "captcha.php" file, and find (circa line 90)
// Fill the background with white
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);
That code will fill the background with white... make sure it exists in your captcha file.
Probably that single file was corrupted?
(2008-10-30, 01:34 PM)macy Wrote: [ -> ]Probably that single file was corrupted?
I overwrited my captcha.php many times with a non corrupted copy: the result doesn't change
(2008-10-30, 12:19 PM)Tom.M Wrote: [ -> ]Strange - the 1.4.3 upgrade shouldn't have interfered with your CAPTCHA (at least, it hasn't been reported before).
Could you open your "captcha.php" file, and find (circa line 90)
// Fill the background with white
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);
That code will fill the background with white... make sure it exists in your captcha file.
I checked my captcha.php code. Is identical to that one you posted.
Perhaps my site got a cracker's attack?
Can you post you gd information?? ACP > Tools & Maintenance > View PHP Info > then find the 'gd' header (~ half way down), and copy the contents of that table. May very well be useless but CAPTCHA is liked to gd, is it not??
Please try this:
<?php
if(gd_version() >= 2)
{
$im = imagecreatetruecolor($img_width, $img_height);
}
else
{
$im = imagecreate($img_width, $img_height);
}
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);
// Output the image
header("Content-type: image/png");
imagepng($im);
imagedestroy($im);
exit;
Please upload this to your server and post the link.
<?php
if(gd_version() >= 2)
{
$im = imagecreatetruecolor($img_width, $img_height);
}
else
{
$im = imagecreate($img_width, $img_height);
}
$bg_color = imagecolorallocate($im, 255, 255, 255);
imagefill($im, 0, 0, $bg_color);
// Output the image
header("Content-type: image/png");
imagepng($im);
imagedestroy($im);
exit;
function gd_version()
{
static $gd_version;
if($gd_version)
{
return $gd_version;
}
if(!extension_loaded('gd'))
{
return;
}
if(function_exists("gd_info"))
{
$gd_info = gd_info();
preg_match('/\d/', $gd_info['GD Version'], $gd);
$gd_version = $gd[0];
}
else
{
ob_start();
phpinfo(8);
$info = ob_get_contents();
ob_end_clean();
$info = stristr($info, 'gd version');
preg_match('/\d/', $info, $gd);
$gd_version = $gd[0];
}
return $gd_version;
}
Sorry, try this one instead
I'm getting a 404 to the url