Skip to Content.
Sympa Menu

freetds - New to tds - need some assistance

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Dave Kramer" <dave AT fabco.com>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: New to tds - need some assistance
  • Date: Mon, 4 Nov 2002 09:27:21 -0500


Attempting to connect to SQL 2000, running on a linux test box
Apache/2.0.43 (Unix) PHP/4.2.3. tsql works, PHP & apache work,
PHP configured with:
'./configure' '--prefix=/www/php' '--with-apxs2=/www/bin/apxs'
'--with-config-file-path=/www/php' '--with-mysql'
'--with-sybase=/usr/local/freetds'

try to access the database with the following script:

<?php
$hostname = "jokeysmurf";
$username = "johann";
$password = "johann";

$iD = mssql_connect($hostname,$username,$password);
mssql_select_db("train");
$oResult = mssql_query( "Select * from instructor");
while( $oRow = mssql_fetch_array ($oResult))
{
$oColumn1 = $oRow[ "instructor"];
$oColumn2 = $oRow[ "last_name"];
echo("Column1: $oColumn1 column2: $oColumn2<br>\n");
}
mssql_close( $iID);
?>

which returns:

Warning: Sybase message: Login failed for user '(null)'. Reason: Not
associated with a trusted SQL Server connection. (severity 14) in
/www/htdocs/freetds.php on line 9

Warning: Sybase: A link to the server could not be established in
/www/htdocs/freetds.php on line 9

Warning: -1 is not a Sybase link index in /www/htdocs/freetds.php on line
11

Warning: 0 is not a Sybase result index in /www/htdocs/freetds.php on line
13

Warning: 0 is not a Sybase link index in /www/htdocs/freetds.php on line
25

In the config log:
2002-11-01 16:50:11.222760 Attempting to read conf files.
2002-11-01 16:50:11.222984 Found conf file '/usr/local/freetds/etc' (from
$FREE$
2002-11-01 16:50:11.223087 Looking for section global.
2002-11-01 16:50:11.223229 Looking for section sybase.
2002-11-01 16:50:11.223326 ...'SYBASE' not found.
2002-11-01 16:50:11.223502 Found conf file
'/usr/local/freetds/etc/freetds.conf$
2002-11-01 16:50:11.223621 Looking for section global.
2002-11-01 16:50:11.223862 ... Found section global.
2002-11-01 16:50:11.223958 Got a match.
2002-11-01 16:50:11.224053 option = 'tds version' value = '7.0'.
2002-11-01 16:50:11.224158 option = 'initial block size' value = '512'.
2002-11-01 16:50:11.224263 option = 'swap broken dates' value = 'no'.
2002-11-01 16:50:11.224352 no is a 'no/off/false'.
2002-11-01 16:50:11.224449 option = 'swap broken money' value = 'no'.
2002-11-01 16:50:11.224540 UNRECOGNIZED option 'swap broken
money'...ignoring.
2002-11-01 16:50:11.224647 option = 'try server login' value = 'yes'.
2002-11-01 16:50:11.224733 yes is a 'yes/on/true'.
2002-11-01 16:50:11.224828 option = 'try domain login' value = 'no'.
2002-11-01 16:50:11.224915 no is a 'no/off/false'.
2002-11-01 16:50:11.225021 option = 'cross domain login' value = 'no'.
2002-11-01 16:50:11.225109 UNRECOGNIZED option 'cross domain
login'...ignoring.
2002-11-01 16:50:11.225230 option = 'text size' value = '64512'.
2002-11-01 16:50:11.225372 ... Found section bob.
2002-11-01 16:50:11.225516 ... Found section sybase.
2002-11-01 16:50:11.225708 Looking for section sybase.
2002-11-01 16:50:11.225896 ... Found section global.
2002-11-01 16:50:11.226155 ... Found section bob.
2002-11-01 16:50:11.226299 ... Found section sybase.
2002-11-01 16:50:11.226384 Got a match.
2002-11-01 16:50:11.226562 Found host entry 10.3.128.47.
2002-11-01 16:50:11.228352 IP addr is 10.3.128.47.
2002-11-01 16:50:11.228461 option = 'port' value = '1433'.
2002-11-01 16:50:11.228564 option = 'tds version' value = '7.0'.
2002-11-01 16:50:11.228666 option = 'try domain login' value = 'yes'.
2002-11-01 16:50:11.228754 yes is a 'yes/on/true'.
2002-11-01 16:50:11.228851 option = 'try server login' value = 'no'.
2002-11-01 16:50:11.228937 no is a 'no/off/false'.
2002-11-01 16:50:11.229033 option = 'nt domain' value = 'NTDOMAIN'.
2002-11-01 16:50:11.229147 ...Success.
2002-11-01 16:50:11.229270 Setting 'tdsver' to 7.0 from $TDSVER.
2002-11-01 16:50:11.229368 Setting 'dump_file' to
'/www/htdocs/freetds.log' fro$

In the session log, there is an error 'login failed for user (null)'

It almost(?) looks like the parameters in the mssql_connect call aren't
being passed. Guessing I've missed something blindingly obvious.





  • New to tds - need some assistance, Dave Kramer, 11/04/2002

Archive powered by MHonArc 2.6.24.

Top of Page