KalOnline SQL 2005 Scripts

Results 1 to 5 of 5
  1. #1
    Member DarkSource is offline
    MemberRank
    Oct 2007 Join Date
    GermanyLocation
    91Posts

    KalOnline SQL 2005 Scripts

    Hey Guys,
    I got a big problem... i download now much .php Scripts and tryed all to get them work..
    my problem is everytime:
    Code:
    Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\pages\register.php on line 47
    my script is this for sql 2005:
    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Registration</title>
    </head>
    <?php
    function passConvert($password)
    {
     
    $encar = array('!'=>'95''"'=>'88''#'=>'9D''$'=>'4C''%'=>'F2''&'=>'3E''\''=>'BB''('=>'C0'')'=>'7F''*'=>'18''+'=>'70'','=>'A6''-'=>'E2''.'=>'EC''/'=>'77',
          
    '0'=>'2C''1'=>'3A''2'=>'4A''3'=>'91''4'=>'5D''5'=>'7A''6'=>'29''7'=>'BC''8'=>'6E''9'=>'D4'':'=>'40'';'=>'17''<'=>'2E''='=>'CB''>'=>'72''?'=>'9C',
          
    '@'=>'A1''A'=>'FF''B'=>'F3''C'=>'F8''D'=>'9B''E'=>'50''F'=>'51''G'=>'6D''H'=>'E9''I'=>'9A''J'=>'B8''K'=>'84''L'=>'A8''M'=>'14''N'=>'38''O'=>'CE',
          
    'P'=>'92''Q'=>'5C''R'=>'F5''S'=>'EE''T'=>'B3''U'=>'89''V'=>'7B''W'=>'A2''X'=>'AD''Y'=>'71''Z'=>'E3''['=>'D5''\\'=>'BF'']'=>'53''^'=>'28''_'=>'44',
          
    '`'=>'33''a'=>'48''b'=>'DB''c'=>'FC''d'=>'09''e'=>'1F''f'=>'94''g'=>'12''h'=>'73''i'=>'37''j'=>'82''k'=>'81''l'=>'39''m'=>'C2''n'=>'8D''o'=>'7D',
          
    'p'=>'08''q'=>'4F''r'=>'B0''s'=>'FE''t'=>'79''u'=>'0B''v'=>'D6''w'=>'23''x'=>'7C''y'=>'4B''z'=>'8E''{'=>'06''|'=>'5A''}'=>'CC''~'=>'62');
     
    $newpass "0x";          
     for (
    $i 0$i strlen($password); $i++)
     {
      
    $newpass .= $encar[$password[$i]];
     }     
     
     return 
    $newpass;  
    }
    if (
    $_POST["gogogo"])
    {
     
    $err "";
     
     if (!
    $_POST["accname"]) $err .= "<font color='red'><b>Enter an ID <br>\n";
     if (!
    $_POST["accpass1"]) $err .= "<font color='red'><b>Enter an Password <br>\n";
     if (!
    $_POST["accpass2"]) $err .= "<font color='red'><b>Repeat Password <br>\n";
     
     
     
     if (
    $err == "")
     {
      if (
    $_POST["accpass1"] != $_POST["accpass2"])
       
    $err .= "<font color='red'><b>Passwords does not match! <br>\n";
     }
     
     if (
    $err == "")
     {
      
    // using standard windows authentication, whwn you use a password, use this line
      // $msconnect = mssql_connect("PC-NAME\SQLEXPRESS", "sa", "PASSWORD");
      
    $msdb mssql_select_db("kal_auth"$msconnect);
     
      
    $cpass passConvert($_POST["accpass1"]);
      
    $query "INSERT INTO Login ([ID], [PWD], [Birth], [Type], [ExpTime]) VALUES('".$_POST["accname"]."', $cpass , '19190101', '0', '4000')";
      
    //echo $query;
     
      
    $acccreate mssql_query($query);
      if (
    $acccreate)
      {  
       
    $uid mssql_result(mssql_query("SELECT [UID] from Login WHERE [ID]='".$_POST["accname"]."'"),0,0);
     
       
    mssql_close() or die('failed closing mssql');
     
       
    //echo $query;
     
     
       
    $_POST["accname"] = "";
       
    $_POST["str"] = "";
       
    $_POST["hlt"] = "";
       
    $_POST["int"] = "";
       
    $_POST["wis"] = "";
       
    $_POST["agi"] = "";            
     
       
    $err "<b>Acc created ! =) you can now log in!</b>";    
     
      }
      else echo 
    "Somethings Wrong!!  :P";
      
    mssql_close() or die('failed closing mssql'); 
     }
     
    }
     
     
    ?>
     
     
      <title></title>
    <body>
    <form method="post" action="register.php">
      <table>
        <tr>
          <td></td><td><?= $err ?></td>
       </tr>
        <tr>
          <td>ID:</td><td><input type="text" name="accname" maxlength="12"></td>
       </tr>
        <tr>
          <td>Password:</td><td><input type="password" name="accpass1" maxlength="8"></td>  
       </tr>
        <tr>
          <td>Repeat Password:</td><td><input type="password" name="accpass2" maxlength="8"></td>
       </tr>
     
          <td><input type="submit" name="gogogo" value="Create"></td>
       </tr>
        <tr><td>&nbsp;</td></tr>
     
     
            </table>
     
    </form>
    </body>
    </html><!-- tab end -->
    ODBC is right installed
    SQL2005 "sa" account is right installed
    MYSSQL is running

    Can anyone help me please!!!???
    Got same problem at Ranking... :(
    Greets DarkSource


  2. #2
    Account Upgraded | Title Enabled! greetisgood is offline
    MemberRank
    May 2006 Join Date
    GermanyLocation
    512Posts

    Re: KalOnline SQL 2005 Scripts

    Yeah the problem is, you are using MySQL ..
    Kal needs MSSQL. Or did you mean MSSQL? ^^
    *joke off*

    try this one
    link
    Last edited by greetisgood; 18-06-10 at 09:09 AM.

  3. #3
    Banned EvolutionKal is offline
    BannedRank
    Sep 2007 Join Date
    SpaceLocation
    525Posts

    Re: KalOnline SQL 2005 Scripts

    use msql 2000 or 2005 then setup in php script this " // using standard windows authentication, whwn you use a password, use this line
    // $msconnect = mssql_connect("Server name ", "Your user ", "YourPASSWORD");"
    then go to xammp and look on php.ini for enabel mssql and remove the ; from mssql line and will work fine
    srry bad english ...i hop this help

  4. #4
    Apprentice MrHeth is offline
    MemberRank
    May 2010 Join Date
    8Posts

    Re: KalOnline SQL 2005 Scripts

    me too get like problem any one fix ?

  5. #5
    Developer BeshoyFD is offline
    MemberRank
    Jul 2008 Join Date
    In World :)Location
    702Posts

    Re: KalOnline SQL 2005 Scripts

    how to fix problem.

    open php.ini if you use xampp you will find it in C:\xampp\php || other program search on it or maybee you will find it in C:\Windows

    after open php.ini search on ;extension=php_mssql.dll change it to extension=php_mssql.dll just delete ;

    save php.ini and restart apache..



    (DarkSource) take care because your script not protected from sql injectoion so anyone can hack your db from this script
    Last edited by BeshoyFD; 21-01-11 at 03:30 AM.



Advertisement