Page 1 of 1

Cant login into server. :(

Posted: Sat Feb 13, 2010 6:14 pm
by Vitaliks2390
Hello every body. Sorry for my bad english. But i realy need help. I wish to know, why i cant login in server. I have l2j epilogue. Ok lets begin. After auto create account registration i can logined in game. But when i register from web site, i cant login in. I have mesage like this
The password you have entered is incorrect. Confirm your account information and log in again leter.
If enyone know how to take of this warning, please help (.
Thnx.

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 7:01 pm
by qwerty13
1. I think problem in your web. Check your web registration script.
2. You posted in wrong section.

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 7:09 pm
by janiii
moved to support

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 7:44 pm
by Vitaliks2390
Noooot. Registration script is correct. Couse all in formation goes to account table, and all correct. why i cant log in the game?

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 8:00 pm
by janiii
probably you are not using the right account table or you use wrong database. check your database settings that you use the right database!

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 8:06 pm
by Vitaliks2390
Oh maaan. My database is l2jdb. table 'accounts' = where are all f****g sorry accounts.

Code: Select all

<?php    if (isset($_POST['login'])) { $login = $_POST['login']; if ($login == '') { unset($login);} } //заносим введенный пользователем логин в переменную $login, если он пустой, то уничтожаем переменную    if (isset($_POST['password'])) { $password=$_POST['password']; if ($password =='') { unset($password);} }    //заносим введенный пользователем пароль в переменную $password, если он пустой, то уничтожаем переменную if (empty($login) or empty($password)) //если пользователь не ввел логин или пароль, то выдаем ошибку и останавливаем скрипт    {    exit ("You did not enter all the information, please go back and fill in all fields!");    }    //если логин и пароль введены,то обрабатываем их, чтобы теги и скрипты не работали, мало ли что люди могут ввести    $login = stripslashes($login);    $login = htmlspecialchars($login); $password = stripslashes($password);    $password = htmlspecialchars($password); //удаляем лишние пробелы    $login = trim($login);    $password = trim($password); // подключаемся к базе    include ("db.php");// файл bd.php должен быть в той же папке, что и все остальные, если это не так, то просто измените путь  // проверка на существование пользователя с таким же логином    $result = mysql_query("SELECT login FROM accounts WHERE login='$login'",$db);    $myrow = mysql_fetch_array($result);    if (!empty($myrow['id'])) {    exit ("Sorry this login exists. Please chouse an other.");    } // если такого нет, то сохраняем данные    $result2 = mysql_query ("INSERT INTO accounts (login,password) VALUES('$login','". md5($password)."')");    // Проверяем, есть ли ошибки    if ($result2=='TRUE')    {    echo "You are succesfully registred. Now you can go to our <a href='http://xxx.xxx.xxx/index.php'>Website</a>";    } else {    echo "You did not registred! Go back and try one mor time.";    }?>
How it possibol my script is incorrect?

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 8:07 pm
by janiii
check what database uses your server. if it is the same as your php script.

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 8:16 pm
by Vitaliks2390
My databse is l2jdb. I am not so stupid than dont know my data base.
How match i can explane you than i have all ok
Re: Cant login into server. :(

Post by Vitaliks2390 on Sat Feb 13, 2010 9:44 pm
Noooot. Registration script is correct. Couse all in formation goes to account table, and all correct. why i cant log in the game?
Mabe in server are some stufs who prohibits me log in?

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 10:28 pm
by jurchiks
what about
include ("db.php");
??
although if you manually checked the new database record...
is it really md5 hash?
hmm, when does the server encode that password?
or it should be in the php script?
i mean the
base64_encode(pack('H*', sha1($pwd)))

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 10:35 pm
by _DS_
Vitaliks2390 wrote: $result2 = mysql_query ("INSERT INTO accounts (login,password) VALUES('$login','". md5($password)."')");
Its wrong.

Re: Cant login into server. :(

Posted: Sat Feb 13, 2010 10:46 pm
by jurchiks

Code: Select all

	  		mysql_query("INSERT INTO accounts (login, password, access_level) VALUES ('".$_POST['account']."', '".base64_encode(pack('H*', sha1($_POST['password'])))."', 0)", $link);  			mysql_close($link);	 		print '<p class="error"><font color="#FFCC00"><b>Account created 100%</font></b></p>';
found this
you could also add the userIP column, in case people want to bind their account

Re: Cant login into server. :(!!!!!

Posted: Fri Dec 31, 2010 4:24 pm
by broukes
Hi everybody i've been working on trying to open a l2j server for the past 2 days and i am literally about to go crazy... Step after step i've been passing through these stages of bugs and it's driving me nuts, But i feel like i'm close to the end of my troubles.. I just cant login in my server.. L2.exe runs fine, but when i try to log in i get incorrect account or password. (system clean) (i dont know how to edit the host file) please help!!!

Re: Cant login into server. :(!!!!!

Posted: Fri Dec 31, 2010 6:11 pm
by hope
broukes wrote:Hi everybody i've been working on trying to open a l2j server for the past 2 days and i am literally about to go crazy... Step after step i've been passing through these stages of bugs and it's driving me nuts, But i feel like i'm close to the end of my troubles.. I just cant login in my server.. L2.exe runs fine, but when i try to log in i get incorrect account or password. (system clean) (i dont know how to edit the host file) please help!!!
Dont use the l2.exe use the updater first updating all files

Re: Cant login into server. :(

Posted: Tue Jun 05, 2012 12:13 am
by Arien
Reinstall client! antivirus?

Re: Cant login into server. :(

Posted: Tue Jun 05, 2012 12:40 am
by Zoey76
Arien wrote:Reinstall client! antivirus?
Dec 2010, locked.