seg fault unixODBC

2002-12-03 Thread Matthew Bartholomew
Not sure what to do from here...any advice would be great.  Thanks...
-Matt

[root@ns3 root]# isql -v
Segmentation fault
[root@ns3 build]# isql -b
Segmentation fault
[root@ns3 build]# isql -c
Segmentation fault
[root@ns3 build]# isql -w
Segmentation fault
[root@ns3 build]# isql -mn
Segmentation fault
.you get the idea...isql seg faults on most every command. --version is
the only one that doesn't seg fault.  I upgrade to unixODBC 2.2.2 in hopes
of fixing this, but no avail.  

Also, I've tried to recompile DBD::ODBC but make test fails...probably
because unixodbc is seg faulting when called (see below for that error..and
it should be noted that I removed the s from the makefile).


Here is what I am running:
RedHat 7.2 kernel 2.4.7-10
perl 5.8
unixODBC-2.2.2-3
freetds-0.60-1
glibc-2.2.93-5
DBD::ODBC 0.43

DBI is up to date (Database was generated on Mon, 02 Dec 2002 11:54:12 GMT 
--- I don't know the version #)

ODBCHOME=/usr
and the correct DSN settings are in my environment


-- odbcinst.ini --
[SQL]
Description = v0.52 with protocol v4.2
Driver  = /usr/lib/libtdsodbc.so
FileUsage   = 2

[TXT]
Description = Text file driver
Driver  = /usr/lib/libodbctxt.so
Setup   = /usr/lib/libodbctxtS.so
FileUsage   = 2

[PostgreSQL]
Description = PostgreSQL driver
Driver  = /usr/lib/libodbpsql.so
Setup   = /usr/lib/libodbpsqlS.so
FileUsage   = 2
--



[root@ns3 DBD-ODBC-0.43]#   make test TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/local/bin/perl -MExtUtils::Command::MM -e
test_harness(1, 'blib/lib', 'blib/arch') t/*.t
t/01base..1..5
ok 1
ok 2
ok 3
ok 4
ok 5
ok
t/02simple1..17
ok 1
 Test 2: connecting to the database
dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 2-17
Failed 16/17 tests, 5.88% okay
t/03dbatt.1..9
ok 1
dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 2-9
Failed 8/9 tests, 11.11% okay
t/05meth..1..6
ok 1
dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 2-6
Failed 5/6 tests, 16.67% okay
t/07bind..1..9
ok 1
 Test 2: connecting to the database
dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 2-9
Failed 8/9 tests, 11.11% okay
t/08bind2.dubious
Test returned status 0 (wstat 11, 0xb)
t/09multi.dubious
Test returned status 0 (wstat 11, 0xb)
Failed Test  Stat Wstat Total Fail  Failed  List of Failed

---
t/02simple.t01117   16  94.12%  2-17
t/03dbatt.t 011 98  88.89%  2-9
t/05meth.t  011 65  83.33%  2-6
t/07bind.t  011 98  88.89%  2-9
t/08bind2.t 011??   ??   %  ??
t/09multi.t 011??   ??   %  ??
Failed 6/7 test scripts, 14.29% okay. 37/46 subtests failed, 19.57% okay.
make: *** [test_dynamic] Error 2

 




RE: seg fault unixODBC

2002-12-03 Thread Matthew Bartholomew
Nick...this is what I get:

[root@ns3 DBD-ODBC-0.43]# isql -v wibble
[unixODBC][Driver Manager]Data source name not found, and no default driver
specified
[ISQL]ERROR: Could not SQLConnect


I tried to used ODBCconfig to get connected to anything at this point,
postgres or tds but ODBCconfig seg faults when installing the DSN.  

Matt

-Original Message-
From: Nick Gorham [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 12:09 PM
To: Matthew Bartholomew
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]';
'[EMAIL PROTECTED]'
Subject: Re: seg fault unixODBC

Matthew Bartholomew wrote:
 Not sure what to do from here...any advice would be great.  Thanks...
 -Matt
 
 [root@ns3 root]# isql -v
 Segmentation fault
 [root@ns3 build]# isql -b
 Segmentation fault
 [root@ns3 build]# isql -c
 Segmentation fault
 [root@ns3 build]# isql -w
 Segmentation fault
 [root@ns3 build]# isql -mn
 Segmentation fault
 .you get the idea...isql seg faults on most every command. --version
is
 the only one that doesn't seg fault.  I upgrade to unixODBC 2.2.2 in hopes
 of fixing this, but no avail.  

Hi,

Try isql -v wibble

You should get a DSN not found error.

If you still get a seg fault, try running under GDB and see what happens.

If you can connect to postgres and not freetds, I would ask on the 
freetds lists as its probably a freetds issue. If you can't connect to 
postgres, and still get the segfault, ask me as its a unixODBC problem.

I would guess its not  DBI, so I will send this the those lists (just so 
they know its been answered), but you may as well trim any other answer 
to a smaller number of lists.

-- 
Nick Gorham
Easysoft Limited http://www.easysoft.com



RE: unixODBC

2002-12-03 Thread Matthew Bartholomew
Hello again,

I was able to connect to mysql via isql (I'm having a difficult time with
postgresql).  Do you think that puts unixODBC in the clear and I should look
around at other packages as the perpetrators of this seg fault?  Or does
postgresql hold a significance that I'm not getting? 

Since then, I've re-installed freetds 0.60 and the Sybase 11.9.2-1 family of
rpms, but same results:

[root@ns3 sybase]# isql SQL -v wibble
Segmentation fault 

Cheers,
Matt


-Original Message-
From: Nick Gorham [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: unixODBC

Hi,

I would try isql first, there are several reasons you may get a seg 
fault in ODBCConfig all you need is mismatched QT libs.

Try and get a postgres connection working.

Nick



RE: unixODBC and isql seg fault

2002-12-03 Thread Matthew Bartholomew
Thanks for the help Nick...

If anyone from the freetds arena can add some guidance...that would be
wonderful.

Here is one last odd quirk that I haven't mentionedI am able to connect
to the MS SQL 2k server and query without issue via php 4.2.2!  The seg
fault occurs when running isql from a bash shell and any perl scripts that
use DBI-connect(DBI:ODBC:DSN,'USERname', 'PASS')


Per Nick Gorham, here are my gdb results:
---
(gdb) r -v SQL
Starting program: /usr/bin/isql -v SQL
[New Thread 8192 (LWP 14857)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 8192 (LWP 14857)]
0x4007b8df in uodbc_get_stats () from /usr/lib/libodbc.so.1
(gdb) quit
---

I have no idea what the above message means, so if anyone can shed some
light...I would appreciate it.  

For users on the Freetds list, please see the bottom of this email for the
start of this email thread.  The issue is a basic seg fault when using isql
to connect to a MS SQL 2k server.  I have freetds0.60, unixODBC 2.2.2-3, and
Sybase 11.9 family of rpms installed on a redhat 7.2 linux.  Using perl
5.8.0 with DBI and DBD::ODBC (most up to date versions that cpan will allow
on 12/03/02).

It should be noted that I have another linux box talking with a MS SQL 2K
server using freetds-0.53-1, unixODBC-2.1.1-1, perl-5.6.1-26.72.3.  That
configuration works flawlessly...so others may want to wait a bit longer
until they upgrade to those packages.

Thanks,
Matt


 Hello again,
 
 I was able to connect to mysql via isql (I'm having a difficult time 
 with postgresql).  Do you think that puts unixODBC in the clear and I 
 should look around at other packages as the perpetrators of this seg 
 fault?  Or does postgresql hold a significance that I'm not getting?

No, its going to be a freetds thing I suspect. I would try running isql 
under gdb

gdb isql
r -v dsnname

and see where it fails

I would try asking on the freetds lists.

BTW. I have snipped the reply to list.

Nick



-Original Message-
From: Matthew Bartholomew 
Sent: Tuesday, December 03, 2002 4:23 PM
To: 'Nick Gorham'
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]';
'[EMAIL PROTECTED]'
Subject: RE: unixODBC

Hello again,

I was able to connect to mysql via isql (I'm having a difficult time with
postgresql).  Do you think that puts unixODBC in the clear and I should look
around at other packages as the perpetrators of this seg fault?  Or does
postgresql hold a significance that I'm not getting? 

Since then, I've re-installed freetds 0.60 and the Sybase 11.9.2-1 family of
rpms, but same results:

[root@ns3 sybase]# isql SQL -v wibble
Segmentation fault 

Cheers,
Matt


-Original Message-
From: Nick Gorham [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 03, 2002 2:27 PM
To: [EMAIL PROTECTED]
Subject: unixODBC

Hi,

I would try isql first, there are several reasons you may get a seg 
fault in ODBCConfig all you need is mismatched QT libs.

Try and get a postgres connection working.

Nick



---

For those on the freetds list...here is the start of this thread:

From: Matthew Bartholomew 
Sent: Tuesday, December 03, 2002 4:23 PM
To: 'Nick Gorham'
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]';
'[EMAIL PROTECTED]'
Subject: RE: unixODBC


Not sure what to do from here...any advice would be great.  Thanks...
-Matt

[root@ns3 root]# isql -v
Segmentation fault
[root@ns3 build]# isql -b
Segmentation fault
[root@ns3 build]# isql -c
Segmentation fault
[root@ns3 build]# isql -w
Segmentation fault
[root@ns3 build]# isql -mn
Segmentation fault
.you get the idea...isql seg faults on most every command. --version is
the only one that doesn't seg fault.  I upgrade to unixODBC 2.2.2 in hopes
of fixing this, but no avail.  

Also, I've tried to recompile DBD::ODBC but make test fails...probably
because unixodbc is seg faulting when called (see below for that error..and
it should be noted that I removed the s from the makefile).


Here is what I am running:
RedHat 7.2 kernel 2.4.7-10
perl 5.8
unixODBC-2.2.2-3
freetds-0.60-1
glibc-2.2.93-5
DBD::ODBC 0.43

DBI is up to date (Database was generated on Mon, 02 Dec 2002 11:54:12 GMT 
--- I don't know the version #)

ODBCHOME=/usr
and the correct DSN settings are in my environment


-- odbcinst.ini --
[SQL]
Description = v0.52 with protocol v4.2
Driver  = /usr/lib/libtdsodbc.so
FileUsage   = 2

[TXT]
Description = Text file driver
Driver  = /usr/lib/libodbctxt.so
Setup   = /usr/lib/libodbctxtS.so
FileUsage   = 2

[PostgreSQL]
Description = PostgreSQL driver
Driver  = /usr/lib/libodbpsql.so
Setup   = /usr/lib/libodbpsqlS.so
FileUsage   = 2
--



[root@ns3 DBD-ODBC-0.43]#   make test TEST_VERBOSE=1
PERL_DL_NONLAZY=1 /usr/local/bin/perl

RE: unixODBC and DBD::ODBC fails to connect

2002-09-26 Thread Matthew Bartholomew

I've changed the ownership of odbc.ini and odbcinst.ini to my www user, but
to no avail.  I also have freetds logging all error messages, but nothing is
logged to the freetds file when this cgi file is run.  When I run isql,
freetds logs that transaction with no problem.  

BTW, here are the version numbers that I'm running:
Freetds .60
UnixODBC 2.1.1-1
DBD::ODBC  0.43


DBI-connect(SQL) failed: [unixODBC]tds_connect failed (SQL-08001)(DBD:
db_login/SQLConnect err=-1) at cgiscript.cgi line 100
Connecting : [unixODBC]tds_connect failed (SQL-08001)(DBD:
db_login/SQLConnect err=-1) at cgiscript.cgi line 100.



-Original Message-
From: Jeff Urlwin [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, September 26, 2002 9:54 AM
To: Matthew Bartholomew; [EMAIL PROTECTED]
Subject: RE: unixODBC and DBD::ODBC fails to connect

Make sure the permissions of the web server user allow access to the drives,
ini files, etc.  I don't know much more abot freeTDS, though, so I'd
probably start there to find out what caused the error.

Also, since you don't say which version of DBD::ODBC you are using, I know
there were some connect fixes which allowed showing better error messages in
the latest versions of DBD::ODBC.

Also, a quick fix may be to change FreeTDS's LogError in odbc.c to log to a
file the specific error messages.  You could hack it in quickly and take it
out when the problem is resolved.

Regards,

Jeff



 I'm sure I'm overlooking something really simple, but I can't find any
 documentation to help troubleshoot my problem.

 When running a cgi script that uses DBI and the DBD::ODBC pm,
 this is error
 message is deposited into my www error logs.

 DBI-connect(SQL) failed: [unixODBC]tds_connect failed (SQL-08001)(DBD:
 db_login/SQLConnect err=-1) at /cgiscript.cgi line 100
 Connecting : [unixODBC]tds_connect failed (SQL-08001)(DBD:
 db_login/SQLConnect err=-1) at /cgiscript.cgi line 100.


 Here are my specs:  RedHat 7.2 unixODBC, Freetds, and DBD::ODBC

 As you can see below, I am able to connect to the database using the isql
 command.

 [root@server root]# isql SQL USER PASS
 +---+
 | Connected!|
 |   |
 | sql-statement |
 | help [tablename]  |
 | quit  |
 |   |
 +---+
 #


 Here's a sample of my code:
  $dbh = DBI-connect(dbi:ODBC:SQL, $user, $passwd) or die
 Connecting : $DBI::errstr\n ;
  $dbh-do(use $db) or die $dbh-errstr;



 Thanks for any suggestion and/or help!
 Matt Bartholomew





DBD::Sybase make test fails

2002-09-24 Thread Matthew Bartholomew

I'm having a difficult time getting DBD::Sybase to install on a Redhat 7.2
box.  I've installed sysbase ASE for the CT-lib and the make goes fine when
installing the DBD::Sybase perl module up until the make test is run.  Here
is where I get the following errors:
 
[root@localhost DBD-Sybase-0.94]# make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.6.1/i686-linux -I/usr/local/lib/perl5/5.6.1 -e 'use
Test::Harness qw(runtests $verbose); $verbose=0; runtests ARGV;' t/*.t
t/autocommitdubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/base..dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/exec..dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/fail..dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/login.dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/main..dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/nsql..dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/place.dubious
Test returned status 0.04296875 (wstat 11, 0xb)
t/xblob.dubious
Test returned status 0.04296875 (wstat 11, 0xb)
FAILED--9 test scripts could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2
 
 
It should be noted that I am trying to connect to a Windows 2000 SQL server
(I'm getting the feeling the Microsoft has changed something with this
release of SQL server which prevents connections via the Sybase module...is
this correct??  I hope not!) .  In regards to the error message, I'm not
sure what it is referencing.  I find the lack of documentation on the module
frustrating and to be honest, I can't believe that using perl to connect to
a MS SQL server is this difficult.  I had no problem connecting to the same
sql server via php.  If anyone has any experience with similar issues, or
can point me toward some decent documentation I would greatly appreciate it.