[unixODBC-support] probelsm getting unixODBC to access an MS Access database on Linux

Martin J. Evans martin at easysoft.com
Fri Sep 10 12:03:27 BST 2004


On 10-Sep-2004 Gavin Simpson wrote:
> 
> Hi Martin,
> 
> Cheers for the response. I tried what you suggested and I can get isql 
> to connect to the database if I have the .odbc.ini file in my home 
> directory but only if there isn't one in /etc as well. This in the end 
> doesn't help me as I need PHP to find the dsn.
> 
> Thanks for you help,
> 
> Gavin

If mdbtools does not look at /etc (which it did not look like it from your
strace) and you need to use it under php then all I can suggest is you put
.odbc.ini in the home account of the user your Apache/PHP is running as.

Sounds like you ought to contact the mdbtools people.

Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development

> Martin J. Evans wrote:
>> open("/usr/lib/libmdbodbc.so.0", O_RDONLY) = 3
>> suggests unixODBC found the DSN, got the driver name, located the driver in
>> odbcinst.ini and loaded it.
>> 
>> open("/home/gavin/.odbc.ini", O_RDONLY) = 3
>> fstat64(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
>> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
>> 0) = 0xf6de3000
>> read(3, "", 4096)                       = 0
>> write(2, "Couldn\'t find DSN /home/gavin/.o"..., 53Couldn't find DSN 
>> /home/gavin/.odbc.ini in gblakesdb
>> ) = 53
>> 
>> suggests mdbtools only looks for DSNs in $HOME/.odbc.ini.
>> Move your gblakesdb entry into $HOME/.odbc.ini and try again.
>> 
>> Martin




More information about the unixODBC-support mailing list