Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead. There is no support for other server builds than the official provided by l2jserver.com
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.
<?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."; }?>
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?
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)))
Last edited by jurchiks on Sat Feb 13, 2010 10:40 pm, edited 1 time in total.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
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
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste! Discussion breeds innovation.
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!!!
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