[nycphp-talk] PHP and MSSQL 7
csnyder
chsnyder at gmail.com
Mon Dec 20 15:17:04 EST 2004
Joseph Crawford wrote:
> added a server to my freetds.conf file which was found in /etc/ and
> then i restarted apache, i changed my mssql_connect to look like this
>
> $link = mssql_connect("MyServer70", $dbinfo['user'], $dbinfo['pass']);
>
That's the way to do it... make sure you have
putenv("FREETDSCONF=/etc/freetds.conf"); at the start of your script.
I find that debugging MSSQL server connections is a huge PITA -- once
you get the hostname right, you may struggle for a while figuring out
how to correctly specify the username. And lord help ya if you're
using a second or third MSSQL instance on the same server -- what port
is *that*?
Every time I go through this I remember why I never used to support
Microsoft servers.
More information about the talk
mailing list