Bottled unixodbc version contains a bug in a library that causes php to crash when connecting to odbc data source using PDO.
The problem is inside ./configure script that detects proper shared library extension suffix.
Please see this bug report for detailed issue description: https://sourceforge.net/p/unixodbc/bugs/40/
Does it work when building from source?
Nope, because of ./configure script issue. The workaround for me was to replace
shrext_cmds='test .$module = .yes && echo .so || echo .dylib'
shrext_cmds=test .$module = .yes && echo .so || echo .dylib
inside ./configure, so maybe patch would be a solution?
test .$module = .yes && echo .so || echo .dylib
Has this been reported to the developers?
Yes, here is the original bug report https://sourceforge.net/p/unixodbc/bugs/40/
I don't think this is the correct fix. The code in question comes straight from libtool.m4. It seems it is supposed to be passed to eval first (this is what libtool itself does with it, grep for "shrext_cmds" in ltmain.sh in the root directory of the unixodbc source).
I'm not familiar with libtool and unixodbc build system, so I can't say what is the root cause of this problem. So there may be another better solution for this.
Emailed upstream to ask about applying Jack's fix.
I think this commit was intended to apply the fix outlined here but did not succeed.
Is this still an issue?
It looks like this is fixed in the 2.3.4 release.