Registration page not connects to server
Hi again... Ive got a problem....is not connecting the registration page to the server... its keep saying Cannot connect to (192.168.10.1:8081) in config.php ... where should be the problem?
I must put a script or something in to database of atum2_db_account ? So the reg page can connect?
Any ideas?
Thank you.
Re: Registration page not connects to server
192.168.10.1:"8081" ?? why did you try to connect on 8081.
Forst of all, did you get something like this on your config.php?
<?php
$sql_server='';// IP Adress of the sql Server
$sql_username='';// SQL Username
$sql_password='';//SQL Password
$db1 = 'atum2_db_1';
$db2 = 'atum2_db_account';
?>
And did you include your config.php on your registration page?
And did you add the add-on for mssql server on your php server?
Re: Registration page not connects to server
No... lol... this is TOTALLY different of what do i got in config.php...
And i am trying to connect to the 8081 because this is the port that i am useing with apache2.2.
When i had 2.2 episode it was working perfectly....
Now when i got 3.3 the registration page is not connecting anymore to database.
I am pretty sure that this will work...
Can you please upload them here?
i think the only php that i will need is the config.php
Thank you for responding.
Dark.
Ok so i copied that script, i modified it and i had a lot of errors in the register_do.php
The one and the last error that is giving to me, is this one:
Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in H:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\register_do.php on line 20
Couldn't open database Account
mssql_select_db(): <---this is the problem
and on to what do i change it?
Or please upload the registers.
Thanks again for help.
Dark. Over.
Re: Registration page not connects to server
why port 8081?? you don´t need to put there the port from your Apache, you have to put there the port from your database
Re: Registration page not connects to server
Yes thanks for the advice... now i am waiting someone who will want to help, to upload the phps.
Thank you.
Re: Registration page not connects to server
Re: Registration page not connects to server
i got a website lol... and 1st of all i was asking about the phps for the registration page..
Don't post shits that doesn't have to do with the problem.
Re: Registration page not connects to server
website oroginal
not
xxxx.webs.com
u need www.ur domaine.com.
Re: Registration page not connects to server
Dude...are you nut? really? gezzez... when i said I got a domain... means that I GOT A .COM not WEBS.COM
---------- Post added at 09:05 PM ---------- Previous post was at 09:03 PM ----------
This is my site how this sounds?
---------- Post added at 09:08 PM ---------- Previous post was at 09:05 PM ----------
Now...can someone please give me the register_do.php? especially i am talking to #desp08500
Thank you.
Re: Registration page not connects to server
Quote:
Originally Posted by
darkmandos
Dude...are you nut? really? gezzez... when i said I got a domain... means that I GOT A
.COM not
WEBS.COM
---------- Post added at 09:05 PM ---------- Previous post was at 09:03 PM ----------
This is my site how this sounds?
---------- Post added at 09:08 PM ---------- Previous post was at 09:05 PM ----------
Now...can someone please give me the register_do.php? especially i am talking to #desp08500
Thank you.
ok sorry :3
Re: Registration page not connects to server
Hmm select_db error, i got this one some time, and to resolve it, i just don't use it and take the full access of the db like select * from atum2_db_1.dbo.ti(or td).nameoftable.
Anyway if you use the registration script that we can find on this site, i was trying it too, it's not really secure and got lot's of error, i modify it a lot to get something partially good.
So if i can help i will. Me too i need some release since someday but nothing appeared...
---------- Post added at 09:36 PM ---------- Previous post was at 09:27 PM ----------
Code:
<?php
$cryptinstall="./crypt/cryptographp.fct.php";
include $cryptinstall;
include("config.php");
$username = $_POST['username'];
$conn = mssql_connect($sql_server, $sql_username, $sql_password);
$link = mssql_select_db($db2, $conn);
if (chk_crypt($_POST['code']))
{
}
else
{
echo "<CENTER><b>Erreur de code recommencer:</b></CENTER><br />";
echo '<a href="./index.php"> retour aux inscriptions</a><br />';
}
if (chk_crypt($_POST['code']))
{
if(isset($_POST['step2']))
{
$errorStr = formStep3();
if($errorStr!=null){
require_once("index.php");
}}
else {
require_once('index.php');
$_SESSION['step2'] = 1;
}
}
function formStep3(){
include("config.php");
$selected = mssql_select_db('atum2_db_account', $dbhandle)
or die("Ne peut pas ouvrir la base Account");
$errors = array();
$errorStr = null;
if(preg_match("/^[0-9a-zA-Z]{3,15}$/i", $_POST['username']))
{
$strSql="select AccountName from atum2_db_account.dbo.td_Account where AccountName= '$_POST[username]'";
$result = mssql_query($strSql);
$Count = mssql_num_rows($result);
if ($Count > 0) {
echo "<CENTER><b>Erreur:</b> Nom utilisateur déjà utilisé</CENTER><br />";
echo '<a href="./index.php"> retour aux inscriptions</a><br />';
exit;
}}
if ($_POST['username'] == "")
{
echo "<CENTER><b>Erreur:</b> Entrez un compte valide</CENTER><br />";
echo '<a href="./index.php"> retour aux inscriptions</a><br />';
exit;
}
if ($_POST['password1'] == "" OR $_POST['password1'] != $_POST['password2'] OR $_POST['password2'] == "")
{
echo "<CENTER><b>Erreur:</b> Entrer un mot de passe valide </CENTER><br />";
echo '<a href="./index.php"> retour aux inscriptions</a><br />';
exit;
}
else
{
include("config.php");
$sql1 = "SELECT MAX(AccountUniqueNumber) AS Nbenregistrer FROM atum2_db_account.dbo.td_Account";
$result = mssql_query($sql1,$conn);
$data = mssql_fetch_array($result);
echo "Nombre d'utilisateurs enregistrés sur ce serveur: ";
$compter = $data['Nbenregistrer'];
$compter2 = ++$compter;
echo $compter2;
echo "<br />";
echo '<a href="./index.php"> retour accueil du site</a><br />';
$userid= $_POST['username'];
$passwd_user=$_POST['password1'];
$regquery = "INSERT INTO atum2_db_account.dbo.td_Account (AccountUniqueNumber, AccountName, Password, AccountType) VALUES ('$compter2','$userid', '$passwd_user', '0')";
$result1 = mssql_query($regquery,$conn);
$regquery2 = "INSERT INTO site.dbo.Inscription (AccountUniqueNumber, AccountName, Password, AccountType, Point, Cash) VALUES ('$compter2', '$userid', '$passwd_user', '0', '0', '0')";
$result30 = mssql_query($regquery2,$conn);
mssql_close($dbhandle);
}
#return $errorStr;
}
?>
It's my registration script...you have to translate it and delete some code in it to get it work for you.
I'm not a bad guy today,hope you will find something good
Re: Registration page not connects to server
Ok now i got this shit...
I opened the table dbo.td_Account, and i tryed to change the Unique key from there... so i can make it NULL
look this errors..
Warning: mssql_query() [function.mssql-query]: message: Cannot insert the value NULL into column 'AccountUniqueNumber', table 'atum2_db_account.dbo.td_Account'; column does not allow nulls. INSERT fails. (severity 16) in H:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\register.php on line 51
Warning: mssql_query() [function.mssql-query]: Query failed in H:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\register.php on line 51
Re: Registration page not connects to server
Man look the code that i give you,
$sql1 = "SELECT MAX(AccountUniqueNumber) AS Nbenregistrer FROM atum2_db_account.dbo.td_Account";
$result = mssql_query($sql1,$conn);
$data = mssql_fetch_array($result);
echo "Nombre d'utilisateurs enregistrés sur ce serveur: ";
$compter = $data['Nbenregistrer'];
$compter2 = ++$compter;
echo $compter2;
$userid= $_POST['username'];
$passwd_user=$_POST['password1'];
$regquery = "INSERT INTO atum2_db_account.dbo.td_Account (AccountUniqueNumber, AccountName, Password, AccountType) VALUES ('$compter2','$userid', '$passwd_user', '0')";
$result1 = mssql_query($regquery,$conn);
$regquery2 = "INSERT INTO site.dbo.Inscription (AccountUniqueNumber, AccountName, Password, AccountType, Point, Cash) VALUES ('$compter2', '$userid', '$passwd_user', '0', '0', '0')";
$result30 = mssql_query($regquery2,$conn);
mssql_close($dbhandle);
}
#return $errorStr;
}
?>
This code count the number of users register on database account then do a +1 on this and make the insert ligne on database.
You got the answer since the beginning.
Re: Registration page not connects to server
Dont wastle time on him...have mental problems...
So my solution is:
Select your table, click on it >Script Table as> Create to> Newquerry Editor Windows>connecto your server and copy all insede the new querry windows and paste it inside any .txt file save it.
from atum2_db_account delete the table dbo.td_Account.
in txt file search for this line:
CREATE TABLE [dbo].[td_Account](
[AccountUniqueNumber] [int] NOT NULL,
and add the red thing
CREATE TABLE [dbo].[td_Account](
[AccountUniqueNumber] [int] identity (1,1) NOT NULL,
copy all in txt file with the new change and paste it inside a new querry windows, first u need be inside atum2_db_account>tables click on +
then run the script.
what identity (1,1) do : increase the value of the column automatically 1 by 1.
remember to clear the php code who desp08500 give u .And c what happend.
Re: Registration page not connects to server
Quote:
Originally Posted by
desp08500
Man look the code that i give you,
$sql1 = "SELECT MAX(AccountUniqueNumber) AS Nbenregistrer FROM atum2_db_account.dbo.td_Account";
$result = mssql_query($sql1,$conn);
$data = mssql_fetch_array($result);
echo "Nombre d'utilisateurs enregistrés sur ce serveur: ";
$compter = $data['Nbenregistrer'];
$compter2 = ++$compter;
echo $compter2;
$userid= $_POST['username'];
$passwd_user=$_POST['password1'];
$regquery = "INSERT INTO atum2_db_account.dbo.td_Account (AccountUniqueNumber, AccountName, Password, AccountType) VALUES ('$compter2','$userid', '$passwd_user', '0')";
$result1 = mssql_query($regquery,$conn);
$regquery2 = "INSERT INTO site.dbo.Inscription (AccountUniqueNumber, AccountName, Password, AccountType, Point, Cash) VALUES ('$compter2', '$userid', '$passwd_user', '0', '0', '0')";
$result30 = mssql_query($regquery2,$conn);
mssql_close($dbhandle);
}
#return $errorStr;
}
?>
This code count the number of users register on database account then do a +1 on this and make the insert ligne on database.
You got the answer since the beginning.
ok these i must put it in to register.php or in register_do.php ?
Quote:
Originally Posted by
freebook21
Dont wastle time on him...have mental problems...
So my solution is:
Select your table, click on it >Script Table as> Create to> Newquerry Editor Windows>connecto your server and copy all insede the new querry windows and paste it inside any .txt file save it.
from atum2_db_account delete the table dbo.td_Account.
in txt file search for this line:
CREATE TABLE [dbo].[td_Account](
[AccountUniqueNumber] [int] NOT NULL,
and add the red thing
CREATE TABLE [dbo].[td_Account](
[AccountUniqueNumber] [int] identity (1,1) NOT NULL,
copy all in txt file with the new change and paste it inside a new querry windows, first u need be inside atum2_db_account>tables click on +
then run the script.
what identity (1,1) do : increase the value of the column automatically 1 by 1.
remember to clear the php code who desp08500 give u .And c what happend.
Ok thx for advices...i will try to make this but the part with scripts i really don' know...i mean with the reg shitty.. i will try>:D< thx for tips i think will work...well it will work if i will make as u said.