[HTML, CSS, PHP, TrinityCore] Creating an Account Creation webpage for your Server menu

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    InternetExplorer's Avatar Contributor
    Reputation
    136
    Join Date
    Sep 2007
    Posts
    420
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When using bindParam or bindValue you only want to use execute() and not execute(array(....));

    [HTML, CSS, PHP, TrinityCore] Creating an Account Creation webpage for your Server
  2. #17
    Valkryst's Avatar Active Member
    Reputation
    62
    Join Date
    Apr 2014
    Posts
    41
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried that as well as a number of other things while Googling around for some information. Nothing seems to be working yet though.

    Here's what my messy code looks like now: [PHP] <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="author - Pastebin.com

  3. #18
    InternetExplorer's Avatar Contributor
    Reputation
    136
    Join Date
    Sep 2007
    Posts
    420
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Valkryst View Post
    I've tried that as well as a number of other things while Googling around for some information. Nothing seems to be working yet though.

    Here's what my messy code looks like now: [PHP] <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="author - Pastebin.com
    Try changing your CALL query to this:
    $stmt = $db->prepare('CALL create_account(?, ?)');
    $stmt->bindParam(1, $accUsername, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 12);
    $stmt->bindParam(2, $accPassword, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT, 32);
    $stmt->execute();
    I have no servers on my computer anymore so I'm unable to test it myself. Btw, your create_account seems to be giving SQL syntax errors when I tried to run it.

    Edit: See if you get any error messages with:
    try {
    // all your PDO stuff here
    } catch (PDOException $e) {
    echo $e->getMessage();
    echo $e->getCode();
    }
    Last edited by InternetExplorer; 05-18-2014 at 10:25 AM.

  4. #19
    Valkryst's Avatar Active Member
    Reputation
    62
    Join Date
    Apr 2014
    Posts
    41
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasn't able to get any errors to show up, but I did remember that the nginx error.log file had some information that I used to bug-test when originally writing the code in the tutorial. Here is what's in that file 2014/05/19 05:37:24 [error] 2237#0: *1082 client intended to send too large body - Pastebin.com , there's definitely something going on with the config.inc.php file.

  5. #20
    InternetExplorer's Avatar Contributor
    Reputation
    136
    Join Date
    Sep 2007
    Posts
    420
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cannot redeclare class MySQL is because you required the file more than once. You just need to require it once at the top of your page.
    You can use require_once(); to prevent this, but it's slower than just using require();

    "Client intended to send too large body" you can fix by increasing
    client_max_body_size
    large_client_header_buffer
    upload_max_filesize
    post_max_size
    to something like 100M. (nginx config)

    Just debug every query, and you'll eventually find what's causing the issue.

    Edit: Just in case, you may have to use error_reporting(E_ALL); on top of your page to see error messages if you haven't already.
    Last edited by InternetExplorer; 05-19-2014 at 04:39 PM.

  6. #21
    Valkryst's Avatar Active Member
    Reputation
    62
    Join Date
    Apr 2014
    Posts
    41
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks yet again. I definitely wouldn't have been able to get everything fixed up without your help.

    After checking out some information on the body, buffer, and other settings I changed them to some somewhat reasonable numbers and the 'too large' error disappeared. Then I added a small <?php ?> section at the top of the HTML document and then the other error went away. Everything looks to be working as intended as far as my tests have shown and I'll now be rewriting the tutorial somewhat to show the new code. Thanks again!

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Trinity] [HTML,CSS,PHP,Bash] Creating a Server-Status String for your Webpage
    By Valkryst in forum WoW EMU Guides & Tutorials
    Replies: 0
    Last Post: 09-04-2014, 12:03 PM
  2. Need help with creating a account creation website for mangos!
    By Insanity in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-13-2008, 04:58 AM
  3. Account Creation Website for Ascent
    By burmadude in forum WoW EMU Guides & Tutorials
    Replies: 2
    Last Post: 01-05-2008, 05:30 PM
  4. Account Creation Website for Ascent
    By burmadude in forum WoW EMU Guides & Tutorials
    Replies: 1
    Last Post: 12-31-2007, 02:04 PM
  5. Replies: 15
    Last Post: 11-25-2007, 09:53 AM
All times are GMT -5. The time now is 06:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search