extra-php-extensions icon indicating copy to clipboard operation
extra-php-extensions copied to clipboard

error odbc-snowflake-php-84 layer

Open AngularProUser opened this issue 1 year ago • 3 comments

Hello,

getting this error :

"odbc_connect(): SQL error: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed, SQL state IM004 in SQLConnect"

"bref/bref": "2.3.13", "bref/extra-php-extensions": "1.7.0",

runtime: php-84 layers:

  • ${bref-extra:odbc-snowflake-php-84}

This does not occur on versions php-83

AngularProUser avatar Jan 28 '25 16:01 AngularProUser

Hi,

Please error still occur using theses versions : "bref/bref": "2.4.1" "bref/extra-php-extensions": "1.7.1", "1.7.2"

AngularProUser avatar Apr 07 '25 07:04 AngularProUser

We have the same problem. I don't know if it is related to the same underlying cause as https://github.com/mkleehammer/pyodbc/issues/738#issuecomment-825219716. provided.al2 uses a glibc 2.26 and it comes with unixODBC 2.3.1. Snowflake does not seem to document which version of the driver they require so maybe there is something to confirm there... 🤔

Broken ${bref-extra:odbc-snowflake-php-82} "bref/bref": "2.4.4" "bref/extra-php-extensions": "1.8.3"

Works ${bref-extra:odbc-snowflake-php-82} "bref/bref": "2.4.4" "bref/extra-php-extensions": "1.2.6"

If we compare the versions between 1.2.6 and 1.7.0 (from @AngularProUser ) the only line that changed in the snowflake layer is this one: https://github.com/brefphp/extra-php-extensions/compare/1.2.6..1.7.0#diff-cf2ca12bf4226b1c5481b7b70ae7e4fa20860d39affc2ef7ee0138697797bd77R21

lracicot avatar May 21 '25 14:05 lracicot

I manually built and deployed an ODBC-Snowflake layer using the Dockerfile from:

https://github.com/brefphp/extra-php-extensions/blob/master/layers/odbc-snowflake/Dockerfile

I configured the following variables:

PHP_VERSION = 84 BREF_VERSION = 2 Using the Snowflake ODBC driver version 2.25.12 (downloaded from https://sfc-repo.snowflakecomputing.com/odbc/linux/2.25.12/snowflake_linux_x8664_odbc-2.25.12.tgz), everything works without errors.

However, when using a newer Snowflake ODBC driver (3.X.X, downloaded from https://sfc-repo.snowflakecomputing.com/odbc/linux/3.X.X/snowflake_linux_x8664_odbc-3.X.X.tgz), I encounter the following error on odbc_connect():

odbc_connect(): SQL error: [unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed, SQL state IM004 in SQLConnect

AngularProUser avatar Jun 20 '25 11:06 AngularProUser