Allowed memory size exhausted with odbc_exec libmdb mdbtools

 ̄綄美尐妖づ 提交于 2020-01-06 06:19:07

问题


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!

来源:https://stackoverflow.com/questions/53498682/allowed-memory-size-exhausted-with-odbc-exec-libmdb-mdbtools

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!