Unanswered: Cant connect to SQL Server with PHP, Error: Not associated with a trusted SQL con
I've spent close to 3 hours trying to figure this out.
I have SQL Server 2000 Developers Version + Service Pack 4 installed on Machine A which is running Windows XP Pro. I have Machine B running XP Pro and Apache 2.0 + PHP 4.40.
SQL Server is configured to SQL Authentication + Windows Authentication.
PHP is configured as follows:
; Use NT authentication when connecting to the server mssql.secure_connection = Off
When trying to connect with either mssql_connect or odbc_connect I get the following error:
odbc_connect(): SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'user'. Reason: Not associated with a trusted SQL Server connection., SQL state 28000 in SQLConnect
I have tried adding a System DSN to MDAC and it can connect no problems to MS SQL. I don't know what to do, I've googled and tried every possible solution and it didn't help.
Is there a way to make SQL accept any connections? I don't care if its insecure I just need it for several days to develope a small application.
Here is the sample code I'm using to test the connection: