Jump to content

Archived

This topic is now archived and is closed to further replies.

atitthaker

Unable to connect to MS SQL Server 2005 using PHP

Recommended Posts

Hi,

 

I am trying to connect to MS SQL Server 2005 using PHP. But I am unable to connect to the SQL Server.

 

Following things are in place.

 

-- mssql extension is enabled in PHP and I can see MSSQL details in php info.

-- named pipes and TCP/IP is enabled in SQL Server Configuration

-- mssql.allow_persistent = On in php.ini

-- I copied ntwdblib.dll to /windows directory.

 

I am not sure what is going wrong but I am unable to connect to MS SQL Server 2005.

 

thanks

Atit

Share this post


Link to post
Share on other sites

It gives me only one message:

 

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: node200 in E:\php_scripts\mssql_connection.php on line 28

 

I do not know what is going wrong here...

 

I have also installed MS SQL Server Client tools on my system which is the web server for the application.

 

Thanks

Atit

Share this post


Link to post
Share on other sites

Hi,

 

Got the solution after a long fight...

 

was having problem with Database components.

 

Got the same dll for all the places and I got connected in a minute.

 

Thanks

Atit

Share this post


Link to post
Share on other sites

hey there,

 

I am having the exact some problem as you(givin the error) connecting to SQL. I am running Vista, SQL2005, and I am getting the same error connecting the database. My login is connecting, but seems to be permissions...........can you tell me what steps you took to overcome this

 

Thank you

Share this post


Link to post
Share on other sites

What is the name of your server you are connecting to? "(local)\SQLEXPRESS" works for me using the sqlsrv driver (not mssql)

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.