how to fix my problem please

Discussion in 'PHP' started by AIucard, Apr 5, 2011.

  1. #1
    okay i am making a web based panel for a gunz server and it syas this "Parse error: syntax error, unexpected T_STRING in C:\AppServ\www\config.php on line 3"

    Here is my config:

    <?php
    mssql_connect(')ALEX-PC/SQLEXPRESS","sa","triangle')
    mssql_select_db(GunzDB");
    $opened = 1;
    if($opened == 0){
    $pagetitle = "Server in maintenance";
    }
    ?>

    i'm new at this whole php thing so please help.
     
    AIucard, Apr 5, 2011 IP
  2. codeartist

    codeartist Peon

    Messages:
    96
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ok here is the problem
    mssql_connect(')ALEX-PC/SQLEXPRESS","sa","triangle')
    mssql_select_db(GunzDB");

    Use this script instead those lines
    mssql_connect("ALEX-PC/SQLEXPRESS","sa","triangle");
    mssql_select_db("GunzDB");
     
    codeartist, Apr 5, 2011 IP
  3. AIucard

    AIucard Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    okay thanks, we cleared up that error. Now i have this:

    Fatal error: Call to undefined function mssql_connect() in C:\AppServ\www\config.php on line 2

    Dx what could be the problem. maybe i configured something else wrong? please help
     
    AIucard, Apr 5, 2011 IP
  4. codeartist

    codeartist Peon

    Messages:
    96
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you are trying to connect with Microsoft Sql Server it giving error because the library to connect with mssql server hasn't be activated

    open the php.ini file and find ;extension=php_mssql.dll

    remove ; from extension=php_mssql.dll and restart your apache server then it should work
     
    codeartist, Apr 5, 2011 IP
  5. SametAras

    SametAras Well-Known Member

    Messages:
    53
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    113
    #5
    You had better use MySQL. But, it's free, powerful and compatible with PHP.
     
    SametAras, Apr 5, 2011 IP