atitthaker Posted September 15, 2008 Share Posted September 15, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/ Share on other sites More sharing options...
corbin Posted September 15, 2008 Share Posted September 15, 2008 Is there an error message or anything? Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-642280 Share on other sites More sharing options...
atitthaker Posted September 16, 2008 Author Share Posted September 16, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-642567 Share on other sites More sharing options...
atitthaker Posted September 16, 2008 Author Share Posted September 16, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-642689 Share on other sites More sharing options...
darrelll Posted September 21, 2008 Share Posted September 21, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-647018 Share on other sites More sharing options...
plimpton Posted September 22, 2008 Share Posted September 22, 2008 What is the name of your server you are connecting to? "(local)\SQLEXPRESS" works for me using the sqlsrv driver (not mssql) Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-648220 Share on other sites More sharing options...
darrelll Posted September 23, 2008 Share Posted September 23, 2008 I got it running, thanks! Quote Link to comment https://forums.phpfreaks.com/topic/124290-unable-to-connect-to-ms-sql-server-2005-using-php/#findComment-648851 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.