Elxis CMS Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: IOS Reservations online hotel booking system for Elxis CMS.
 
Pages: [1]
  Print  
Author Topic: Registration  (Read 564 times)
1050
Newbie
*
Offline Offline

Posts: 33


« on: March 10, 2012, 09:23:14 »

Hi,
I want to use the Captcha in my registration form, But It always give me Captcha verificationerror . what's the problem?
It's the default code:
/* SECURITY CHECK */
   if ($mainframe->getCfg('captcha')) {
        $code = getEncString(trim( mosGetParam($_POST, 'code', '')));
        if ($code != $_SESSION['captcha']) {
            elxError(_E_INV_SECCODE, 1);
            return;
      }
   }
I changed this line of the code :
 $code = getEncString(trim( mosGetParam($_POST, 'code', '')));
to:
 $code = getEncString(trim( mosGetParam($_POST, 'code')));
and It does'nt give that error anymore, I red about the third parameter of the mosGetParam and It said that the third one is optional, Is it work now? I mean doeas it check the captcha ?

thank you Smiley
« Last Edit: March 10, 2012, 09:33:15 by 1050 » Logged
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 7592



WWW
« Reply #1 on: March 10, 2012, 11:15:45 »

If sessions are not properly setup on your web server captcha will not work as expected.
Do you see too many visitors in your site? Each time toy refresh the page does the number of visitors increase? If yes, sessions are not properly setup. The problem with session, usually, is that people do not set the session.save_path directive correctly in php.ini
Logged

1050
Newbie
*
Offline Offline

Posts: 33


« Reply #2 on: March 10, 2012, 12:59:01 »

I think It's not my session problem,cause now (with that change I 'made) when I enter the code wrong It gives me the error and when I enter it correct it accepts my registration, this means that the sessions work correctly, yes?
Logged
datahell
Elxis Team
Hero Member
*****
Offline Offline

Posts: 7592



WWW
« Reply #3 on: March 10, 2012, 14:32:40 »

No, this is not the case. Read carefully what I wrote above.
Logged

1050
Newbie
*
Offline Offline

Posts: 33


« Reply #4 on: March 11, 2012, 07:51:40 »

I read that but the number of visitors does not increase! and there's a lot of session in my eshop, if my session didn't work probably, I had alot of problem!Anyway I will check my php.ini
Logged
Pages: [1]
  Print  
 
Jump to: