register page problem xampp

Results 1 to 13 of 13
  1. #1
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    sad register page problem xampp

    i got this error Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\index.php on line 31
    can some body help with this?


  2. #2
    Member sniperlegend201 is offline
    MemberRank
    Mar 2011 Join Date
    ScotlandLocation
    72Posts

    Re: register page problem xampp

    is it a problem with a register page on a retro?

  3. #3
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    Re: register page problem xampp

    nope it not to a retro

    ---------- Post added at 11:08 PM ---------- Previous post was at 11:07 PM ----------

    its on my localhost

  4. #4
    Newbie Psy015 is offline
    MemberRank
    Jun 2009 Join Date
    localhostLocation
    10Posts

    Re: register page problem xampp

    show us the the register php code mate ;)

  5. #5
    Elite Member mikederoobs is offline
    Member +Rank
    Jul 2009 Join Date
    System32Location
    188Posts

    Re: register page problem xampp

    Accept Php in xampp php.ini extension=php_mssql.dll without ;

    and extension=php_pdo_mssql.dll without ; search ;extension=php_pdo_mssql.dll and these ;extension=php_mssql.dll and remove the ; and save and restart apache and all and done

  6. #6
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    Re: register page problem xampp

    <!-- Start Register -->

    <?php

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

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

    ##Configuration##
    $mssql_server = "CHRISTOPHER\SQLEXPRESS"; //MSSQL server name or IP
    $mssql_username = "sa"; //MSSQL username
    $mssql_password = "sa01"; //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 = "serus"; //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 -->

    ---------- Post added at 11:23 PM ---------- Previous post was at 11:12 PM ----------

    mike it thats fix it

    ---------- Post added at 11:24 PM ---------- Previous post was at 11:23 PM ----------

    mikes i try it is not fix it

  7. #7
    Newbie Psy015 is offline
    MemberRank
    Jun 2009 Join Date
    localhostLocation
    10Posts

    Re: register page problem xampp

    try to enable the mssql extension in the "php.ini" file ..

    search for " ;extension=php_pdo_mssql.dll and ;extension=php_mssql.dll "
    remove the " ; "
    save the file, restart the apache server
    and try to register again..

  8. #8
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    Re: register page problem xampp

    yeah but then i try to restart my apache server i got a error 1

  9. #9
    Newbie Psy015 is offline
    MemberRank
    Jun 2009 Join Date
    localhostLocation
    10Posts

    Re: register page problem xampp

    which version of xampp are you using?
    in the newer version ( 1.7.4 ) the module mssql isnt included anymore ..

    download the older version ( 1.7.3 )
    it should work ..

  10. #10
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    Re: register page problem xampp

    can you give me a link?

  11. #11
    Newbie Psy015 is offline
    MemberRank
    Jun 2009 Join Date
    localhostLocation
    10Posts

    Re: register page problem xampp


  12. #12
    Newbie christopher2690 is offline
    MemberRank
    Mar 2011 Join Date
    16Posts

    Re: register page problem xampp

    thx dude it work :)

  13. #13
    Elite Member mikederoobs is offline
    Member +Rank
    Jul 2009 Join Date
    System32Location
    188Posts

    Re: register page problem xampp

    k Nice :)



Advertisement