Connect to MS SQL with PHP - TechRepublic
Question
June 22, 2007 at 08:38 AM
joelataylor

Connect to MS SQL with PHP

by joelataylor . Updated 16 years, 1 month ago

Hey guys … I’ve been having major issues trying to connect to our ms sql database using PHP. (MS SQL 2005)

Here’s the conditions:

I CAN CONNECT TO OUR REMOTE DB with:
PHP 5.2.3
IIS 5.1
on my local machine that is logged into the network.

I CAN’T CONNECT TO OUR REMOTE DB with:
PHP 5.2.3
IIS 6
when files are on our server.

I think it has something to do with authentication. The server is set to accept both Sql Server users and Windows Authentication. I think the fact that I’m already logged in to my machine with my user/pass it acts as authentication to get to the db – but when I’m on the server it doesn’t have those login details – so it’s just failing.

Can anyone help me out?
Maybe I should use php’s PDO?

This discussion is locked

All Comments