paulferree Posted June 25, 2009 Share Posted June 25, 2009 I'm getting a "Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: " message. And I'm having a hard time trying to find a concise explanation on how to make the PHP MSSQL connection. Im on windows server 2008. The mssql line is uncommented in the ini file. Whats next? Do I need to install that Freetds stuff? Thanks! Paul Link to comment https://forums.phpfreaks.com/topic/163695-mssql-connection-help-cant-connect-to-server/ Share on other sites More sharing options...
pkedpker Posted June 25, 2009 Share Posted June 25, 2009 mssql_connect() will only work if you uncomment the extension for php_mssql.dll in php.ini is how you connect $mssql_connect = ("localhost", "username", "password"); $msdb = mssql_select_db("databasename", $msconnect); But I ran a private server of a stolen game a while that used mssql and I didn't allow any remote connections nor did I have any username / passwords I just used standard windows authentication. which means you connect like this $msconnect = mssql_connect("YourIPgoesHere"); $msdb = mssql_select_db("DatabaseName", $msconnect); simple as that. Link to comment https://forums.phpfreaks.com/topic/163695-mssql-connection-help-cant-connect-to-server/#findComment-863772 Share on other sites More sharing options...
paulferree Posted June 26, 2009 Author Share Posted June 26, 2009 That didn't seem to work. I think I'm missing some configuration before that point. What do I need to ensure is in place to get PHP and MSSQL working besides the initial uncommenting of the mssql line in the ini file? Thanks, Paul Link to comment https://forums.phpfreaks.com/topic/163695-mssql-connection-help-cant-connect-to-server/#findComment-864154 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.