PHP MSSQL Connection

Results 1 to 8 of 8
  1. #1
    Proficient Member tschulian is offline
    MemberRank
    Jul 2012 Join Date
    ErlangenLocation
    151Posts

    ! PHP MSSQL Connection

    Hey guys,
    I got now problem due to the connection to my db...

    PHP Code:
    Warningmssql_connect() [function.mssql-connect]: Unable to connect to servermy_ip.my_ip C:\inetpub\www\config.php on line 4
    Couldn
    't connect to server my_ip.my_ip 

    Does any1 know a hotfix for that error which occurs?


  2. #2
    C:\ WizCoder is offline
    MemberRank
    Aug 2010 Join Date
    JapanLocation
    703Posts

    Re: PHP MSSQL Connection

    Try calling mssql_get_last_message() to retrieve the last error message.

    OR

    "ntwdblib.dll"
    http://www.helpspot.com/helpdesk/ind...=kb.page&id=13 scroll down to that and follow the instructions.

  3. #3

    Re: PHP MSSQL Connection

    Which mssql version are you running ? If its 2005+ then it has named instance by default - SQLEXPRESS (for express version used by most people). Well... can you connect to ur server with SSMSE ?

  4. #4
    Proficient Member tschulian is offline
    MemberRank
    Jul 2012 Join Date
    ErlangenLocation
    151Posts

    Re: PHP MSSQL Connection

    Hey guys, thanks for that fast reply.


    I am using Server 2008 R2 SP1 English with MS SQL Express 2008 R2

    Yes I can connect via server management studio.

    Chernobyl what do you mean?
    the following syntax I have: servername/sqlexpress (in odbcs) etc. game works perfectly ... only the connect with homepage does not work yet...

  5. #5

    Re: PHP MSSQL Connection

    Normally, it should be .\SQLEXPRESS . Also, we would need some info about your webserver. Are you using xampp 1.7.1 maybe ? Also, you can try enabling named pipes or tcp/ip for sqlexpress protocols at Sql Server Configuration Manager.

  6. #6
    Proficient Member tschulian is offline
    MemberRank
    Jul 2012 Join Date
    ErlangenLocation
    151Posts

    Re: PHP MSSQL Connection

    I am using:
    wampserver 2.0 :D a bit old but I got used to it even in my company ...

    yeah hm.. what about that "named pipes" I cant follow your words atm ...

  7. #7

    Re: PHP MSSQL Connection

    Then it might be a problem with php mssql driver... Check google for answers :P

  8. #8
    Proficient Member tschulian is offline
    MemberRank
    Jul 2012 Join Date
    ErlangenLocation
    151Posts

    Re: PHP MSSQL Connection

    I checked google already for hours :D
    rz was the last way to get my problem solved xD



Advertisement