PHP, MSSQL, SQL SERVER, WAMP, PDO, Windows Authentication

I searched the site and website for a PROPER tutorial on how, without your success, connect from your WAMP PHP to your local SQL SERVER.

Articles I found on this site:

None of them help me.

Can anyone post a related article on how to connect from WAMP PHP to local SQL Server with Windows Authentication. Also if possible with SQL Server Authentication.

I tried to install extensions php_pdo_mssql

, php_mssql

but I cannot connect to server errors. I can connect to the server through SQL Server Management Studio when I just type in the database name: DEV-13 and put Windows Authentication as the login credentials.

PHP extensions installation tutorial and dummy sql server connection would be perfect!

Please, help.

+3


source to share


3 answers


Here's a guide from Microsoft. http://msdn.microsoft.com/en-us/library/cc296205%28v=sql.90%29.aspx



+1


source


Do you want to connect using an id that Apache is running or a different user? If the same user as Apache see http://msdn.microsoft.com/en-us/library/cc793139(v=sql.90).aspx . Now you are looking for another article on how to use arbitrary credentials.

Also, mssql_ * is out of date in my mind. It's a pain to find the correct DLLs for it, and it's not well supported (although it's one of the only options on Linux).



I suggest using sqlsrv via PDO. This way you get the benefits of the newest connection method (supported by Microsoft) and in the worst case, if you need to go back to the mssql_ * drivers, you can just change the PDO connection string and execute (no query changes or anything else).

+1


source


0


source







All Articles