Path: csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: John-Paul Stewart Newsgroups: comp.lang.php Subject: Re: PHP can't find shared library although it's right there Date: Tue, 25 May 2021 11:50:51 -0400 Lines: 29 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net 0/sdEszzp5ZmBoNtB5x4Igho2JTsS5LF1AEw2mD3m5XWqGOXei Cancel-Lock: sha1:ji++jB5XolUi3u1GrjWOWO5iR7I= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 In-Reply-To: Content-Language: en-CA Xref: csiph.com comp.lang.php:18633 On 2021-05-25 10:55 a.m., Robert Latest wrote: > Hello, > > I'm trying to install the oracle DB extension on this RHEL7 system but I can't > get it to work. The server says on startup: > > $ grep oci /var/log/httpd/error_log PHP Warning: PHP Startup: Unable to load > dynamic library 'oci8' (tried: /usr/lib64/php/modules/oci8 > (/usr/lib64/php/modules/oci8: cannot open shared object file: No such file or > directory), /usr/lib64/php/modules/oci8.so (libclntsh.so.21.1: cannot open > shared object file: No such file or directory)) in Unknown on line 0 > > But the file is right there: > > $ ls -l /usr/lib64/php/modules/oci8.so > -rwxr-xr-x. 1 root root 185832 May 4 14:13 /usr/lib64/php/modules/oci8.so First off, I'm not familiar with the oci8 module itself, so the following may not be entirely accurate: The error message seems to be showing that it is trying to load /usr/lib64/php/modules/oci8 and not finding it. Which is to be expected. Then it tries /usr/lib64/php/modules/oci8.so which it does find but cannot open because its dependency, libclntsh.so.21.1, is not found. What does 'ldd /usr/lib64/php/modules/oci8.so' show? Do you have libclntsh.so.21.1 installed somewhere on your system? If not you'll need to install it. If it is installed, then you'll need to set the library path to point to it, so that it can be found when needed.