Jump to content

Ayaka

Inactive Member
  • Posts

    288
  • Joined

  • Last visited

  • Days Won

    10
  • Feedback

    0%

Everything posted by Ayaka

  1. Ye, thats frustrating :/ but i dont think that someone can really help you without debug directly. We have very little to go on.
  2. thanks for that answer. I checked that myself too: The only new thing i noticed was a new row for Lycan but that is not a structure change so it seems to be good. I dont think that i have to code an condition for different revesions.
  3. maybe u are using a wrong encryption hash when creating a password? Try: *00A51F3F48415C7D4E8908980D443C29C69B60C9 and login with password: 12345
  4. Hi, I'm started to continue programming on my CMS and i was asking myself: is there a significant difference in sql tables and columns between new and older revisions? This may sounds like a noob question but i have no clue about this because i never created a metin2 server myself. It is important for me that people can install the cms for all revisions. If i am using select querys for a column which doesnt exist anymore or new columns added i have to know that. Maybe a hint which was changed or added would be nice. (~ ̄▽ ̄)~ Thanks
  5. Would be cool to tell us how you solved your problem. (2.5) Questions & Answers specific rules Don't modify your thread (or reply to it) to mark it solved, and not explain the solution to the issue.
  6. yes, because in your other script you get the id with the GET Parameter "postava". Normaly a link should look like this: /debug_postavy.php?postava='.$ziskatPostavy->id.' postava (in my example) is declared in the select (name="postava") and the value is the ID. If you do .htaccess changes and normal links like above are working you can try it like i did with one change in action: <?PHP if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) { echo'<h2>'.DEBUG01.'</h2>'; echo'<p>'.DEBUG02.'<br>'.DEBUG03.'<br/><br/><b>'.DEBUG04.'</b></p>'; $databazePostavy = "SELECT player.id,player.name FROM ".SQL_HP_PLAYER.".player WHERE player.account_id='".$_SESSION['user_id']."'"; $queryPostavy = mysql_query($databazePostavy,$sqlServ); echo '<form method="post" action="/debug_postavy.php">'; echo'<select name="postava">'; while($ziskatPostavy = mysql_fetch_object($queryPostavy)) { echo'<option value="'.$ziskatPostavy->id.'">'.$ziskatPostavy->name.'</option>'; } echo '</select>'; echo '<input type="submit" value="[Debug]"/>'; echo '</form>'; } else { echo'<table class="tabulka"><th><h3 class="tabulkaLostpwFont">Abys měl přístup do této sekce, musíš být přihlášen!</h3></th></table>'; } ?> <?PHP echo'<p><a href="/nastaveni">'.BACK.'</a></p>'; ?> EDIT:// Ah and IMPORTANT: Change all (Line 7, 11, 24): $_GET['postava'] to $_POST['postava'] in this file: [Hidden Content] because its a post, not a get when submit via <form>!
  7. This worked?? I dont get where $_GET['postava'] came from if its not given in the url but ok. Check this out: <?PHP if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) { echo'<h2>'.DEBUG01.'</h2>'; echo'<p>'.DEBUG02.'<br>'.DEBUG03.'<br/><br/><b>'.DEBUG04.'</b></p>'; $databazePostavy = "SELECT player.id,player.name FROM ".SQL_HP_PLAYER.".player WHERE player.account_id='".$_SESSION['user_id']."'"; $queryPostavy = mysql_query($databazePostavy,$sqlServ); echo '<form method="post" action="/debug_postavy/">'; echo'<select name="postava">'; while($ziskatPostavy = mysql_fetch_object($queryPostavy)) { echo'<option value="'.$ziskatPostavy->id.'">'.$ziskatPostavy->name.'</option>'; } echo '</select>'; echo '<input type="submit" value="[Debug]"/>'; echo '</form>'; } else { echo'<table class="tabulka"><th><h3 class="tabulkaLostpwFont">Abys měl přístup do této sekce, musíš být přihlášen!</h3></th></table>'; } ?> <?PHP echo'<p><a href="/nastaveni">'.BACK.'</a></p>'; ?> If this doesn't work i cant help you because i dont get how this POST is working in your script
  8. OK at first we have to fix the functionality. Use this code: [Hidden Content] and replace on line 31: <td class="'.$design.'">'.$ziskatPostavy->name.'<a href="/debug_postavy/'.$ziskatPostavy->id.'">[Debug]</a></td> with: <td class="'.$design.'">'.$ziskatPostavy->name.'<a href="/debug_postavy.php?postava='.$ziskatPostavy->id.'">[Debug]</a></td> Does it work then? After that we do the select thing but it should work at first.
  9. Ah now i see.. What is the filename of this -> [Hidden Content] ? (need to know for the link to debug)
  10. What do you define in that DEBUG constants? O.o I dont know what you mean with debug but for the rest you can check my changes out (I didnt test it): <?PHP if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) { echo'<h2>'.DEBUG01.'</h2>'; echo'<p>'.DEBUG02.'<br>'.DEBUG03.'<br/><br/><b>'.DEBUG04.'</b></p>'; // when a charakter is selected and submitted $charId = isset($_POST['charakter']) ? $_POST['charakter'] : false; if ($charId && is_numeric($_POST['charakter'])) { $theId = htmlentities($_POST['charakter']); /* * ######################################## * DEBUG HERE!!! * ######################################## */ echo 'Selected charakter with ID: '.$theId; // just to check that it works, you can delete this line } // show chars $sql = "SELECT player.id,player.name FROM ".SQL_HP_PLAYER.".player WHERE player.account_id='".$_SESSION['user_id']."'"; $result = mysql_query($sql,$sqlServ); echo '<form method="post" action="'.basename($_SERVER["SCRIPT_FILENAME"]).'">'; echo'<select name="charakter">'; while($player = mysql_fetch_object($result)) { echo'<option value="'.$player->id.'">'.$player->name.'</option>'; } echo '</select>'; echo '<input type="submit" value="Debug selected Charakter"/>'; echo '</form>'; } else { echo'<table class="tabulka"><th><h3 class="tabulkaLostpwFont">Abys měl přístup do této sekce, musíš být přihlášen!</h3></th></table>'; } ?> <?PHP echo'<p><a href="/nastaveni">'.BACK.'</a></p>'; ?>
  11. Did you try a telnet command to check the response from your mysql server via console? Some tips: - Is the MySQL listening port 3306 unblocked? -> check firewall - Make sure 'skip-networking' is commented out in your my.cnf
  12. Are you using php7? The function "mysql_connect" was removed with version 7. You can check that by creating a custom php file with the following code: <?php phpinfo() ?>
  13. Thanks @ragem0r Edit:// im with my handy online, didnt see the hidden content :_D
  14. Im just a web-developer. So, i dont have any metin files to look for it. If someone has time to copy the descriptions i would be very thankfull
  15. Now this is interesting. I was asking myself: what exactly is the meaning of each status? Can someone describe the meaning of all possibilities?
  16. What is the decisive technical difference to my example? And why mysql_fetch_array? You don't need numeric and string keys here - you are using the column name, so its recommanded to use MYSQL_ASSOC. ps: lower_case ftw
  17. You dont need while if you want to get only one record. I dont understand your "error". 2016-08-30 18:55:21 is the right output, or?. Im wondering why the "Query was empty" message was generated because there is a response. Try: $result = mysql_query("SELECT create_time FROM ".SQL_HP_DB.".account WHERE id='".$_SESSION['user_id']."' LIMIT 1") or die(mysql_error()); $row = mysql_fetch_assoc($result); echo date('F d, Y h:mA', strtotime($row["create_time"])); // uncommand the following line if you want to debug the return value // var_dump($row); If "Query was empty" appears, look in your database if the "create_time" is really set for the given user_id.
  18. Edit:// whoops. Forget it. I thought this was a m2dev contest.
  19. Then your SMTP authorization login informations are wrong. The SMTP Server want to connect but your authorization data is wrong. You have to find where then login infromations are stored. If you are finding the $localdomain variable you're find the other too.
  20. ah understand. You try to get a EHLO for only logging this respond infromations. Its not important but you can fix it if you give $localdomain a value: Search your whole php files for: private $localdomain If you found the right file you have to enter the link from your site like this: private $localdomain = '[Hidden Content]'; --- if you dont really need this loginformation you can comment it: // Hi, server! // $this->sendCommand("EHLO $this->localdomain()"); // $this->logArray['EHLO'] = $this->readResponse();
  21. Notice: Undefined variable: smtpResponse in /home/metindi3/public_html/site/asg_functions/mail_class.php on line 179 this is line 179: This is no error, this is a notice. Its not that bad as it looks. This Notice said just that the variable $smtpResponse is undefined. You can declare your Variable by using an if condition right before line 179: $smtpResponse = isset($smtpResponse) ? $smtpResponse : 'No SMTP Response given.'; This should do the magic. Im sure that this message is just for your logs so its ok like this. ------------------------------------------- Notice: Undefined property: Mail::$localdomain in /home/metindi3/public_html/site/asg_functions/mail_class.php on line 187 This is a notice, too. Try it with brackets (this is required when calling a function) $this->sendCommand("EHLO $this->localdomain()"); If this is not working, show me your public function localdomain() { /* .... */ } in your mail_class.php file (hope the function naming is right). Maybe there is a getLocaldomain() function? btw. if this is a production server you should disable notice messages for security reasons (after fixing the problem) globally with error_reporting(E_ERROR | E_WARNING | E_PARSE);
  22. Its a good practice to call exit() right after header() so that code below does not get executed. In mind of that, the problem is an output before the header function. You will need to verify that this code gets run before any other output as well. You should not echo (or direkt html output) anything right before the header() function, as doing so will more than likely throw a warning. Debug your code an find out what code generates an output. No one can tell you where exactly this happens without looking in your code. if you realy dont know how to solve your problem because of bad programming knowledge, you can use the following code instead of header() . Be warned: this is a realy bad codestyle and not recommended (discouraged by the W3C): $url='[Hidden Content]'; echo '<META HTTP-EQUIV=REFRESH CONTENT="0; '.$url.'">'; this will output an html meta tag which redirect the user.
  23. You are trying to send headers information after outputing content. Thats wrong. I guess you will redirect to another page after login process with something like that?: header("Location: [Hidden Content]"); When refreshing the page it certainly works because the header() function is firing during the login process. After refreshing you are logged in already - thats the reason why this warning only appears ones after clicking login This answer will help you to understand the problem: [Hidden Content] I dont know your code so i can give you a tip which could work. Add exit; right after the header(); function.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.