odbc_prepare gives Fatal error: Allowed memory size exhausted

三世轮回 提交于 2019-12-01 23:43:14

This is a duplicate of #21286589. Just because you do not have a NULL value doesn't mean you won't run in to problems when using a mis-matched ABI.

The problem here is that the old driver only sets 32-bits of the 64-bit indicator value and PHP reads the whole 64-bits. Here PHP sees the value 140707423584261, which is 0x7FF900000005 in hex. You can see the last 4 bytes are 0x00000005 which is 5 and should be the length of the actual data returned. The rest of it is garbage because the driver did not change those bytes.

As I mentioned in my answer for Linux odbc Fatal error: Allowed memory size, you will need to get the new ODBC driver from the IBM i Access Client Solutions Linux Application Package. This driver follows the full 64-bit ABI that unixODBC has used since 2.2.14. The new driver package also contains Debian .deb packages, so pretty much all the steps in the blog you referenced are no longer needed.

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