Website , unable to login
I've ran into a problem .
I used x-weavers Final revolution anniversary 2009 . I downloaded his database and all seemed to work .
But I'm unable to login . If I enter wrong name/pw I get a notice wrong Pw and/or username but if its correct I get no notice or anything . It like reloads the page .
Config.php
Code:
<?
@session_start();
//MSSQL Server configuration
$_MSSQL[Host] = "KRISTO-0D5C9CB4\SQLEXPRESS";
$_MSSQL[User] = "sa";
$_MSSQL[Pass] = "HIDDEN";
$_MSSQL[DBNa] = "GunzDB";
//MySQL Server configuration
$_MYSQL[Host] = "localhost";
$_MYSQL[User] = "root";
$_MYSQL[Pass] = "";
$_MYSQL[DBNa] = "foro";
//Configuration
$_CONFIG[NewsFID] = 2;
$_CONFIG[EventsFID] = 0;
$_CONFIG[vBulletinPrefix] = "xxxxx";
$_CONFIG[ForumURL] = "http://xxx.tk/";
//Offline page
$_CONFIG[OfflinePage] = "";
$r = mssql_connect($_MSSQL[Host], $_MSSQL[User], $_MSSQL[Pass]) or die("Cant connect to database");
mssql_select_db($_MSSQL[DBNa], $r);
?>
Re: Website , unable to login
$_MSSQL[Host] = "KRISTO-0D5C9CB4\SQLEXPRESS";
change that to $_MSSQL[Host] = "KRISTO-0D5C9CB4";
do that in every config.php
Re: Website , unable to login
Quote:
Originally Posted by
Sharelogin
$_MSSQL[Host] = "KRISTO-0D5C9CB4\SQLEXPRESS";
change that to $_MSSQL[Host] = "KRISTO-0D5C9CB4";
do that in every config.php
After that I get this error
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: KRISTO-0D5C9CB4 in C:\AppServ\www\secure\config.php on line 32
Cant connect to database
Re: Website , unable to login
hmm, than you should better use appserv or easyphp 3.0 ...
I recommened easyphp, if you choose for easyphp use Phoenix Fixed database and use Phoenix php.ini
want help? green.gunz@hotmail.com
Re: Website , unable to login
Quote:
Originally Posted by
Sharelogin
hmm, than you should better use appserv or easyphp 3.0 ...
I recommened easyphp, if you choose for easyphp use Phoenix Fixed database and use Phoenix php.ini
want help?
green.gunz@hotmail.com
I use appserv .
There shouldn't be much difference between them as because both of them should work very well actually :)
Re: Website , unable to login
has nothing to do with the connection code, show the code of the login
Re: Website , unable to login
Quote:
Originally Posted by
diosz
has nothing to do with the connection code, show the code of the login
Could you be more specific , thank you .
Re: Website , unable to login
is not the problem because if so would come out the error message of before, so if you can not log the problem is in the file that contains the code for the login, but i cant say you what file is, because i dont know what web are you using
Re: Website , unable to login
Quote:
Originally Posted by
diosz
is not the problem because if so would come out the error message of before, so if you can not log the problem is in the file that contains the code for the login, but i cant say you what file is, because i dont know what web are you using
x-weavers Final revolution anniversary 2009 with his database .
Re: Website , unable to login
Re: Website , unable to login
Code:
<?
SetTitle(" // Login");
if($_SESSION[AID] <> "")
{
header("Location: index.php");
die();
}
if(isset($_POST[submit]))
{
$user = clean($_POST[userid]);
$pass = clean($_POST[pass]);
$q = mssql_query("SELECT * FROM Login WHERE UserID = '$user' AND Password = '$pass'");
if(mssql_num_rows($q) == 1)
{
$d = mssql_fetch_assoc($q);
$_SESSION[UserID] = $d[UserID]; $_SESSION[pass] = $d[Password];
$_SESSION[AID] = $d[AID];
$q1 = mssql_fetch_assoc(mssql_query("SELECT UGradeID FROM Account WHERE AID = '{$_SESSION[AID]}'"));
$_SESSION[UGradeID] = $q1[UGradeID];
$url = ($_SESSION[URL] == "") ? "index.php" : $_SESSION[URL];
$_SESSION[URL] = "";
header("Location: $url");
die();
}else{
alertbox("Incorrect Username or Password.","index.php");
die();
}
}
?>
Re: Website , unable to login
o.O mmm thats should work
mmm maybe i dont know if you put <?php session_start(); ?>
in the line 1 of the index.php,
Re: Website , unable to login
You just need a decent php.ini. Look up for No Life X's MPOG web thread and edit your php.ini according to what he says.
Re: Website , unable to login
Problem solved .
You may close it