[unixODBC-support] PHPand unixODBCinstallation help. Can'tcreateUser DSN.

Nick Gorham nick.gorham at easysoft.com
Sun Apr 29 18:59:18 BST 2007

Ryan Churches wrote:

>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
>#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
>Name length = -3!  That can't be right.   
Yes it can, SQL_NTS = -3, thats to tell the API that the string is null 

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).


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


More information about the unixODBC-support mailing list