[unixODBC-support] PHPand unixODBCinstallation help. Can'tcreateUserDSN.

Ryan Churches ryan.churches at gmail.com
Sun Apr 29 19:19:25 BST 2007


# isql -v gupta1 user
Segmentation fault

# isql -v gupta1 user password
[08001][unixODBC][Gupta][ODBC Driver][SQLBase]09268 GCI CCN Cannot connect
[ISQL]ERROR: Could not SQLConnect

You’re a genius ;)

I've never been so happy to be back to square 1.

I have one nagging question which this segues into nicely:  where can I put
a url to attempt to connect and be able to query the remote db?

P.S. Thanks so much for your help (on Sunday of all days). 

-----Original Message-----
From: unixodbc-support-bounces at easysoft.com
[mailto:unixodbc-support-bounces at easysoft.com] On Behalf Of Nick Gorham
Sent: Sunday, April 29, 2007 1:59 PM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] PHPand unixODBCinstallation help.
Can'tcreateUserDSN.

Ryan Churches wrote:

>Hi,
>Sorry, about that, I should have known to try that.
>
>(gdb) run -v gupta1
>The program being debugged has been started already.
>Start it from the beginning? (y or n) y
>Starting program: /usr/bin/isql -v gupta1
>shell-init: error retrieving current directory: getcwd: cannot access
parent
>directories: No such file or directory
>[Thread debugging using libthread_db enabled]
>[New Thread -1211414864 (LWP 5547)]
>
>Program received signal SIGSEGV, Segmentation fault.
>[Switching to Thread -1211414864 (LWP 5547)]
>0xb7d625c3 in strlen () from /lib/libc.so.6
>(gdb) back
>#0  0xb7d625c3 in strlen () from /lib/libc.so.6
>#1  0xb7c2855c in SQLConnect () from
/opt/Gupta/SQLBase901/libsqlbaseodbc.so
>#2  0xb7e71262 in SQLConnect (connection_handle=0x804fb40,
>    server_name=0xbfe4c1d2 "gupta1", name_length1=-3, user_name=0x0,
>    name_length2=-3, authentication=0x0, name_length3=-3) at
>SQLConnect.c:3856
>#3  0x080496cd in OpenDatabase (phEnv=0x804c1e0, phDbc=0x804c1e4,
>    szDSN=0xbfe4c1d2 "gupta1", szUID=0x0, szPWD=0x0) at isql.c:271
>#4  0x0804912f in main (argc=3, argv=0xbfe4acf4) at isql.c:133
>(gdb)
>
>Name length = -3!  That can't be right.   
>  
>
Yes it can, SQL_NTS = -3, thats to tell the API that the string is null 
terminated.

Not sure what to suggest now, looks like its failing in the driver, 
maybe it doesn't expect a empty user name, and or password (its a bug if 
it doesn't, but anyway).

Try

isql -v gupta1 user password

and see if the same happens. If it does I think its a question for the 
driver writers.

One posibility, maybe the driver doesn't know about unixODBC, and is 
reading its own ini files, try setting the env variable ODBCINI to the 
location of your odbc.ini file

export ODCBINI=/etc/odbc.ini
isql -v gupta1

-- 
Nick
_______________________________________________
unixODBC-support mailing list
unixODBC-support at easysoft.com
http://mail.easysoft.com/mailman/listinfo/unixodbc-support

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.2/780 - Release Date: 4/29/2007
6:30 AM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.6.2/780 - Release Date: 4/29/2007
6:30 AM
 




More information about the unixODBC-support mailing list