1 (edited by marnevi 2017-07-20 21:52:46)

Topic: capcha doesn't work

Hi guys. I've changed my hosting service and there is a issue concerning capcha. I don't understand why it doesn't work anymore.
Look here:
http://www.pasqualemarinelli.com/index. … ude_id=101

P.S. This is Cutenews 1.46

Re: capcha doesn't work

Hello,

It seems that you do not upload a font file. Check the availability and availability of the font file.

Best regards,
CN Support team

3 (edited by marnevi 2017-07-24 18:25:10)

Re: capcha doesn't work

font file is uploaded in cutenews/captcha/ directory.
And this is the code in captcha.php file:

<?php
// include captcha class
require('php-captcha.inc.php');

// define fonts
$aFonts = array('VeraMoBd.ttf');

// create new image
$oPhpCaptcha = new PhpCaptcha($aFonts, 200, 60);
//$oPhpCaptcha->DisplayShadows(true);
$oPhpCaptcha->UseColour(true);
$oPhpCaptcha->Create();
?>

What is wrong?

Re: capcha doesn't work

anybody could help me?

Re: capcha doesn't work

please, help me!

Re: capcha doesn't work

Judging by the resulting error, the font file still was not loaded. Probably, the wrong way is specified.

The font is loaded into PHP-captcha.inc.PHP lines 296 and 304 - you need to check them.

Best regards,
CN Support team

7 (edited by marnevi 2017-07-27 20:56:14)

Re: capcha doesn't work

this is line 296 in PHP-captcha.inc.PHP file:

            $aCharDetails = imageftbbox($iFontSize, $iAngle, $sCurrentFont, $this->sCode[$i], array());

and this is line 304 in PHP-captcha.inc.PHP file:

            imagefttext($this->oImage, $iFontSize, $iAngle, $iX, $iY, $iTextColour, $sCurrentFont, $this->sCode[$i], array());

could you help me to find what is wrong?

Re: capcha doesn't work

Anybody?

Re: capcha doesn't work

Support_Team, no other suggestion?

Re: capcha doesn't work

The only problem here is that $ sCurrentFont has the wrong path specified, or a path where the file for loading is not located - this can only be corrected if you check all paths and assign either the correct path, or create the necessary folder structure and put the font file. This way is impossible to learn now, you need to use debugging, for example inserting echo $ sCurrentFont before these lines. Open the img-file captcha http://www.pasqualemarinelli.com/a/capt … ?width=144 after you insert debugging, the path should appear. Put the required file there

Best regards,
CN Support team