glam_rock Posted September 16, 2011 Share Posted September 16, 2011 Hey guys, So I have been banging my head and scouring the internet for help with this and am coming up short. I write internal php data management applications that run off a small local web server and interact with several different SQL databases. In this instance I am running two php applications off of one machine. One of them connects fine to it's database using mssql_connect and PDO. A separate application running on the same web server attempts to connect to a different SQL database using the same means and fails. The second database is pingable and in house and i can remote to the machine and access the database via Microsoft SQL Server Management Studio. mssql_connect and PDO both fail and I can't figure out why. A different application can connect to a different SQL database just fine. This tells me that is must be something on the SQL server but the administrator ensures me they are identical configurations. Any thoughts? Help please. I'm desperate. :'( edit: PHP Version 5.2.8 SQL Server 8.0.2039 Quote Link to comment https://forums.phpfreaks.com/topic/247278-sql-server-connection-woes/ Share on other sites More sharing options...
glam_rock Posted September 16, 2011 Author Share Posted September 16, 2011 error: Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server Quote Link to comment https://forums.phpfreaks.com/topic/247278-sql-server-connection-woes/#findComment-1269955 Share on other sites More sharing options...
glam_rock Posted September 16, 2011 Author Share Posted September 16, 2011 I got this working via sqlsrv, but am still curious as to why sqlsrv works and mysql_connect doesn't... Quote Link to comment https://forums.phpfreaks.com/topic/247278-sql-server-connection-woes/#findComment-1270000 Share on other sites More sharing options...
Muddy_Funster Posted September 21, 2011 Share Posted September 21, 2011 mssql was depreciated as a driver by microsoft themselves, which is a pain because it was more in keeping with the function set of others like mysql. It's likely that mssql does not have fully supported ODBC connection settings within the database drivers any more, it's microsoft's style of things when they upgrade. because of this I would suggest that you replace all youe mssql functions with the sqlsrv eqivelents, to save problems in the future. Quote Link to comment https://forums.phpfreaks.com/topic/247278-sql-server-connection-woes/#findComment-1271402 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.