Results 1 to 4 of 4

Thread: Php + Ms Sql

  1. #1

    Question Php + Ms Sql

    Okay.

    Im using Windows2k3 Web Edition for hosting IIS6.0
    Im using Windows2k3 Server for hosting a SQL2000 Database

    Both work great except the fact that i can not get PHP to connect to the SQL Database.

    I can get into the database using Access and a program called MSDE i think. It worked fine on the webserver.

    PHP was working previously very well with SQL2000, but I restarted the servers, and it just stopped working.

    Does anyone have any suggestions?

    I have the dll's located properly, the extension is in the extensions directory. Im using SQL Authetication... Im really lost here..

    Thanks!

  2. #2
    Join Date
    Feb 2004
    Location
    Atlanta, GA
    Posts
    5,627
    Are you sure the dlls are loading properly? What error messages do you get?

  3. #3
    Warning: mssql_connect(): Unable to connect to server: 192.168.77.42 in E:\wwwroot\flmanage.com\db.php on line 5

    Now i can confirm the username/password are correct, as is the IP. Ive also confirmed the database is using the default ports.

    Side note: The IP is correct, its an internal ip yes, but we are behind a firewall, going from one pc to the next, both using the 192.168.77.* ip range.

    And ive connected using 3rd party software using that ip also.
    Last edited by dbarney; 04-20-2004 at 01:54 PM.

  4. #4
    Time to confuse things up a bit more....

    Ok, to install MSSQL drivers for PHP you have to get the ntwdblib.dll from the PHP Install, and move it to the c:\windows\system32... Or atleast thats what i had read. I try that, and i get a cannot connect error. BUT if i use the ntwdblib.dll from the SQL install, i get:

    Warning: mssql_connect(): message: Login failed for user 'su'. (severity 14) in E:\wwwroot\flmanage.com\db.php on line 5

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •