Hello to all. I have a problem with registration (screen attached).
I probably always have a problem in config.php
The registration site is located at the mesyan on Pc, the mysql server is on another cospyuter, they are interconnected with HAMACHI. How to do? Mb is there another way to register through the site, srkript, template?
Quote:
<?php
$sql_host="ip pc mysql"; // It can be : localhost\sqlexpress
$sql_user="sa";
$sql_password="";
$Auth_db="Auth";
$md5_key="2011";
$registration = "1";
$max_accounts = "50";
?>
Rummaged the entire forum, and this and that does not work. Perhaps for you it is easy, I have been suffering for a day.
Mistake :
Quote:
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\register\index.php on line 25
index.php
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Arcadia Test Server</title>
<?php
require("conf.php");
if ($registration ==0){
?>
<h1>Registrations closed</h1>
</div>
</div>
<?php
exit;
}
if(isset($_SERVER['HTTP_REFERER'])
&& $_SERVER['HTTP_REFERER']!=''
&& substr($_SERVER['HTTP_REFERER'], 7, strlen($_SERVER['SERVER_NAME'])) != $_SERVER['SERVER_NAME'])
{
$_POST = array();
$_GET = array();
}
function connect(){
require("conf.php");
$db = $Auth_db;
$connect = mssql_connect($sql_host, $sql_user, $sql_password);
if (!$connect) {echo 'connection error'; exit;}
mssql_select_db($db, $connect) or die("Couldn't open database $db");
return $connect;
}
$do = $_POST['do'];
switch($do){
case "register":
$data_array = &$_POST;
$array_char = array("'","/","\\","*",":","!","?",".", "&", "%", "ù","^", "$", "=","¨","}","{","(",")","~","#","[","]","ç","à","é","€","§",";","¤","°","£","`","<",">") ;
$username = $data_array['name'];
$username = str_replace($array_char, "", $username);
$password = $data_array['pwd'];
$password = str_replace($array_char, "", $password);
$passwordconf = $data_array['pwdconf'];
$passwordconf = str_replace($array_char, "", $passwordconf);
$combine_password = $md5_key.$password;
$converted_password = md5($combine_password);
if ($password != $passwordconf){
echo "<span style=\"color:red\">Passwords don't match !</br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
if (strlen($username) <= 5){
echo "<span style=\"color:red\">You need 5 characters at least in your account name</br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
if (strlen($password) <= 6){
echo "<span style=\"color:red\">You need 5 characters at least in your account password</br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
if (strstr ($username, " ") !== False){
echo "<span style=\"color:red\">You need to use alpha/numeric characters! </br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
if (strstr ($password, " ") !== False){
echo "<span style=\"color:red\">You need to use alpha/numeric characters! </br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
$db = connect();
$query_check ="SELECT login_name from Accounts WHERE login_name='$username'";
$query = "INSERT Accounts( login_name,password,block,withdraw_remain_time,age ,auth_ok,pcbang,last_login_server_idx,event_code,r esult ) VALUES('$username','$converted_password',0,0,18,1, 1,1,0,1)";
$query_total = mssql_query("SELECT count(account_id) FROM Accounts");
$results_check = mssql_query($query_check);
$results_total = mssql_fetch_row($query_total);
$result_total = $results_total['0'];
if ($result_total >= $max_accounts){
echo "<span style=\"color:red\">Max accounts limit has been reached, sorry..</br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
while ($row_check = mssql_fetch_array($results_check)){
$check_username = $row_check['login_name'];
}
if ($check_username == $username){
echo "<span style=\"color:red\">Account already exist!</br><a href=\"javascript:refreshpage()\">Back</a></span>";
exit;
}
else
$results = mssql_query($query);
echo "Success, you can now download the launcher</br><a href=\"launcher.exe\">Here</a>, <br />and <a href=\"client.zip\">Client Here</a>";
break;
}
?>
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
function refreshpage()
{
setTimeout("location.reload(true);",20);
}
$(document).ready( function ()
{
$("#register").submit( function()
{ // à la soumission du formulaire
$.ajax(
{ // fonction permettant de faire de lajax
type: "POST", // methode de transmission des données au fichier php
url: "index.php", // url du fichier php
data: "do=register&"+"name="+$("#name").val()+"&pwd="+$( "#pwd").val()+"&pwdconf="+$("#pwdconf").val(),// données à transmettre
success: function(msg)
{ // si lappel a bien fonctionné
if (msg)
{
$("div#connexion").hide().fadeIn(1200).html(msg) ;
}
else
{
$("div#erreur").hide().fadeIn(1200).fadeOut(5200). html("<p style=\"color:red\"><img src=\"../client/help/img/error.png\" width=\"20px\" heigth=\"20px\"/> An error occured</p></br>");
}
}
});
return false; // permet de rester sur la même page à la soumission du formulaire
});
});
$(document).ready(function()
{
$("#loadpage").fadeIn(920);
});
</script>
</head>
<body>
<div id="loadpage" style="display:none">
<noscript><div id="loadpage"></div></noscript>
<div style="text-align: center; width: 100%; margin-top: 150px;">
<p>
<img src="logo.png" alt="Arcadia Dev"><br /><h2>NCarbon for Arcadia Dev</h2><br /><br />
</p>
<div id="connexion">
<form name="register" id="register" action="#" class="main_form"><!-- Form begin -->
<div class="main_form">
<label for="name">Username</label>
<div class="div_textbox">
<input type="text" name="name" id="name" /><!-- Login Value -->
</div>
</div>
<div class="main_form">
<label for="pwd">Password</label>
<div class="div_textbox"><!-- Password Field -->
<input type="password" name="pwd" id="pwd" />
</div>
</div>
<div class="main_form">
<label for="pwdconf">Confirm password</label>
<div class="div_textbox">
<input type="password" name="pwdconf" id="pwdconf" /></br>
</div>
</div>
<div class="clear"></div>
<p style="text-align: center; margin: auto; margin-top: 10px;">
<!-- Submit Button -->
<input type="submit" value="Create Account" style="margin: auto;" />
</p>
</form><!-- End of form -->
</div></br>
<div id="erreur"></div><!-- span qui contiendra les éventuels messages derreur -->
<span id="confirmMsg"></span>
</div></div><i>Don't use special char in your password or username, it will be deleted by our internal security system</i></br>
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\register\index.php on line 25
rus:as said, your php don't know function mssql_connect and all mssql functions.
You need php5 with support mssql
бро, просто проблема то наверное не в php, потому что я делал по гайду. Скорее проблема то в том , что XAMPP находится на 1 компе, а сервер и бд mysql на другом компе, соединены они через хамачи. И в config.php я прописал не те данные с бд. Мб есть какой то простой способ сделать регу?)
eng:
bro, just the problem is probably not in php, because I did the guide. Rather, the problem is that XAMPP is on 1 computer, and the server and mysql database on another computer, they are connected via hamachi. And in config.php I registered the wrong data from the database. MB is there any simple way to do the regulation?)
p.s Я играл на твоем сервеxD/
i played on your xD server
бро, просто проблема то наверное не в php, потому что я делал по гайду. Скорее проблема то в том , что XAMPP находится на 1 компе, а сервер и бд mysql на другом компе, соединены они через хамачи. И в config.php я прописал не те данные с бд. Мб есть какой то простой способ сделать регу?)
eng:
bro, just the problem is probably not in php, because I did the guide. Rather, the problem is that XAMPP is on 1 computer, and the server and mysql database on another computer, they are connected via hamachi. And in config.php I registered the wrong data from the database. MB is there any simple way to do the regulation?)
p.s Я играл на твоем сервеxD/
i played on your xD server
No matter where you host a database, your PHP should support MSSQL driver to connect.
you have php_mssql.dll library extension not installed at all or missing required configuration for PHP to support it.
you're trying to call PHP function that is undefined according to your error output. simple logic: if its an undefined php function, you should do sumn to make it defined php function.
there are a lot of issues with this library though that you can meet, especially with old PHP versions or ntwdblib core library used in PHP itself. i don't remember all of them at all but i can advice: it's a deprecated, not currently maintained library that has a lot of modern analogs, as like driver library.
honestly, you better learn how to work with newer tools than learn how to maintain deprecated ones if you never did and dont completely understand how to do that.
EDIT: don't use XAMPP. it's a quite simply installed tool but it has a lot of deprecated packages that are hard to maintain and designed for local server web projects testing, not for production usage. especially take a loot at found whose are so stupid to use this product for a serious project
бро, просто проблема то наверное не в php, потому что я делал по гайду. Скорее проблема то в том , что XAMPP находится на 1 компе, а сервер и бд mysql на другом компе, соединены они через хамачи. И в config.php я прописал не те данные с бд. Мб есть какой то простой способ сделать регу?)
eng:
bro, just the problem is probably not in php, because I did the guide. Rather, the problem is that XAMPP is on 1 computer, and the server and mysql database on another computer, they are connected via hamachi. And in config.php I registered the wrong data from the database. MB is there any simple way to do the regulation?)
p.s Я играл на твоем сервеxD/
i played on your xD server
Как тебе уже сказали проблема в твоём php который не поддерживает функции mssql
eng
as all said, problem on your php, because it does not support mssql functions
And where is the script to find?) I have already rummaged through the entire Internet
not the point. the point is: you say "it's hard to be a dev", when you use readymade stuff you didn't develop. it's not related to dev at all, its administrative stuff.
#1 Connect using Windows Authentication.
<?php
$serverName = "serverName\sqlexpress"; //serverName\instanceName
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"dbName");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
#2 Connect by specifying a user name and password.
<?php
$serverName = "serverName\sqlexpress"; //serverName\instanceName
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
[Selling] Pre-registration reward for Summoners War: Rift of Worlds 1$ Pre-registration reward 12/15/2015 - Summoners War Trading - 0 Replies “Summoners War: The Rift of Worlds” is now available!
http://i.imgur.com/uZ71itv.png
<Download Summoners War>
http://m.withhive.com/b?i=9447&g=9446
<Get Pre-registration Reward>
Autobuy:
https://payivy.com/v/9a4ce
Phpbb3-Xauth Bridge [nutzt eure Foren Registration als In-Game User Registration] 12/02/2012 - Minecraft Guides & Strategies - 13 Replies Phpbb3-Xauth Bridge
Version 1.0 Alpa
Ich habe das PhpBB3 so verändert das ihr es mit xAuth verwenden könnt
Im Detail bedeutet das:
Eure User müssen sich dann in eurem Forum Registrieren um auf eurem Server spielen zu können. Nach der Foren Registration sind diese dann automatisch In-Game registriert das hat zum Vorteil, das die User zwar etwas länger für die Registration brauchen ihr aber all eure User im Forum und In-Game unter dem gleichen Namen findet.
Benötige Files
Das...
Warrock Korean Registration Guide 12/24/2007 - Foreign Games - 2 Replies So if you want to play it you should visit this site : http://entermatrix.net/warrock.php?guide=kor_kb#
Need Help with acc registration 07/17/2006 - Final Fantasy XI - 3 Replies Can someone please give me a guestpass key for FFXI? Or a download key for the game?
because i got an account and no DL key. And I don't have the CD's ^^;
Or can anybody please upload the PlayOnline Viewer at rapidshare
It's really important so please help me out.
Hidden