|
You last visited: Today at 16:14
Advertisement
Login.php Problem
Discussion on Login.php Problem within the Fiesta Online forum part of the MMORPGs category.
03/26/2015, 21:58
|
#1
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Login.php Problem
Moin, bin dabei ein Launcher für meinen Homeserver zu machen, bekomme aber von der Login.php folgenden Fehler :
Notice: Undefined index: Username in C:\xampp\htdocs\Download\Login.php on line 9
Notice: Undefined index: Password in C:\xampp\htdocs\Download\Login.php on line 10
Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\Download\Login.php on line 13
Ich benutze die Login.php von dem Thread :
Hab auch alles geändert wie es da steht, bevor jemand frägt
|
|
|
03/26/2015, 21:59
|
#2
|
elite*gold: 3
Join Date: Mar 2010
Posts: 551
Received Thanks: 372
|
Mssql ist outdated. Musst das auf sqlsrv umschreiben und die sqlsrv driver installieren
|
|
|
03/26/2015, 22:09
|
#3
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Kleiner Denkanstoß wäre nett, kenn mich damit 0 aus
EDIT:
Alles gemacht, jetzt kommt allerdings das:
Notice: Undefined index: Username in C:\xampp\htdocs\Download\Login.php on line 9
Notice: Undefined index: Password in C:\xampp\htdocs\Download\Login.php on line 10
Warning: sqlsrv_query() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Download\Login.php on line 16
Query Failed
|
|
|
03/27/2015, 07:16
|
#4
|
elite*gold: 0
Join Date: Apr 2012
Posts: 1,153
Received Thanks: 696
|
Benutzt die login.PHP von [Dev]SenfDose oder so^^ Name steht oben in der login.php
|
|
|
03/27/2015, 10:08
|
#5
|
elite*gold: 0
Join Date: Feb 2014
Posts: 347
Received Thanks: 47
|
Ich hatte das gleiche Problem xamp kann irgendwie dann nicht auf mysql zugreifen habe es dann mit IIS probiert und es hat funktioniert
|
|
|
03/27/2015, 18:50
|
#6
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Hab mich jetzt an IIS gesetzt, jetzt kommt folgendes :
Ich blick bei IIS überhaupt nicht durch, deswegen bitte um Hilfe
|
|
|
03/27/2015, 19:47
|
#7
|
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
|
Wie hast du PHP installiert? Manuell eingefügt? Am besten nochmal runter schmeißen und mit dem WPI-Launcher installieren, dann werden diverse Einstellungen von alleine gesetzt.
Ansonsten schau mal im IIS-Manager nach: Klick bei deinem Server auf "Handlerzuordnungen" und überprüfe, ob die Zuordnungen für PHP gesetzt sind.
|
|
|
03/27/2015, 20:09
|
#8
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Konnts jetzt nicht rauslesen, daher hier :
|
|
|
03/27/2015, 21:39
|
#9
|
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
|
Fehlen die PHP-Zuordnungen.
Quote:
Originally Posted by DuOtto
Wie hast du PHP installiert? Manuell eingefügt? Am besten nochmal runter schmeißen und mit dem WPI-Launcher installieren, dann werden diverse Einstellungen von alleine gesetzt.
|
Wieso liest du nicht mal alles und probierst das aus, was ich dir als Tipp gebe?
|
|
|
03/27/2015, 21:53
|
#10
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Hab ich ja, calm down, funktioniert jetzt bis aufs register, werd anderes ausprobieren wenn dann nix passiert meld ich mich nochmal
|
|
|
03/27/2015, 22:12
|
#11
|
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
|
Quote:
Originally Posted by Arizard
Hab ich ja, calm down, funktioniert jetzt bis aufs register, werd anderes ausprobieren wenn dann nix passiert meld ich mich nochmal
|
War nicht böse gemeint, wollte es nur nochmal sagen
Was geht beim Register denn nicht?
|
|
|
03/27/2015, 22:14
|
#12
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
Wird nix angezeigt, bleibt einfach nur weiß
|
|
|
03/27/2015, 22:21
|
#13
|
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
|
Welches hast du?
|
|
|
03/27/2015, 22:28
|
#14
|
elite*gold: 0
Join Date: Aug 2014
Posts: 29
Received Thanks: 0
|
<title>SignUp</title>
<center>
<?php
$_SERVER['SQLHOST'] = '---\SQLEXPRESS';
$_SERVER['SQLUID'] = 'sa';
$_SERVER['SQLPWD'] = '---';
$_SERVER['SQLDB'] = 'OdinAccounts';
//For all the idiots who don't know how to hash to md5 in php.. ~ MD5 Disabled = False || MD5 Enabled = True
$md5 = True;
// DON'T EDIT AFTER THIS LINE!!!!
$connectionInfo = array( "Database"=>$_SERVER['SQLDB'], "UID"=>$_SERVER['SQLUID'], "PWD"=>$_SERVER['SQLPWD']);
$conn = mssql_connect( $_SERVER['SQLHOST'], $connectionInfo);
if ( !$conn )
{
echo print_r(mssql_errors(), True);
}else{
if (isset($_POST['submit'])){
$usn = mysql_escape_string($_POST['username']);
$email = mysql_escape_string($_POST['email']);
$pw = mysql_escape_string($_POST['password']);
if (filter_var($email, FILTER_VALIDATE_EMAIL)){
$checkQuery = mssql_query($conn, "SELECT * FROM tAccounts WHERE sUsername = ?;", array($usn), array( "Scrollable" => mssql_CURSOR_KEYSET ));
if (mssql_num_rows($checkQuery) == 0){
if ($md5 = True){
$md5 = md5($pw);
}
$update = mssql_query($conn, "INSERT INTO tAccounts (sUsername, sUserPass, sUserPassSalt, sEmail, sIP) VALUES (?, ?, ?, ?, ?)", array($usn, $pw, '0', $email, getIP()));
if($update){
echo 'Successfully SignUp!!';
}else{
echo print_r(mssql_errors(), True);
}
}else{
echo 'Username already in use!!';
}
}else{
echo 'Email address is not valid';
}
}else{
?>
<form method="post">
<table width="400px">
<tr>
<td>Username</td>
<td><input type="text" name="username" required /></td>
</tr>
<tr>
<td>Email</td>
<td><input type="text" name="email" required /></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" required/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" name="submit" value="Submit" /></td>
</tr>
</table>
</form>
<?php
}
}
function getIP(){
$ip = $_SERVER['REMOTE_ADDR'];
if(isset($_SERVER['HTTP_CF_CONNECTING_IP'])){
$ip = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
return $ip;
}
?><br>
© by Canic <?php echo date('Y'); ?></center>
Das, hab nebenbei noch ein anderes, welches auch nicht wirklich funktioniert
<?php
ob_start('ob_gzhandler');
session_start();
include_once "config.php";
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
<title>".$title."</title>
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
<link href='css/style.css' rel='stylesheet' type='text/css'>
<script language='JavaScript' type='text/JavaScript'>
<!--
function disabledBttn(formname)
{
if (document.all || document.getElementById) {
for (i=0;i<formname.length;i++) {
var bttn=formname.elements[i];
if(bttn.type.toLowerCase()=='submit' || bttn.type.toLowerCase()=='reset' || bttn.type.toLowerCase()=='button')
bttn.disabled=true;
}
}
}
//-->
</script>
</head>
<body leftmargin='0' topmargin='10' marginwidth='0' marginheight='0'>
<table width='100%' height='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table width='430' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td><img src='imgs/fiesta_logo.png' alt='top' width='300' height='168'></td>
</tr>
<tr>
<td style='font-size:5px'> </td>
</tr>
<tr>
<td align='center' bgcolor='white' style='border-bottom: solid 1px #cecece; border-top: solid 1px #cecece; border-left: solid 1px #cecece; border-right: solid 1px #cecece' class='padding_all'
</td>
</tr>
</table>
<br>
<table width='350' border='0' align='center' cellpadding='0' cellspacing='0'>
<tr>
<td align='center' bgcolor='white' style='border-bottom: solid 1px #cecece; border-top: solid 1px #cecece; border-left: solid 1px #cecece; border-right: solid 1px #cecece' class='padding_all'>";
if($_POST[action]!="signup")
{
echo "<form method='post' onSubmit='disabledBttn(this)' action=".$_SERVER[PHP_SELF]."?id=reg".$_SERVER[QUERY_STRING].">
<table width='100%' border='0' align='center' cellpadding='2' cellspacing='2'>
<tr>
<td colspan='2'><img src='imgs/signup.gif' alt='signup' width='162' height='9'></td>
</tr>
<tr>
<td width='10%'>Username</td><td><input type='text' name='username' size='20' maxlength='10'></td>
</tr>
<tr>
<td>Password</td><td><input type='password' name='password' size='20' maxlength='15'></td>
</tr>
<tr>
<td colspan='2' align='right'><input type='submit' value='register' class='button'> <input type='reset' value='clear' class='button'></td>
</tr>
</table>
<input type='hidden' name='action' value='signup'>
</form>";
}
else
{
$required=array(
"Username"=>$_POST[username],
"Password"=>$_POST[password],
);
for($i=0;$i<count($required);$i++)
{
list($key,$value)=each($required);
if(!$value)
echo "<b>$key</b> is required<br>";
else
$chkArr[]=true;
}
if(count($chkArr)==count($required))
{
$connection = odbc_connect( $connection_string, $user, $pass );
if(!$func->is_valid_string($_POST[username]) && !$func->is_valid_string($_POST[password]))
{
$usernameP=$_POST[username];
$query = "SELECT * FROM [Account].[dbo].[tUser] WHERE [sUserID]='$usernameP'";
$q = odbc_exec($connection, $query);
$qt = odbc_do($connection, $query);
$i = 0;
while(odbc_fetch_row($qt)) $i++;
if($i>0)
echo"<b>$_POST[username]</b>, is already taken!";
else
{
$query = "INSERT INTO [Account].[dbo].[tUser] ([sUserID],[sUserPW],[sUsername]) VALUES('$_POST[username]','$_POST[password]','$_POST[username]')";
$q = odbc_exec($connection, $query);
if($q)
echo"Username, <b>$_POST[username]</b> has been registered!";
}
}
else
echo"Please re-enter username and password, remove all special characters!";
}
echo "<br><br><a href='".$_SERVER[PHP_SELF]."?id=back'>Return</a>";
}
echo " </td>
</tr>
<tr>
<td bgcolor='#7f7f7f'><font color='#FFFFFF'>".$copy."</font></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>";
exit;
ob_end_flush();
?>
Bei dem unteren kommt das hier wenn ich mich registrieren will : http://puu.sh/gSaHv/9a6377fffa.png
|
|
|
03/27/2015, 22:50
|
#15
|
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
|
Hast du PHP installiert?
PHP Code:
<?PHP phpinfo (); ?>
Hau das mal in eine neue PHP-Datei und ruf die auf.
Bei dem zweiten: Bist du sicher, dass du den richtigen Ordner aufrufst und die Dateien vorhanden sind? Wenn du die Homepage unter wwwroot/Fiesta ablegst, musst du im Browser eingeben.
|
|
|
Similar Threads
|
Login problem back to login screen
06/15/2020 - Metin2 Private Server - 4 Replies
Hey guys i have a problem with my server (its dns) when i login i select my char and i login normaly but when my friend try to login he login normaly he select the char and then he go back to login screen and the problem is i dont know is on client or in server.
if anyone know pls help me i have done alot of work on those server files.
sorry for my bad english
and HAPPY NEW YEAR :D
|
All times are GMT +2. The time now is 16:14.
|
|