Quote Originally Posted by rmiao View Post
You have to tell sql server it's windows authentication, look at samples in http://www.connectionstrings.com/sql-server-2005.
I do all the configuration that i know to work my connection from php to mssql like this:

1.I put the php location in the system variable PATH.
2.I download the ntwdblib.dll version that work in sql server 2005.
3.I put the ntwdblib.dll in the system32, and php folder.
3.I configure my php.ini
I uncommented the ff:
extension=php_mssql.dll
extension_dir=".\ext"
doc_root ="C:\Inetpub\wwwroot"
cgi.force_redirect = 0
mssql.secure_connection = On

I change also my php code:


<?php
//mssql.secure_connection = On
//Need to uplaod ntwdblid.dll from net

$myServer="ISM\SQLEXPRESS";
//$connectionOptions=array("Database"=>"AdventureWor ks");
//$myUser = "MRM\Administrator";
//$myPass = "xoxoxo";
$myDB = "dbtest";

//Connect to the database
$dbhandle = mssql_connect($myServer) or die("Could not connect to SQL Server");

//Select a database
$selected = mssql_select_db($myDB) or die("Could not open database");

echo "You are connected to the dbtest";
?>


After all this configuration still I can't connect to mssql
Fatal error: Call to undefined function mssql_connect() in C:\Inetpub\wwwroot\testconn.php on line 12