1 (edited by adamsj 2022-12-06 21:03:49)

Topic: PHP Startup: Unable to load dynamic library

Hi, folks,

     I have a problem related to this: https://forum.remirepo.net/viewtopic.php?id=3409 .

     I'm trying to upgrade an old RHEL 6 server (I know, I know) to Apache 2.4.54 (easy) and php5.6.40 (not so easy). My problem is this: Once I've installed the 5.6.40 modules, the oci8.so and pdo_oci.so objects only look for libclntsh.so.18 . I've got instantclient packages with 12 and 19, but not for 18. Is there a way to tell php to downgrade to 12?

     Here's the actual error message:

PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php56/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

Thanks,

     John A

Re: PHP Startup: Unable to load dynamic library

>  I'm trying to upgrade an old RHEL 6 server

Sorry, can't really help on EOL things

> My problem is this: Once I've installed the 5.6.40 modules, the oci8.so and pdo_oci.so objects only look for libclntsh.so.18

Indeed

You need instantclient v18, nothing else

> Is there a way to tell php to downgrade to 12?

Sorry, no

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

3 (edited by adamsj 2022-12-07 19:36:07)

Re: PHP Startup: Unable to load dynamic library

That's actually quite helpful. I know that I've got the right version of Instantclient installed now. I just don't get why these errors keep popping up when I invoke php:

[07-Dec-2022 13:28:17 America/Chicago] PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php56/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
[07-Dec-2022 13:28:17 America/Chicago] PHP Warning:  PHP Startup: Unable to load dynamic library '/opt/remi/php56/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

I've done what I know to do: I've set my PATH, I've set php_ini and php_bin for pecl and pear, I've uninstalled and installed oci8-2.0.12, I've verified that the install is finding libclntsh.so.18.1: "checking Oracle Instant Client directory... /usr/lib/oracle/18.5/client64/lib"

But I'm missing something.

Re: PHP Startup: Unable to load dynamic library

You forgot to set the runtime path of the library, see
https://blog.remirepo.net/post/2020/05/ … ns-for-PHP


P.S. notice with version 21 (used in newer builds), runtime path is set by the Oracle RPM
with 18 you have to follow the "manual" way

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: PHP Startup: Unable to load dynamic library

And all is well. Thank you for the help!