pdo_snowflake icon indicating copy to clipboard operation
pdo_snowflake copied to clipboard

pdo_snowflake.so works for CLI but not php-fpm

Open dtbarne opened this issue 3 years ago • 3 comments

Hello,

I've followed the steps in the readme and encountered a strange result. I was happy to see everything worked great when testing via the PHP CLI, but confused to find that php-fpm is unable to load the module. This is on Amazon Linux 2. We tried with both PHP 8.0 and PHP 7.4.

Here's [successful] output from the command line:

$ php -i | grep snowflake
/etc/php.d/20-pdo_snowflake.ini,
PDO drivers => snowflake, mysql, sqlite
pdo_snowflake
pdo_snowflake.cacert => /etc/php.d/snowflake-cacert.pem => /etc/php.d/snowflake-cacert.pem
pdo_snowflake.debug => no value => no value
pdo_snowflake.logdir => no value => no value
pdo_snowflake.loglevel => no value => no value

Here's error output from php-fpm:

[28-Sep-2021 00:57:16] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_snowflake.so' (tried: /usr/lib64/php/modules/pdo_snowflake.so (/usr/lib64/php/modules/pdo_snowflake.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE), /usr/lib64/php/modules/pdo_snowflake.so.so (/usr/lib64/php/modules/pdo_snowflake.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

phpinfo() confirms that the correct (same) ini file is in fact being loaded and the same php version is used, so I'm particularly confused. Some googling for the undefined symbol error suggested using g++ instead of gcc, but I already have g++ installed. I've tried building it for both php 7.4 and php 8.0 to no avail.

Thanks in advance for any help.

Dan

dtbarne avatar Sep 28 '21 01:09 dtbarne

Hello,

did you found the fix for that. I have now the same issue and cant find the solution .

ps-eugen-zukov avatar Apr 04 '22 16:04 ps-eugen-zukov

Snowflake has confirmed it's broken. The "fix" is to wait for them to fix it sadly.

jonnylink avatar Apr 04 '22 16:04 jonnylink

We ended up using the ODBC driver instead.

dtbarne avatar Apr 04 '22 17:04 dtbarne

To clean up and re-prioritize more pressing bugs and feature requests we are closing all issues older than 6 months as of April 1, 2023. If there are any issues or feature requests that you would like us to address, please create them according to the new templates we have created. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response.

sfc-gh-jtang avatar May 26 '23 05:05 sfc-gh-jtang