troubleshooting Question

Cannot connect to SQLServer -->php, iis

Avatar of SiemensSEN
SiemensSEN asked on
PHPMicrosoft SQL Server 2005Windows Server 2008
3 Comments1 Solution446 ViewsLast Modified:

  I am trying to setup a server that will host a PHP web application that will connect SQLServer . This is error is get when I try to connect via PHP
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: myserver

Here is the setup

PHP 5.03 (cannot install latest PHP ..)
IIS 7.5
database - SQLSERVER 2005 64 bit on a remote machine

Here is what I have done

Copy the PHP ZIP -> extract to C:\Program Files (x86)\PHP directory
copy ntwdblib  -- version 2000.80.194.0 to c:\windows\system32 folder
copy php.ini file to c:\windows folder
add php to the path
enable mssql in the ini file
Here is a dump from <phpinfo()

MSSQL Support enabled
Active Persistent Links  0  
Active Links  0  
Library version  7.0  

Directive Local Value Master Value
mssql.allow_persistent On On
mssql.batchsize 0 0
mssql.compatability_mode Off Off
mssql.connect_timeout 5 5
mssql.datetimeconvert On On
mssql.max_links Unlimited Unlimited
mssql.max_persistent Unlimited Unlimited
mssql.max_procs 25 25
mssql.min_error_severity 10 10
mssql.min_message_severity 10 10
mssql.secure_connection Off Off
mssql.textlimit Server default Server default
mssql.textsize Server default Server default
mssql.timeout 60 60

-- I can connect from ODBC on this machine

--I install the MSSQL client tool and I can connect to the DB server

-- The same connect script works on my 2003 application server

What am I missing...

Thanks for your help
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros