Jump to content

DoxramosPS

Members
  • Posts

    108
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Posts posted by DoxramosPS

  1. CMake is looking for src/bindings/scripts and it doesn't exist. Go to src/bindings and there you should have most likely universal assuming you didn't patch it with ScriptDev0/2 so on and so forth, so.

    sudo nano CMakeLists.txt

    At the end of it you will have

    add_subdirectory(scripts)

    That will need to be changed to whatever you have in bindings wether it be scriptdev2 ScriptDev2 or universal etc etc. (Yes. Capitilazation matters.)

    EG.

    The folder inside src/bindings is universal

    The end of your CMakeLists.txt will be

    add_subdirectory(universal)

    Now run Cmake like you tried before and you should be good to go.

  2. hmm... I am pretty new to ubuntu(linux) ... how can I share a windows? by vm?

    Don't know if you found out yet Alex, but it looks like you're still looking based off this thread. :)

    On VirtualBox make sure that you install guest additions and then Share a Folder through the VirtualBox Settings.

    Now the way I do it is I share my entire C Drive so under my share name it's C_DRIVE (Yes. The name will be something you need. :) )

    After I start the VM for the first time simply go to the terminal and a couple steps. First off. You need a folder to be your shared folder. I personally just

    sudo mkdir Shared

    Afterwards you have your shared folder, for arguments sake it's going to be named SharedFolder

    sudo mount -t vboxsf SharedFolder Shared

    Mount Virtual Box SharedFolder into Folder named Shared it's essentially what you're telling Linux to do; it finds that Shared Folder and now when you

    cd /Shared

    You should now be inside of your shared folder.

    Hope that helps ya out some.

    (If using Ubuntu Server Edition I recommend installing it as a service and setting it to autostart and to save state on system shutdown) Just send me a PM if you need help to do that also; oh yeah; if you do that don't forget to install ssh onto the box and to also have a system IE Putty to ssh into your server afterwards and also log the Internal IP.

  3. Nothing worse then inputting all the queries one by one, so I thought I'd share this with those who have never tried it.

    Create a runsql.sh File inside the databases you're creating and your content will look like so inside the SH File.

    DBUSER="root"
    PASS="mangos"
    DB="mangos"
    for f; do
             mysql -u $DBUSER -p$PASS $DB <$f
    done
    

    Obviously in the DBUSER PASS and DB put your info in.

    Open a terminal and then cd to zp_world (or other DB)

    Type

    sh runsql.sh *sql

    Let all the queries in zp_ execute. :)

    Nothing fancy, but it's a nice time saver.

  4. Being so new to php and all I'm still full of questions haha

    If I was to add

    elseif (empty($email_address)) {
    header( "Location: $error_page_email" );
    }
    

    And create a

    error_page_email.php inside my root and then set the variable to

    $error_page = "error_page_email.php";
    

    In the top; that should send them to a php page that I create called error_page_email.php correct?

  5. With the 2 being static would it just be

     "'" (2) . "'," .
    

    ?

    EDIT:

    I suppose I could have tested it first lol. I got rid of the comma in front of NOW and it's good to go =D Going to make some more changes and find a place to put it on here for people to see if they like it or not. Keep in mind; it's the first reg page I made so don't hate :P.

  6. Total I have

      <?php
    $con = mysql_connect("localhost","root","g278535814");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
    
    mysql_select_db("realmd", $con);
    
    $query = "INSERT INTO account(username,sha_pass_hash,email,expansion,joindate) VALUES(" .
          "'" . mysql_real_escape_string(strtoupper($_POST['username'])) . "'," .
          "'" . strtoupper(sha1(strtoupper($_POST['username'].":".$_POST['sha_pass_hash']))) . "'," .
          "'" . mysql_real_escape_string(strtoupper($_POST['email'])) . "'," .
          "'" . intval(2) . "'," .
          ",NOW()" .
          ");";
    
    if (!mysql_query($query,$con))
     {
     die('Error: ' . mysql_error());
     }
    echo "Account Created 
    Remember to set your realmlist to 127.0.0.1 to connect and play!";
    
    mysql_close($con);
    ?>
    

    I get

    Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOW())' at line 1
    

    I thought removing the NOW and the joindate would fix it, but that ended up opening a new can of worms lol.

  7. I will probably have it force 2 until I have a better understanding of how it works. As far as multiple usernames the server returns that the name exists. After i finish the page out completely i plan on sharing for user feedback and eventually taking it cms. Should probably get it on github lol

  8. My next endeavor is to get pvp rankings and such working and then I'll release until I learn enough php to start turning it into a CMS.

    Okay, so I'm working on putting the real_escape_string into place after doing some reading

    $link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
    OR die(mysql_error());
    
    $query = "INSERT INTO users VALUES
    (
       '" . mysql_real_escape_string($_POST["username"]) . "',
       '" . mysql_real_escape_string($_POST["sha_pass_hash"]) . "',
       '" . mysql_real_escape_string($_POST["email"]) . "',
       '2'
    )";
    
    mysql_query($query);
    

    Would have been the old syntax to use I believe

    However I don't see how I would convert my current code to it. Everything looks like it would come up incorrectly

    <?php
    $con = mysql_connect("localhost","root","g278535814");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
    
    mysql_select_db("realmd", $con);
    
    $sql="INSERT INTO account (username, sha_pass_hash, email, expansion)
    VALUES
    ('".$_POST['username']."','".sha1(strtoupper($_POST['username'] . ":" . $_POST['sha_pass_hash']))."','".$_POST['email']."','2')";
    
    if (!mysql_query($sql,$con))
     {
     die('Error: ' . mysql_error());
     }
    echo "Account Created 
    Remember to set your realmlist to 127.0.0.1 to connect and play!";
    
    mysql_close($con);
    ?>
    

    I don't see how I would implement real escape string at all :(

    I have tried a few times and Dreamweaver lets me know that hey; you're entire code is screwed all up.

  9. <form id="form1" name="form1" method="post" action="">
    
    
    
       <?php
    $con = mysql_connect("localhost","root","g278535814");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
    
    mysql_select_db("realmd", $con);
    
    $sql="INSERT INTO account (username, sha_pass_hash, email, expansion)
    VALUES
    ('$_POST[username]',sha1(strtoupper($_POST['username'] . ":" . $_POST['password'])),'$_POST[email]','2')";
    
    if (!mysql_query($sql,$con))
     {
     die('Error: ' . mysql_error());
     }
    echo "Account Created 
    Remember to set your realmlist to 127.0.0.1 to connect and play!";
    
    mysql_close($con);
    ?>
    

    Is what I'm currently using

    I'm going to change the single quoting on the variables like you recommended, I just thought that would cause issues.

    I just changed my SQL String to

    $sql="INSERT INTO account (username, sha_pass_hash, email, expansion)
    VALUES
    ($_POST['username'],sha1(strtoupper($_POST['username'] . ":" . $_POST['password'])),$_POST['email'],'2')";
    

    and I still have the error inside of Dreamweaver.

  10. Alright, well I changed my registration and now I get this when I attempt to register

    Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\\Mangos Wrath\\Server\\htdocs\\register.php on line 106

  11. I think this would go in the primary mangos question not ytdb since it has to do with realmd not mangos database.

     <?php
    $con = mysql_connect("localhost","root","g278535814");
    if (!$con)
     {
     die('Could not connect: ' . mysql_error());
     }
    
    mysql_select_db("realmd", $con);
    
    $sql="INSERT INTO account (username, sha_pass_hash, email, expansion)
    VALUES
    ('$_POST[username]','$_POST[sha_pass_hash]','$_POST[email]','2')";
    
    if (!mysql_query($sql,$con))
     {
     die('Error: ' . mysql_error());
     }
    echo "1 record added";
    
    mysql_close($con);
    ?>

    Is what I currently have for my registration page that I'm working on (which will be cleaned into real_escape_string after I have this sorted out.

    How do I get the php/sql command to insert into sha_pass_hash with encrypted data rather then raw text? Thank you in advance.

×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use