How to set up a website with a register page

Page 1 of 2 12 LastLast
Results 1 to 25 of 38
  1. #1
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    How to set up a website with a register page

    I need some help on this one.

    I tried to follow every tuts here, but they are rather incomplete...
    http://forum.ragezone.com/f428/tut-m...e-noob-400816/
    http://forum.ragezone.com/f651/flyff...torial-569429/

    I have configured wamp and it's setting.
    I just need help with connecting to a website..
    possible help to make a free working website..

    I want to see if it works first with a free domain, before i pay for it..

    As for portforward: I have configured it and it should work fine.


  2. #2
    audisbroder is offline
    Grand MasterRank
    Aug 2011 Join Date
    Not foundLocation
    1,180Posts

    Re: How to set up a website with a register page

    1) http://forum.ragezone.com/f724/get-w...-mssql-673301/

    2) http://forum.ragezone.com/f457/regis...y-dont-679360/
    a) Copy the register page code paste it to notepad and save it as reg.php or register.php and edit it.
    b) Paste it to your wamp and try it as local first

  3. #3
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    I'll try that, thanks once again :)

  4. #4
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Got this error:
    [Sun Jan 13 04:30:38 2013] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function mssql_connect()
    Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\Register\reg.php on line 31

    line 31: $mssql_connect = mssql_connect($mssql_server, $mssql_username, $mssql_password) or die ("<strong>Cannot connect to the MSSQL server.</strong>");
    if ((strlen($mssql_server) == 0) || (strlen($mssql_username) == 0) || (strlen($mssql_password) == 0)) {


    Follow all tuts step by step, but it's still the same.
    Could need some help here, if anyone bothered to...
    Last edited by BakaRangers; 13-01-13 at 04:40 AM.

  5. #5
    audisbroder is offline
    Grand MasterRank
    Aug 2011 Join Date
    Not foundLocation
    1,180Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by BakaRangers View Post
    Got this error:
    [Sun Jan 13 04:30:38 2013] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function mssql_connect()
    Fatal error: Call to undefined function mssql_connect() in C:\wamp\www\Register\reg.php on line 31

    line 31: $mssql_connect = mssql_connect($mssql_server, $mssql_username, $mssql_password) or die ("<strong>Cannot connect to the MSSQL server.</strong>");
    if ((strlen($mssql_server) == 0) || (strlen($mssql_username) == 0) || (strlen($mssql_password) == 0)) {


    Follow all tuts step by step, but it's still the same.
    Could need some help here, if anyone bothered to...
    You didn't uncomment (delete the ; in front of the lines) for the php_mssql.dll and/or extension=php_pdo_mssql.dll.

  6. #6
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by audisbroder View Post
    You didn't uncomment (delete the ; in front of the lines) for the php_mssql.dll and/or extension=php_pdo_mssql.dll.
    I did comment it out, but still the same...

    Something like this:

    Spoiler:

    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    ;extension=php_dba.dll
    ;extension=php_exif.dll
    ;extension=php_fileinfo.dll
    extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_gmp.dll
    ;extension=php_intl.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ldap.dll
    extension=php_mbstring.dll
    ;extension=php_ming.dll
    extension=php_mssql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    ;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
    ;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
    ;extension=php_openssl.dll
    ;extension=php_pdo_firebird.dll
    extension=php_pdo_mssql.dll
    extension=php_pdo_mysql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    extension=php_pdo_sqlite.dll
    ;extension=php_pgsql.dll
    ;extension=php_phar.dll
    ;extension=php_pspell.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    ;extension=php_soap.dll
    ;extension=php_sockets.dll
    ;extension=php_sqlite.dll
    ;extension=php_sqlite3.dll
    ;extension=php_sybase_ct.dll
    ;extension=php_tidy.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xsl.dll
    ;extension=php_zip.dll

  7. #7
    audisbroder is offline
    Grand MasterRank
    Aug 2011 Join Date
    Not foundLocation
    1,180Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by BakaRangers View Post
    I did comment it out, but still the same...

    Something like this:

    Spoiler:

    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    ;extension=php_dba.dll
    ;extension=php_exif.dll
    ;extension=php_fileinfo.dll
    extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_gmp.dll
    ;extension=php_intl.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ldap.dll
    extension=php_mbstring.dll
    ;extension=php_ming.dll
    extension=php_mssql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    ;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
    ;extension=php_oci8_11g.dll ; Use with Oracle 11g Instant Client
    ;extension=php_openssl.dll
    ;extension=php_pdo_firebird.dll
    extension=php_pdo_mssql.dll
    extension=php_pdo_mysql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_odbc.dll
    ;extension=php_pdo_pgsql.dll
    extension=php_pdo_sqlite.dll
    ;extension=php_pgsql.dll
    ;extension=php_phar.dll
    ;extension=php_pspell.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    ;extension=php_soap.dll
    ;extension=php_sockets.dll
    ;extension=php_sqlite.dll
    ;extension=php_sqlite3.dll
    ;extension=php_sybase_ct.dll
    ;extension=php_tidy.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xsl.dll
    ;extension=php_zip.dll
    uncomment the ;extension=php_pdo_odbc.dll .

  8. #8
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Still the same...

    Did i miss something here maybe?

    Spoiler:

    ##Configuration##
    $mssql_server = "EUSHULLY-HP\SQLEXPRESS"; //MSSQL server name or IP
    $mssql_username = "root"; //MSSQL username
    $mssql_password = "******"; //MSSQL password
    $mssql_account_db = "ACCOUNT_DBF"; //MSSQL account database name
    $mssql_character_01_db = "CHARACTER_01_DBF"; //MSSQL character database name
    $mssql_account_table = "account_tbl"; //MSSQL account table name
    $mssql_username_column = "account"; //MSSQL username column in account table
    $mssql_password_column = "password"; //MSSQL password column in account table
    $hash = ""; //Hash code
    $random_text_text = "e=mc2"; //Random text they must enter to register

  9. #9
    audisbroder is offline
    Grand MasterRank
    Aug 2011 Join Date
    Not foundLocation
    1,180Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by BakaRangers View Post
    Still the same...

    Did i miss something here maybe?

    Spoiler:

    ##Configuration##
    $mssql_server = "EUSHULLY-HP\SQLEXPRESS"; //MSSQL server name or IP
    $mssql_username = "root"; //MSSQL username
    $mssql_password = "******"; //MSSQL password
    $mssql_account_db = "ACCOUNT_DBF"; //MSSQL account database name
    $mssql_character_01_db = "CHARACTER_01_DBF"; //MSSQL character database name
    $mssql_account_table = "account_tbl"; //MSSQL account table name
    $mssql_username_column = "account"; //MSSQL username column in account table
    $mssql_password_column = "password"; //MSSQL password column in account table
    $hash = ""; //Hash code
    $random_text_text = "e=mc2"; //Random text they must enter to register
    Oh yeah "$hash = "here"; //Hash code" you have to enter your hash code. Example "serius,kikugalanet"

  10. #10
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Btw, do i only need that register.php inside www.
    or do i need something else in there?

  11. #11
    audisbroder is offline
    Grand MasterRank
    Aug 2011 Join Date
    Not foundLocation
    1,180Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by BakaRangers View Post
    Btw, do i only need that register.php inside www.
    or do i need something else in there?
    Only register.php

  12. #12
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    well, it's not working either...


    Spoiler:

    <!-- Start Register -->

    <?php

    #############################
    ##Copyright (c) TheJacob#####
    ##All Rights Reserved########
    ##thejacobpollack@gmail.com##
    #############################

    #############################
    #############################

    ##Configuration##
    $mssql_server = "EUSHULLY-HP\SQLEXPRESS"; //MSSQL server name or IP
    $mssql_username = "root"; //MSSQL username
    $mssql_password = "******"; //MSSQL password
    $mssql_account_db = "ACCOUNT_DBF"; //MSSQL account database name
    $mssql_character_01_db = "CHARACTER_01_DBF"; //MSSQL character database name
    $mssql_account_table = "account_tbl"; //MSSQL account table name
    $mssql_username_column = "account"; //MSSQL username column in account table
    $mssql_password_column = "password"; //MSSQL password column in account table
    $hash = "patom"; //Hash code
    $random_text_text = "e=mc2"; //Random text they must enter to register

    #############################
    #############################

    ##MSSQL Connect Function##
    function mssql_connect_ini($mssql_server,$mssql_username,$mssql_password) {
    $mssql_connect = mssql_connect($mssql_server, $mssql_username, $mssql_password) or die ("<strong>Cannot connect to the MSSQL server.</strong>");
    if ((strlen($mssql_server) == 0) || (strlen($mssql_username) == 0) || (strlen($mssql_password) == 0)) {
    echo "<strong>The connection configuration settings are invalid. Please make sure you've entered them in correctly.</strong>";
    }
    }

    ##MSSQL Account Database Select Function##
    function mssql_account_ini($mssql_account_db) {
    $mssql_select_db = mssql_select_db($mssql_account_db) or die ("<strong>Cannot select the Account database.</strong>");
    if (strlen($mssql_account_db) == 0) {
    echo "<strong>The account database configuration setting is invalid. Please make sure you've entered it correctly.</strong>";
    }
    }

    #############################
    #############################

    ##MSSQL Core Functionality##
    mssql_connect_ini($mssql_server,$mssql_username,$mssql_password);
    mssql_account_ini($mssql_account_db);

    #############################
    #############################

    $pusername = @$_POST['username']; //Post wsername
    $ppassword = @$_POST['password']; //Post password
    $prpassword = @$_POST['rpassword']; //Post re-enter password
    $random_text = @$_POST['random_text']; //Random text

    if (isset($_POST['submit']) == true) {
    $username = preg_replace("/[^a-zA-Z0-9\-\_\!\$\#\@\^\&\*\(\)\^\+\ \.\?]/", "", $pusername);
    $password = preg_replace("/[^a-zA-Z0-9\-\_\!\$\#\@\^\&\*\(\)\^\+\ \.\?]/", "", $ppassword);

    if ((isset($_POST['submit']) == true) and (strlen($pusername) < 3) || (strlen($pusername) > 15)) {
    echo "Your username must be between 3 and 15 characters in length.";
    }

    else if ((isset($_POST['submit']) == true) and ((strlen($ppassword) < 3) || (strlen($ppassword) > 15) || (strlen($prpassword) < 3) || (strlen($prpassword) > 15))) {
    echo "The password must be between 3 and 15 characters in length.";
    }

    else if ((isset($_POST['submit']) == true) and ($ppassword != $prpassword)) {
    echo "The passwords must be the same.";
    }

    else if ((isset($_POST['submit']) == true) and (($pusername == $ppassword) || ($pusername == $prpassword))) {
    echo "The username and password cannot be the same.";
    }

    else if ((isset($_POST['submit']) == true) and ($random_text != $random_text_text)) {
    echo "The random text must be filled in correctly. Please take another look at the random text.";
    }

    else if (mssql_num_rows(mssql_query("SELECT * FROM $mssql_account_table WHERE $mssql_username_column = '$username'")) == '0') {
    $stmt = mssql_init('createaccount');
    mssql_bind($stmt, '@account', $username, SQLVARCHAR, false, false, 15);
    mssql_bind($stmt, '@password', md5($hash . $password), SQLVARCHAR, false, false, 36);
    mssql_execute($stmt) or die ("<strong>Error occurred while executing the statement.</strong>");
    mssql_free_statement($stmt);
    echo "You've been successfully registered as <strong>" . $username . "</strong>!";
    } else {
    echo "The username already exists.";
    }
    }

    ?>

    <br>
    <center>
    <form method ="post" action="#">
    <table>

    <tr>
    <td><strong>Username</strong></td>
    </tr>
    <tr>
    <td><input name="username" type="username"></td>
    </tr>
    <tr>
    <td><strong>Password</strong></td>
    </tr>
    <tr>
    <td><input name="password" type="password"></td>
    </tr>
    <tr>
    <td><strong>Re-enter Password</strong></td>
    </tr>
    <tr>
    <td><input name="rpassword" type="password"></td>
    </tr>
    <tr>
    <td><strong>Please enter "<?php echo $random_text_text ?>" without the brackets below</strong></td>
    </tr>
    <tr>
    <td><input name="random_text" type="text"></td>
    </tr>
    <tr>
    <td><input name="submit" type="submit" value="Register"></td>
    </tr>

    </table>
    </form>
    </center>

    <!-- End Regiser -->


    Spoiler:


    Last edited by BakaRangers; 13-01-13 at 07:12 PM.

  13. #13
    Sorcerer Supreme Langstra is offline
    Member +Rank
    Feb 2011 Join Date
    Among heroesLocation
    479Posts

    Re: How to set up a website with a register page

    Have you restarted the apache server?

  14. #14
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Quote Originally Posted by Langstra View Post
    Have you restarted the apache server?
    I have, not working either.

    By the way, is there a need for me to connect SQL Server to Wamp Server, adding the database to Wamp Server and so on?
    Or does it just connect itself upon installing Wamp?

  15. #15
    Sorcerer Supreme Langstra is offline
    Member +Rank
    Feb 2011 Join Date
    Among heroesLocation
    479Posts

    Re: How to set up a website with a register page

    What version of php does that your wamp version have?

  16. #16
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Well i tried many versions, but none of them works, now i just use the newest version 5.4.3

  17. #17
    Cory James Cuvvvie is offline
    Grand MasterRank
    Nov 2009 Join Date
    707Posts

    Re: How to set up a website with a register page

    PHP: Introduction - Manual

    This extension is not available anymore on Windows with PHP 5.3 or later.

    Bummer. My suggestion would to be to use apache, not an all-in-one like wamp, and then get an older version of php.

    Or use this: "SQLSRV, an alternative driver for MS SQL is available from Microsoft."

    But trust me, the first suggestion will be easier.
    Actually don't, I never used SQLSRV. But I did the first one and it's easy.

    Edit: Or use this WAMP [PHP 5.2.9-2]
    Last edited by Cuvvvie; 13-01-13 at 09:19 PM.

  18. #18
    Sorcerer Supreme Langstra is offline
    Member +Rank
    Feb 2011 Join Date
    Among heroesLocation
    479Posts

    Re: How to set up a website with a register page

    The newer version of PHP do not support the mssql library anymore (since 5.3 not I believe), you either need to install the mssql library created by FreeBSD, but I do not know if that works with the latest PHP version yet, but I think it does.
    The other option is to download a wamp PHP extension WampServer, the web development platform on Windows - Apache, MySQL, PHP and get php version 5.2, install this and then in your wamp manager menu you select the php version you want to use.

  19. #19
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    I re-start everything.

    But then:

    Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: EUSHULLY-HP\SQLEXPRESS in C:\wamp\www\New folder\register.php on line 31
    Cannot connect to the MSSQL server.

  20. #20
    Cory James Cuvvvie is offline
    Grand MasterRank
    Nov 2009 Join Date
    707Posts

    Re: How to set up a website with a register page

    MSSQL username should be 'sa' as default, you have it is 'root'. root is mysql, sa is mssql.

    And I don't want to insult your intelligence, but make you you changed the password back to what it was instead of the ****** you put in the CODE block.

  21. #21
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Yeah lol, i didn't forgot that.
    That error, is it because i have wrong username and password?


    Do i use SQL server username and password with that register.php or something?
    Because i don't use any username and password for it, it uses window authentication.
    When i tried to change, it wont connect.

    That password i use now, are password i reset through PhpMyAdmin..
    Last edited by BakaRangers; 13-01-13 at 10:25 PM.

  22. #22
    Cory James Cuvvvie is offline
    Grand MasterRank
    Nov 2009 Join Date
    707Posts

    Re: How to set up a website with a register page

    I really have no idea what you're doing. phpMyAdmin is for mysql, not mssql. You shouldn't be using it for this product.
    That's where the root came from.

    Since you are using MSSQL, your username in that config is 'sa' and your password is the password you made during the MSSQL configuration. The server name is the thing you see when you log into SQL Server Management Studio Express. (which looks right, it should be something like USER-PC\SQLEXPRESS)

    And yes, the error is here:
    Code:
    function mssql_connect_ini($mssql_server,$mssql_username,$mssql_password) {
    $mssql_connect = mssql_connect($mssql_server, $mssql_username, $mssql_password) or die ("<strong>Cannot connect to the MSSQL server.</strong>");
    So if you see that error, it means that one of those 3 things aren't correct, or your MSSQL service isn't even running.

    I do have a bad feeling that you're running mysql for some reason though, please tell me you at least have mssql.

  23. #23
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Man this is so messed up.
    I don't have MSSQL user nor pass, it's window authentication...
    I'll try to fix this, thanks for the heads up lol

  24. #24
    Cory James Cuvvvie is offline
    Grand MasterRank
    Nov 2009 Join Date
    707Posts

    Re: How to set up a website with a register page

    The user is 'sa', it always is. Just run the MSSQL installation and make a new instance (name is something other than SQLEXPRESS, like FLYFF for example) and just remember the password you used.

    Make sure to uncheck 'Hide advanced config settings' during the installation and do NOT use windows authentication, and make a password and remember it. Use that password with that instance and with the username 'sa' and you should be all set.

  25. #25
    Member BakaRangers is offline
    MemberRank
    Jan 2013 Join Date
    SandnesLocation
    38Posts

    Re: How to set up a website with a register page

    Spoiler:
    i think im missing the:

    php_mssql.dll
    php_pdo_mssql.dll

    On startup those two were missing, could i just download it off somewhere?


    Not working either:
    Spoiler:

    [14-Jan-2013 01:57:22] PHP Warning: mssql_connect() [<a href='function.mssql-connect'>function.mssql-connect</a>]: Unable to connect to server: EUSHULLY-HP\SQLEXPRESS in C:\wamp\www\New folder\register.php on line 31
    Last edited by BakaRangers; 14-01-13 at 03:02 AM.



Page 1 of 2 12 LastLast

Advertisement