Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
newphpcoder
Starting Member
23 Posts |
Posted - 2010-10-08 : 05:04:49
|
Good day!After connecting my php to sql server 2005 using the mssql_connect() syntax, which did not work. I try my best that I can to work it, but at the end I could not fix the error. So now, I try another option like I used Microsoft Driver for SQL Server and the syntax that I’m using is sqlsrv_connect() Here are some configurations that I do to work the connection1. I put the php folder in in C:2. I configure my IIS 6.0 to run php using isapi3. I installed the SQLSRV20.EXE inC:\php\ext4. I configure my php.iniI uncommented the ff:extension_dir = "./ext"cgi.force_redirect = 0doc_root = "C:\Inetpub\wwwroot"I add extension=php_sqlsrv_53_ts_vc9.dllI create a php file to test the connection[php]<?php$server = "ISM\SQLEXPRESS";$connectOptions = array("Database" => "dbtest");//Because UID and PWD are not specified in the connection option//The connection is made with Windows Authentication.if($conn){echo "Connection established";}else{echo "Connection could not be established";}?>[/php]After I run this code I got an error like this:Fatal error: Call to undefined function sqlsrv_connect() in C:\Inetpub\wwwroot\testconn.php on line 5I don’t know where is the problem and how can I fix it. I need to fix it as soon as possible, because almost 3 weeks I troubleshoot this connection.Any help is highly appreciatedThank you in advance. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-10-08 : 10:15:13
|
you still need to register ntwdblib.dll |
|
|
newphpcoder
Starting Member
23 Posts |
Posted - 2010-10-10 : 20:51:05
|
quote: Originally posted by russell you still need to register ntwdblib.dll
How can i register ntwdblib.dll? |
|
|
|
|
|