forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Wed Nov 22, 2017 9:09 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Captcha problem
PostPosted: Wed Nov 02, 2011 5:04 pm 
Offline

Joined: Wed Nov 02, 2011 5:01 pm
Posts: 3
Hey!
I'm new here and I install webDiplomacy to my server, but now I have problem beacuse registration doesn't working ;)
Everything is fine but captcha image doesn't show up ;) Here is link to my game: http://testing-server.net46.net/register.php

Please if anyone can help I will be really happy ;)

Thanks a lot and greetings!

P.S.: Here is my code from easycaptcha.php

Code:
<?php

/**
 * @package Base
 * @subpackage EasyCaptcha
 */

require_once('php-captcha.inc.php');

$fonts = array('VeraBd.ttf');

$alphabet = 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_r_s_t_u_v_z';
$alphabet = explode('_', $alphabet);
shuffle($alphabet);


$captchaText = '';
for($i = 0; $i < 4; $i++ )
{
   $captchaText .= $alphabet[$i];
}

$time = time();

define('IN_CODE', 1);
require_once('../config.php');

setcookie('imageToken', md5(Config::$secret.$captchaText.$_SERVER['REMOTE_ADDR'].$time).'|'.$time, null, '/');

$oVisualCaptcha = new PhpCaptcha($fonts, strlen($captchaText) * 30, 60);
$oVisualCaptcha->UseColour(true);
$oVisualCaptcha->Create($captchaText);

?>


Top
 Profile  
 
 Post subject: Re: Captcha problem
PostPosted: Wed Nov 02, 2011 6:35 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Try to insert the complete path on your server to the font (he's located in the contrib directory):
Quote:
$fonts = array('VeraBd.ttf');


Top
 Profile  
 
 Post subject: Re: Captcha problem
PostPosted: Thu Nov 03, 2011 8:22 am 
Offline

Joined: Wed Nov 02, 2011 5:01 pm
Posts: 3
Hey, it doesn't working :(

Here is new code:

Code:
<?php

/**
 * @package Base
 * @subpackage EasyCaptcha
 */

require_once('php-captcha.inc.php');

$fonts = array('/public_html/contrib/VeraBd.ttf');

$alphabet = 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_r_s_t_u_v_z';
$alphabet = explode('_', $alphabet);
shuffle($alphabet);


$captchaText = '';
for($i = 0; $i < 4; $i++ )
{
   $captchaText .= $alphabet[$i];
}

$time = time();

define('IN_CODE', 1);
require_once('../config.php');

setcookie('imageToken', md5(Config::$secret.$captchaText.$_SERVER['REMOTE_ADDR'].$time).'|'.$time, null, '/');

$oVisualCaptcha = new PhpCaptcha($fonts, strlen($captchaText) * 30, 60);
$oVisualCaptcha->UseColour(true);
$oVisualCaptcha->Create($captchaText);

?>


Top
 Profile  
 
 Post subject: Re: Captcha problem
PostPosted: Thu Nov 03, 2011 7:25 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Matevzs1 wrote:
Code:
<?php
$fonts = array('/public_html/contrib/VeraBd.ttf');

Is your webdiplomacy install really in your main "public_html"?
Usually it's in /public_html/webdiplomacy (or similar)...
Also you might have to specify the full path on the hd, not only the path relative to the httpd directory. (eg. '/usr1/httpd-2.2.3/htdocs/users/oli/webdiplomacy/contrib/VeraBd.ttf')

Oliver


Top
 Profile  
 
 Post subject: Re: Captcha problem
PostPosted: Thu Nov 03, 2011 8:34 pm 
Offline

Joined: Wed Nov 02, 2011 5:01 pm
Posts: 3
yes, game is on public_html file ;)


Top
 Profile  
 
 Post subject: Re: Captcha problem
PostPosted: Thu Nov 03, 2011 9:17 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Matevzs1 wrote:
yes, game is on public_html file ;)

Than you should try to set the full path
(eg. '/usr1/httpd-2.2.3/htdocs/users/oli/webdiplomacy/contrib/VeraBd.ttf')


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group