Akulaari Posted October 8, 2008 Share Posted October 8, 2008 Hi, I'm having this same problem as many others do, but I just can't seem to get things working at all. *I have copied ntwdblib.dll version 2000.80.194.0 to win/system32 and PHP directories *extension=php_mssql.dll is uncommented in php.ini *I'm using following php code to connect: $server = "localhost\SQLEXPRESS"; $s = mssql_connect($server,$userName,$password) or die("Couldn't connect to SQL Server"); (of course I have given username and pw) but I just seem to get connection error. *I have tried to connect to same database from command prompt with same username and password, and there it works. So the problem seems to exist only in PHP now. *I have allowed tcp/ip and named pipes in SQL Server Configuration Manager. Lastly I have found out that for someone with this problem working solution was to use the sqlsrv driver instead of mssql. However I haven't found sqlsrv driver in my php.ini so could anyone help me with that since it could solve this? Quote Link to comment https://forums.phpfreaks.com/topic/127507-mssql-2005-express-couldnt-connect-to-server-problem/ Share on other sites More sharing options...
Akulaari Posted October 8, 2008 Author Share Posted October 8, 2008 problem solved... Re-installed MSSQL2005 express and changed php server string to "localhost\SQLEXPRESS,1095" Quote Link to comment https://forums.phpfreaks.com/topic/127507-mssql-2005-express-couldnt-connect-to-server-problem/#findComment-659804 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.