Connecting Tech Pros Worldwide Forums | Help | Site Map

Example of mssql_connect that works with SQL Server 2005?

David Haynes
Guest
 
Posts: n/a
#1: Nov 22 '05
I can't seem to get the magic to work to connect to SQL Server via
mssql_connect(). I can get odbc_connect to work just fine, but not
mssql_connect. Could someone please post an example of how the hostname
field should be set up?

The SQL Server is on the same system as my php session.

Obviously, I am missing something because mssql_connect('localhost', '',
'') comes back with 'connection refused'.

-david-


Chung Leong
Guest
 
Posts: n/a
#2: Nov 22 '05

re: Example of mssql_connect that works with SQL Server 2005?


Try setting mssql.secure_connection in php.ini to on.

David Haynes
Guest
 
Posts: n/a
#3: Nov 22 '05

re: Example of mssql_connect that works with SQL Server 2005?


Chung Leong wrote:[color=blue]
> Try setting mssql.secure_connection in php.ini to on.
>[/color]
Thanks for the suggestion but, unfortunately, it made no difference.

-david-

Closed Thread