Allowed memory size exhausted with odbc_exec libmd

2019-08-17 13:13发布

I want to connect to my MS Access Database via PHP (7.2.10), SLE 12.3. For this I'm using the libmdbodbc.so.1 driver which comes with package libmdbodbc1 0.7-3.1 (Source: mdbtools-0.7-3.1). Setup is done in unixODBC config: /etc/unixODBC/odbcinst.ini.

[MdbToolsOdbc]
Description = MDBTools ODBC Driver
Driver = libmdbodbc.so.1
Setup = libmdbodbc.so.1

The connection to the database and getting data via commandline (isql) is possible and does not return error.

But when I'm trying to execute a SQL query via PHP (connection done via: odbc_connect(Driver=MdbToolsOdbc;DBQ=%s, null, null);)

odbc_exec($connection, "SELECT id FROM table");

I got an error "Allowed memory size of 2097152 bytes exhausted (tried to allocate 140 Tbytes)".

The issue is still mentioned here:

https://github.com/brianb/mdbtools/issues/99

https://bugs.php.net/bug.php?id=75013&thanks=3

Does anybody know a solution or workaround for the issue?

Would be nice to get some response!

Thank you and best!

标签: php mdbtools
0条回答
登录 后发表回答