Register for your free account! | Forgot your password?

You last visited: Today at 18:22

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Register page

Discussion on Register page within the Dekaron Private Server forum part of the Dekaron category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
Register page

Anyone have a guide on how to set up the reg page? I have it where I can access the page. When I put in the info and everything, it is saying I have an ODBC error.

I have looked on here and google and haven't found anything, any help?
Dr. Phil is offline  
Old 06/04/2009, 21:30   #2
 
naruto820's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 964
Received Thanks: 232
go to control panel-->administrative tools--->services--->ODBC manager--> system tab---->add new one and name it Account and choose account as default db, press ok and done.
naruto820 is offline  
Old 06/04/2009, 22:04   #3
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
Thankyou, I will try that.

When it has the drop down for "Server", I click the drop down, and nothing is there. o_O
Dr. Phil is offline  
Old 06/04/2009, 22:13   #4
 
naruto820's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 964
Received Thanks: 232
choose SQL server from teh drivers and click next then if your sql server doesnt show up on the list, go on service managger and copy the server name and paste it there.
naruto820 is offline  
Old 06/04/2009, 22:17   #5
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
Okay, now it said that the tests completed successfully. Going to try and make an account now. If this works, Ill click "thanks"

I get this error still:

Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'Tbl_user' when IDENTITY_INSERT is set to OFF., SQL state 23000 in SQLExecDirect in C:\AppServ\www\register.php on line 82
Dr. Phil is offline  
Old 06/04/2009, 22:22   #6
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
did you run SN.txt ?
janvier123 is offline  
Old 06/04/2009, 22:26   #7
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
Quote:
Originally Posted by janvier123 View Post
did you run SN.txt ?
Didn't know that was required because this server was once running, all I done was turn it off and done some edits and then decided to replace all server side files and restored my databases, I have to run it again?
Dr. Phil is offline  
Old 06/04/2009, 22:30   #8
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
yes try again
janvier123 is offline  
Old 06/04/2009, 22:31   #9
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
I did it again and it said it done the command successful. But when I try to make an account, Here is what I get at the top of the page.


Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'USER_PROFILE' when IDENTITY_INSERT is set to OFF., SQL state 23000 in SQLExecDirect in C:\AppServ\www\register.php on line 81

Warning: odbc_do() [function.odbc-do]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value for identity column in table 'Tbl_user' when IDENTITY_INSERT is set to OFF., SQL state 23000 in SQLExecDirect in C:\AppServ\www\register.php on line 82
Dr. Phil is offline  
Old 06/04/2009, 22:36   #10
 
naruto820's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 964
Received Thanks: 232
check line 81/82 of ur register.php, also what version of windows are u running x64 or 32?
naruto820 is offline  
Old 06/04/2009, 22:37   #11
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
I have checked it more than once, and nothing appears to be wrong with it and I am running 32 bit windows and have ran a server before with no problems at all.
Dr. Phil is offline  
Old 06/04/2009, 22:44   #12
 
naruto820's Avatar
 
elite*gold: 20
Join Date: Mar 2008
Posts: 964
Received Thanks: 232
hmm then u havent added the odbc properly.
make sure once ur in the odbc manager screen, click on system tab, clicl on new, from drivers (a lot of them) chose the last one which should say SQL server, go next and choose ur sql server from dropdown list. If it isnt there copy it from service manager and paste it on the server name in odbc window. click next and choose Account database as your default database. then click on finish and ok.
naruto820 is offline  
Old 06/04/2009, 22:57   #13
 
elite*gold: 0
Join Date: Apr 2009
Posts: 21
Received Thanks: 3
Thats what I have done already, I just done it again.

Microsoft SQL Server ODBC Driver Version 03.85.1132

Running connectivity tests...

Attempting connection
Connection established
Verifying option settings
Disconnecting from server

TESTS COMPLETED SUCCESSFULLY!

also, still getting same errors.
Dr. Phil is offline  
Old 06/05/2009, 02:04   #14
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
here is a version that does work, its only the register.php file
its the most important one

NOTE: read the BOLD parts

Quote:
<?php

require_once "config.inc.php";

if(isset($_SESSION[step2]) && isset($_POST[step2])) {
//提取的最后一步
$errorStr = formStep3();
if($errorStr!=null){
require_once('register.html');
}else{
require_once('success.html');
$suc=$success;
unset($_SESSION[step2], $_SESSION[step1]);
}}
else {
//Username
require_once('register.html');
$_SESSION[step2] = 1; }


//判断用户提交的表单的数据的 准确性 和 保存提交数据 的函数
function formStep3(){
$errors = array();
$errorStr = null;
//查询用户名是否存在
$strSql="select * from Tbl_user where user_id='$_POST[username]'";
if ($_POST[ZoneGroup]=="zone1") {
$account_odbc = odbc_connect('account','sa','admin');
} elseif ($_POST[ZoneGroup]=="zone2") {
$account_odbc = odbc_connect('account2','sa','admin');
} else {
die ("<p><b>分区选择错误!</b></p>");
}
$user_result=odbc_do($account_odbc,$strSql);
$result_query=odbc_fetch_row($user_result);
if (odbc_result($user_result,1)!= "") $errors[] = "This Accountname already exists, please choose another one.";
//验证用户名是否规范
if(!preg_match("/^[0-9a-zA-Z]{3,12}$/i", $_POST[username])) $errors[]="You are only alowed to use uppper and lower cases in English in your username.";
//验证用户名长度
if(strlen($_POST[username])<3) $errors[] = "The length of your username can't be less than 3 characters";
if(strlen($_POST[username])>12) $errors[]= "The length of your username can't be more than 12 characters";
//验证密码是否规范
if(!preg_match("/^[0-9a-zA-Z]{3,12}$/i", $_POST[password1])) $errors[]="You can only use English Characters of Upper case and lower case in your password. Try again";
if(preg_match("/^[0-9]{3,12}$/i",$_POST[password1])) $errors[]="You are not alowed just to input numbers as your password.";
//验证用户名和密码是否相同
if($_POST[username]==$_POST[password1]) $errors[]= "Accountname and password can't be the same!";
//验证密码长度
if(strlen($_POST[password1])<3) $errors[] = "The length of the password can't be less than 3 characters";
if(strlen($_POST[password1])>12) $errors[] = "The length of the password can't be more than 12 characters";
//验证密码一致性
if($_POST[password2]!=$_POST[password1]) $errors[] = "输入的密码不一致";
//验证找回密码问题答案长度
if(strlen($_POST[question])>20) $errors[] = "The length of the secret question can't be more than 20 characters";
if(strlen($_POST[question])<5) $errors[] = "The length of the secret question can't be less than 5 characters";
if(strlen($_POST[answer])>20) $errors[] = "The length of the secret answer can't be more than 20 characters";
if(strlen($_POST[answer])<5) $errors[] = "The length of the secret answer can't be less than 5 characters";
//验证用户email正确性
if(!preg_match("/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i",$_POST[mail])) $errors[]="Your E-mail Adress is not valid. Please enter a valid one.";


//错误信息输出
if(sizeof($errors)>0){
$errorStr .= "<br><font>";
$errorStr .= "You have the following error(s):";
foreach($errors as $error)
$errorStr .= "<li>$error</li>";
$errorStr .= "</font><br><br>";
}else{

//加密密码
$passwd_user=md5($_POST[password1]);
//获取user_no
$dk_time=strftime("%y%m%d%H%M%S");
list($usec1, $sec1) = explode(" ",microtime());
$dk_user_no=$dk_time.substr($usec1,2,2);
//用户注册语句
$dk_account_query="insert into user_profile(user_no,user_id,user_pwd,resident_no, user_type,login_flag,login_tag,ipt_time,login_time ,logout_time,user_ip_addr,server_id) values('$dk_user_no','$_POST[username]','$passwd_user','801011000000','1','0','Y','01/01/2006 00:00:00',null,null,null,'000')";
//用户资料保存
$dk_account_query2="insert into Tbl_user(user_no,user_id,user_pwd,user_mail,user_a nswer,user_question) values('$dk_user_no','$_POST[username]','$_POST[password1]','$_POST[mail]','$_POST[answer]','$_POST[question]')";
//执行用户注册和资料保存语句
$dk_account_result1=odbc_do($account_odbc,$dk_acco unt_query);
$dk_account_result2=odbc_do($account_odbc,$dk_acco unt_query2);
odbc_close($account_odbc);



}
//返回错误消息到页面
return $errorStr;
}

?>
janvier123 is offline  
Old 06/06/2009, 12:59   #15
 
janvier123's Avatar
 
elite*gold: 20
Join Date: Nov 2007
Posts: 2,853
Received Thanks: 1,876
Good news,

yesterday, after we did a wipe on the DB i got the same error msg
i tryed also anything, it seems that i uploaded a version that has things missing in it

Dr. Phil
please delete all your DB's and install this one

the error was gone and the page was fixed

good luck
janvier123 is offline  
Reply


Similar Threads Similar Threads
register page
04/30/2010 - Cabal Private Server - 1 Replies
hiya i need help to make a register page could some one please help me to make one i really need help or send me a link for tutorial thanks i need simple nice layout could anyone please help me
Register page
02/18/2010 - CO2 Private Server - 8 Replies
I tried using this register page. http://www.elitepvpers.com/forum/co2-pserver-guide s-releases/381506-release-simple-regpage-5165-a.ht ml But every account I use it says wrong account or password, anyone know whats wrong? I'm not much of a php person lmao.
Register page
02/12/2010 - Metin2 Private Server - 2 Replies
Hallo liebe Community, Ich m鯿hte gerne eine Registration磗 seite machen aber von RapidShare kann ich sie nicht downloaden help pls.
Register Page Bug
08/03/2009 - Dekaron Private Server - 2 Replies
Any1 know fix it ? Thx Screen of Error : Imageshack - imagenet
[HELP]Register page
06/29/2009 - CO2 Private Server - 0 Replies
i need help with this register page, for some reason whenever i register it doesnt go through but when other people register for my server it goes through perfectly. my accounts save to ini so can any1 give me a tutoriol on how to use the register page on here lol im used to my old reg page that was just input username and then its all done



All times are GMT +2. The time now is 18:22.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.