Re: Sample DSN for PEAR::DB usign mssql and freetds

From: Date: Wed, 13 Aug 2003 22:08:35 +0000
Subject: Re: Sample DSN for PEAR::DB usign mssql and freetds
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-7188@lists.php.net to get a copy of this message
Tony Bibbs wrote:
Ok, this is wierd. I can connect using mssql_connect and mssql_select_db but not with PEAR::DB. If you don't mind me asking, are you using ODBTP and/or FreeTDS with PEAR? If so what version of PEAR::DB? --Tony
I´m currently using FreeTDS, as I unfortunately lacked the time to try ODBTP yet, which is a great pity - as it offers so much more possibilites than FreeTDS. The CVS version of DB.php I´m using is: $Id: DB.php,v 1.15 2003/01/04 11:54:49 mj Exp $ ..mssql.php being: $Id: mssql.php,v 1.6 2003/01/21 18:11:57 fmk Exp $ I don´t really know the actual PEAR package version. I´m leaving the fullquote below as-is, because I forgot to CC the list in my previous mail ... this way it´ll at least end up in the archives ;-) CU Markus
Markus Wolff wrote:
Tony Bibbs wrote:
Can someone get me a sample DSN (that works) of PEAR::DB connecting to a SQL Server 2000 box using freetds? I am having problems: PHP compiled: --with-mssql=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib freetds.conf has an entry for my server called [MyServer2000] that I can connect to using tsql just fine. When I connect via PEAR::DB I get connection failed errors.
mssql://myUser:myPW@ServerDefinition/myDatabase "ServerDefinition" is not actually the server address, but the name of the entry in the freetds.conf file that contains the info on the server you want to connect to. It usually looks like this: [ServerDefinition] host = 192.168.14.247 port = 1433 tds version = 7.0 This is a working entry for a MSSQL Server 2000. If anything else fails, try ODBTP instead of FreeTDS/MSSQL extension. Should be way easier to install, more compatible and may even perform better. Regards, Markus


« previous php.pear.general (#7188) next »