I have installed the datastax cassandra driver extension for PHP using the following process:
- Installed Dependencies: automake cmake gcc gcc-c++ git libtool openssl-devel wget gmp gmp-devel boost php-devel pcre-devel git libuv gmp
- Installed cpp-driver by compiling from the source
- Installed PHP Datastax cassandra driver from the source
- Added extension in the /etc/php.ini file
When I try to execute the php file to connect to the cassandra cluster, I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/cassandra.so'
- /usr/lib64/php/modules/cassandra.so: undefined symbol: cass_cluster_set_whitelist_dc_filtering in Unknown on line 0
I have tried to install again using the binaries instead and I am still facing the same issue.
Here is the ldd output:
ldd /usr/lib64/php/modules/cassandra.so
linux-vdso.so.1 => (0x00007ffe9ad9a000)
libgmp.so.3 => /usr/lib64/libgmp.so.3 (0x00007f2377ca2000)
libssl.so.10 => /usr/lib64/libssl.so.10 (0x00007f2377a35000)
libz.so.1 => /lib64/libz.so.1 (0x00007f237781f000)
libuv.so.1 => /usr/lib64/libuv.so.1 (0x00007f23775fe000)
librt.so.1 => /lib64/librt.so.1 (0x00007f23773f5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f23771d8000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f2376fbf000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f2376dba000)
libm.so.6 => /lib64/libm.so.6 (0x00007f2376b36000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f2376830000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f2376619000)
libc.so.6 => /lib64/libc.so.6 (0x00007f2376285000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f2376041000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f2375d59000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f2375b55000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f2375929000)
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f2375544000)
/lib64/ld-linux-x86-64.so.2 (0x00000030d4a00000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f2375339000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f2375135000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f2374f1b000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f2374cfb000)
Thanks for your help.