Topic: php 7.1.23 php-oci8 Unable to load dynamic library

Hi,
after upgrade from php 7.1.22-1.el7.remi  to php 7.1.23-1.el7.remi
package php71-php-oci8.x86_64 needs libclntsh.so.18.1 instead of libclntsh.so.12.1.

php71 -v:

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/oci8.so' - libclntsh.so.18.1: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/pdo_oci.so' - libclntsh.so.18.1: cannot open shared object file: No such file or directory in Unknown on line 0

ldd

    /opt/remi/php71/root/usr/lib64/php/modules/oci8.so
        linux-vdso.so.1 =>  (0x00007ffec85df000)
        libclntsh.so.18.1 => not found
        libc.so.6 => /lib64/libc.so.6 (0x00007f82427e8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8242dde000)





Due above I've install oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm and add file with path in /etc/ld.so.conf.d.

after this I'm getting:

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/oci8.so' - /usr/lib/oracle/12.1/client64/lib/libclntsh.so.18.1: undefined symbol: mql_setopt in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/pdo_oci.so' - /usr/lib/oracle/12.1/client64/lib/libclntsh.so.18.1: undefined symbol: mql_setopt in Unknown on line 0

Please help smile

Re: php 7.1.23 php-oci8 Unable to load dynamic library

> /usr/lib/oracle/12.1/client64/lib/libclntsh.so.18.1

This look stranges....
Shlould be /usr/lib/oracle/18.3/client64/lib/libclntsh.so.18.1

P.S. and BTW, I cannot reproduce... sad

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php 7.1.23 php-oci8 Unable to load dynamic library

$ rpm -qlp oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm 
/usr/lib/oracle/18.3/client64/bin/adrci
/usr/lib/oracle/18.3/client64/bin/genezi
/usr/lib/oracle/18.3/client64/lib/libclntsh.so.18.1
/usr/lib/oracle/18.3/client64/lib/libclntshcore.so.18.1
/usr/lib/oracle/18.3/client64/lib/libipc1.so
/usr/lib/oracle/18.3/client64/lib/libmql1.so
/usr/lib/oracle/18.3/client64/lib/libnnz18.so
/usr/lib/oracle/18.3/client64/lib/libocci.so.18.1
/usr/lib/oracle/18.3/client64/lib/libociei.so
/usr/lib/oracle/18.3/client64/lib/libocijdbc18.so
/usr/lib/oracle/18.3/client64/lib/libons.so
/usr/lib/oracle/18.3/client64/lib/liboramysql18.so
/usr/lib/oracle/18.3/client64/lib/network/admin/README
/usr/lib/oracle/18.3/client64/lib/ojdbc8.jar
/usr/lib/oracle/18.3/client64/lib/xstreams.jar
/usr/share/oracle/18.3/client64/doc/BASIC_README

So if you have copied the libclntsh.so.18.1 from 18.3 dir to 12.1 dir... it cannot work
You need to adjust your /etc/ld.so.conf.d file to the new location.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php 7.1.23 php-oci8 Unable to load dynamic library

Yes - my above listing was from testing scenario (copied libclntsh.so.18.1 from 18.3 dir to 12.1).
When I've proper  /etc/ld.so.conf.d
I'm getting:
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/oci8.so' - /usr/lib/oracle/18.3/client64/lib/libclntsh.so.18.1: undefined symbol: mql_setopt in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php71/root/usr/lib64/php/modules/pdo_oci.so' - /usr/lib/oracle/18.3/client64/lib/libclntsh.so.18.1: undefined symbol: mql_setopt in Unknown on line 0

Mayabe we should uninstall oracle-instantclient12.1-basic.x86_64 first? but what with php56 (we have php56 and php71):

ldd /opt/remi/php56/root/usr/lib64/php/modules/oci8.so

linux-vdso.so.1 =>  (0x00007ffeb0128000)
        libclntsh.so.12.1 => /usr/lib/oracle/12.1/client64/lib/libclntsh.so.12.1 (0x00007fc639db9000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fc6399ec000)
        libmql1.so => /usr/lib/oracle/12.1/client64/lib/libmql1.so (0x00007fc639776000)
        libipc1.so => /usr/lib/oracle/12.1/client64/lib/libipc1.so (0x00007fc6393f8000)
        libnnz12.so => /usr/lib/oracle/12.1/client64/lib/libnnz12.so (0x00007fc638cee000)
        libons.so => /usr/lib/oracle/12.1/client64/lib/libons.so (0x00007fc638aa9000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fc6388a5000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fc6385a3000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc638387000)
        libnsl.so.1 => /lib64/libnsl.so.1 (0x00007fc63816d000)
        librt.so.1 => /lib64/librt.so.1 (0x00007fc637f65000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fc63cf9f000)
        libaio.so.1 => /lib64/libaio.so.1 (0x00007fc637d63000)
        libclntshcore.so.12.1 => /usr/lib/oracle/12.1/client64/lib/libclntshcore.so.12.1 (0x00007fc6377f1000)

Re: php 7.1.23 php-oci8 Unable to load dynamic library

For now, you need to use 2 different values of LD_LIBRARY_PATH, one for each version

I will try to run soon a new build of 5.6 which will use 18.3 client library.
(ASAP, after upcoming RC versions... builder is really busy)

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php 7.1.23 php-oci8 Unable to load dynamic library

after uninstall oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
php71 works, php56 doesn't.
So after new compilation of php56 they both should work using: oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm ?
best regards

Re: php 7.1.23 php-oci8 Unable to load dynamic library

> So after new compilation of php56 they both should work using: oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm ?

Right.

New build, 5.6.38-2 are uploaded
Soon available on your mirror.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

8 (edited by darus 2018-10-24 13:38:37)

Re: php 7.1.23 php-oci8 Unable to load dynamic library

New build, 5.6.38-2 are uploaded
Soon available on your mirror.

Many thanks!!!
For now we can see only: php56-php-debuginfo.x86_64 0:5.6.38-2.el7.remi

Re: php 7.1.23 php-oci8 Unable to load dynamic library

Strange that your mirror synced the debuginfo and not the packages...

"yum clean all" ?

BTW, half of the mirrors are already synced... other will be soon, only have to be patient.

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test

Re: php 7.1.23 php-oci8 Unable to load dynamic library

Confirm - I see all new packages (5.6.38-2).
Made update, now it's all ok.
thanks!

Re: php 7.1.23 php-oci8 Unable to load dynamic library

smile

Desktop: Fedora 29 x86_64 + rpmfusion + remi-test + remi-dev
Laptop:  Fedora 28 x86_64 + rpmfusion + remi (SCL only)
Hosting Server: CentOS 6.10 x86_64 with EPEL, remi, remi-php72 and remi-php72-test