[unixODBC-support] unixodbc + samba + php + access mdb files

inittab inispam at gmail.com
Sun Aug 1 11:25:55 BST 2010


I've tried running the php script from the command line, also www-data
has no issues seeing the file and getting information from it (when i
mount it so that uid can access it, i was doing testing as root to
rule out any permissions issues).

Also I was unaware that the php odbc module was the one doing the
actual file access, I assumed unixodbc was the middleman between the
mdb database and the php module, I will look into that.



On Sun, Aug 1, 2010 at 5:47 AM, Nick Gorham <nick at lurcher.org> wrote:
> inittab wrote:
>>
>> Hello, I'm attempting to access an access database via php with a
>> unixodbc connection.
>>
>> if I copy the mdb database over to the local filesystem I have no
>> issues and can query the database fine. But if I try to access it over
>> my samba mounted directory I get the following error:
>>
>> Can't alloc filename
>> Unable to locate database /mnt/netops/20101.mdb
>>
>>
>> /mnt/netops was mounted with the following command:
>> mount -t cifs -o username=XXXXXXXXX,password=XXXXXXXX
>> //10.2.1.XX/NetOps /mnt/netops
>>
>> I can read files off of the share fine, and can copy the database off
>> but it seems unixodbc cannot access the file.
>>
>> root at laptop:~# file /mnt/netops/20101.mdb
>> /mnt/netops/20101.mdb: Microsoft Access Database
>>
>>
>> /etc/odbc.ini:
>> [NetOps]
>> Description = Netops Database
>> Driver = MDBToolsODBC
>> Database = /mnt/netops/20101.mdb
>> Servername = localhost
>> UserName =
>> Password =
>> port = 5432
>>
>> I am using the mdbtools driver:
>> [MDBToolsODBC]
>> Description = MDB Tools ODBC drivers
>> Driver = /usr/lib/libmdbodbc.so.0
>> Driver64 =
>> Setup =
>> Setup64 =
>> UsageCount = 1
>> CPTimeout =
>> CPReuse =
>>
>>
>>
>>
>
> Hi,
>
> I would check if the user apache is running as can access the mount. Other
> than that I would ask the driver folk, its the driver that accesses the
> files not unixODBC
>
> --
> Nick
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>


More information about the unixODBC-support mailing list