Connecting Tech Pros Worldwide Help | Site Map

Example of mssql_connect that works with SQL Server 2005?

  #1  
Old November 22nd, 2005, 12:05 AM
David Haynes
Guest
 
Posts: n/a
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-

  #2  
Old November 22nd, 2005, 12:05 AM
Chung Leong
Guest
 
Posts: n/a

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


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

  #3  
Old November 22nd, 2005, 12:05 AM
David Haynes
Guest
 
Posts: n/a

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