darkfun3 5 Posted May 28, 2014 Share Posted May 28, 2014 when i setup my website i cannot create an account. It says that the account already exists .I have set up the config files correctly there is no error.Can anyone help me fix this? Thanks in advance. http://www.metin2stark.eu/index.php?s=register Link to comment Share on other sites More sharing options...
Premium Shogun 4614 Posted May 28, 2014 Premium Share Posted May 28, 2014 There is an error with your query. Activate MySQL stack trace in /usr/local/etc/php.ini and check the errors again. Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 error_reporting(E_ERROR | E_WARNING | E_PARSE); Write this on the top of your code (right after <?php) and do the register again. Post the error. Im sure there is an error in your query. If nothing happens show us the register.php (in the page folder). F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
Premium Shogun 4614 Posted May 28, 2014 Premium Share Posted May 28, 2014 error_reporting(E_ERROR | E_WARNING | E_PARSE); Write this on the top of your code (right after <?php) and do the register again. Post the error. Im sure there is an error in your query. If nothing happens show us the register.php (i think it calls like this). That won't show SQL errors only PHP ones. Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 error_reporting(E_ERROR | E_WARNING | E_PARSE); Write this on the top of your code (right after <?php) and do the register again. Post the error. Im sure there is an error in your query. If nothing happens show us the register.php (i think it calls like this). That won't show SQL errors only PHP ones. brain afk at this moment. Add this right after your query xD OR die("Error: ".mysql_error()); F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 well there is no error in the log on my web server. I think there is a problem with the code Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 anyone know how to fix it or provide me with a new website that works 100% Link to comment Share on other sites More sharing options...
Premium Shogun 4614 Posted May 28, 2014 Premium Share Posted May 28, 2014 We didn't make the website. The problem with using free stuff is that you won't get any support for it. 1 Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 can you tell me a new hosting site then? Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 Just post your register.php. Then we have a look to the code. if there is a problem we will see. btw. the register form from hen! is bullshit. usability = 0. When enter a wrong input the script reset all inserts. its so annoying to test your problem F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 <div class="con-top">Registration</div> <div class="con-mid"> <?PHP $regCoins = 0; // Startcoins $laufZeit = 365; //Tage autoloot,safebox $calcLZ = (60*60*24)*365; $expireStamp = time()+$calcLZ; $expireDate = date("Y-m-d H:i:s",$expireStamp); if($serverSettings['register_on'] && (!isset($_SESSION['user_admin']))) { if(isset($_POST['submit']) && $_POST['submit']=="registrieren") { if((checkAnum($_POST['account']) && strlen($_POST['account'])>=8 && strlen($_POST['account'])<=16) && checkAnum($_POST['pass']) && strlen($_POST['pass'])>=8 && strlen($_POST['pass2'])<=16 && !empty($_POST['pass2']) && (checkName($_POST['uname']) && strlen($_POST['uname'])>=3 && strlen($_POST['uname'])<=20) && $_POST['pass']==$_POST['pass2'] && checkMail($_POST['email']) && strlen($_POST['email'])<=40 && $_POST['captcha']==$_SESSION['captcha_id'] && $_POST['email']==$_POST['email2'] && (checkAnum($_POST['sicherheitsa']) && strlen($_POST['sicherheitsa'])>=3 && strlen($_POST['sicherheitsa'])<=16) && checkInt($_POST['sicherheitsf']) && (checkAnum($_POST['loeschcode']) && strlen($_POST['loeschcode'])==7)) { $hashSF = md5($_POST['sicherheitsa']); $sfNum = mysql_real_escape_string($_POST['sicherheitsf']); $lcode = mysql_real_escape_string($_POST['loeschcode']); $zuFall = rand(99999,999999999); $userpass=mysql_real_escape_string($_POST['pass']); $aktivHash = ($serverSettings['mail_activation']) ? md5($zuFall):''; $accountStatus = ($serverSettings['mail_activation']) ? 'BLOCK':'OK'; $sqlCmd = "INSERT INTO account.account (login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert) VALUES ('".$_POST['account']."',PASSWORD('".$userpass."'),'".mysql_real_escape_string($_POST['uname'])."','".mysql_real_escape_string($_POST['email'])."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','".$accountStatus."','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')"; $sqlQry = mysql_query($sqlCmd,$sqlServ); if($sqlQry) { $absender = $serverSettings['titel']." Registration"; $email = $serverSettings['reg_mail']; $empfaenger = $_POST['email']; $mail_body = "Hallo ".$_POST['uname'].", deine Registration auf ".$serverSettings['titel']." war erfolgreich! Um auch auf dem Server spielen zu können, musst du deinen Account aktivieren. Das kannst du über den folgenden Link tun: ".$serverSettings['url']."/index.php?s=login&do=aktivieren&hash=".$aktivHash." Deine Daten sind: Account: ".$_POST['account']." Passwort: ".$userpass." Löschcode: ".$lcode." Sicherheitsfrage: ".$sFrage[$sfNum]." Antwort: ".$_POST['sicherheitsa']." Viel Spaß beim Spielen, Dein ".$serverSettings['titel']."-Team Diese E-Mail wurde automatisch generiert. Bitte keine Antworten an diese Adresse schicken."; $titel = "Registrierung auf ".$serverSettings['titel']; $header = "X-Priority: 3n"; $header .= "X-Mailer: ".$serverSettings['titel']." Homepage Mailern"; $header .= "MIME-Version: 1.0n"; $header .= "From: ".$absender." <".$serverSettings['reg_mail'].">n"; $header .= "Reply-To: ".$serverSettings['reg_mail']."n"; $header .= "Content-Type: text/plain; charset=iso-8859-1n"; if($serverSettings['mail_activation']) { mail($empfaenger, $titel, $mail_body, $header); echo'<p class="meldung">Account erfolgreich angelegt. Bitte überprüfen Sie Ihr Postfach, um die Registrierung zu bestätigen.</p>'; } else { echo'<p class="meldung">Account erfolgreich angelegt. Sie können sich nun anmelden.</p>'; } } else { echo'<p class="meldung">Registrierung fehlgeschlagen: Der Account existiert bereits.</p>'; } } else { echo'<p class="meldung">Registrierung fehlgeschlagen: bitte alle Felder richtig angeben</p>'; } } ?> <p>Alle Felder sind Pflichtfelder und müssen ausgefüllt werden.<?PHP if($serverSettings['mail_activation']) { echo'<br/><b>Der Account wird per E-Mail aktiviert, also eine richtige E-Mail eingeben!</b>'; } ?></p> <form action="index.php?s=register" method="POST"> <table> <tr> <th class="topLine">Account:<br/><small><i>8-16 Zeichen (nur a-Z,0-9)</i></small></th> <td class="tdunkel"><input type="text" name="account" maxlength="16" size="16"/></td> </tr> <tr> <th class="topLine">Name:<br/><small><i>3-20 Zeichen (nur a-Z,0-9)</i></small</th> <td class="thell"><input type="text" name="uname" maxlength="16" size="16"/></td> </tr> <tr> <th class="topLine">Password:<br/><small><i>8-16 Zeichen (nur a-Z,0-9)</i></small></th> <td class="tdunkel"><input type="password" name="pass" maxlength="16" size="16"/></td> </tr> <tr> <th class="topLine">Password wiederholen:</th> <td class="thell"><input type="password" name="pass2" maxlength="16" size="16"/></td> </tr> <tr> <th class="topLine">E-Mail:<br/><small><i>max. 40 Zeichen</i></small></th> <td class="tdunkel"><input type="text" name="email" maxlength="50" size="25"/></td> </tr> <tr> <th class="topLine">E-Mail wiederholen:</th> <td class="thell"><input type="text" name="email2" maxlength="50" size="25"/></td> </tr> <tr> <th class="topLine">Löschcode:<br/><small><i>7 Zeichen (nur a-Z,0-9)</i></small></th> <td class="tdunkel"><input type="text" name="loeschcode" maxlength="7" size="7"/></td> </tr> <tr> <th class="topLine">Sicherheitsfrage:<br/><small><i>3-16 Zeichen (nur a-Z,0-9)</i></small></th> <td class="thell"> <br/><select name="sicherheitsf"> <?PHP foreach($sFrage AS $fragew => $frage) { echo'<option value="'.$fragew.'">'.$frage.'</option>'; } ?> </select><br/> <input type="text" name="sicherheitsa" maxlength="16" size="16"/> </td> </tr> <tr> <th class="topLine">Captcha:</th> <td class="tdunkel"><br/><img src="./captcha/captcha.php" title="Captcha"/> <input type="text" name="captcha" maxlength="5" size="5"/></td> </tr> <tr> <th class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="registrieren"/> • <input type="reset" value="reset"/></th> </tr> </table> </form> <?PHP } else { echo'<p class="meldung">Die Registration ist deaktiviert oder Sie sind bereits angemeldet. Es kann kein weiterer Account erstellt werden.</p>'; } ?> </div> <div class="con-bot"></div> The thing is that i even change web hosters and domain but still no change Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 Change line 31: $sqlQry = mysql_query($sqlCmd,$sqlServ); to: $sqlQry = mysql_query($sqlCmd,$sqlServ) OR die("Error: ".mysql_error()); and post us the Error which will appear when you register an account. F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 where will the error apear? Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 on the website edit:// btw. shogun: You wrote That won't show SQL errors only PHP ones. Right, but when he use mysql_error() he need the E_WARNING level to display the error. So its legit ;P F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 the same thing appears Link to comment Share on other sites More sharing options...
Solution Ayaka 300 Posted May 28, 2014 Solution Share Posted May 28, 2014 Then you do something wrong. When error_reporting is enabled and you change the code like i said then an error must appear because if($sqlQry) is false. F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 i will change now the web site and tell you if the problem persist . if it does i will write the register.php of that site Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 -- delete -- F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 well where can i find hen cms or i will just replace it with my register.php and will work? Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 -- delete -- F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 ok thank you gonna try it now Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 should i replace the it or just add it ? Link to comment Share on other sites More sharing options...
Ayaka 300 Posted May 28, 2014 Share Posted May 28, 2014 if you have problems please contact me in skype or TS (send me a pm with addy or ip). i can speak german. F E E L - T H E - A W E S O M E N E S S Link to comment Share on other sites More sharing options...
darkfun3 5 Posted May 28, 2014 Author Share Posted May 28, 2014 problem fixed there was an error in my database thanks everyone for their help espacially Ayaka 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now