In RHEL 6 I have installed PHP 7.2 via remi repository:
# yum --enablerepo=remi-php72 install php
Checked which modules are preinstalled with php -m
. It is not listed. So I proceed to install it:
# yum --enablerepo=remi-php72 php72-php-oci8
Installed:
php72-php-oci8.x86_64 0:7.2.17-1.el6.remi
Complete!
Check modules again and oci8 not yet loaded. In order to test if it fails with all modules I tried with mbstring
(not installed by default):
# yum --enablerepo=remi-php72 install php-mbstring
Installed:
php-mbstring.x86_64 0:7.2.17-1.el6.remi
Complete!
If I do php -m
mbstring successfully listed there. Am I missing something with oci8
? Thank you in advance.
Update
I have added the extension into php.ini file with extension=oci8
. Then I did php -m
:
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.18.1: cannot open shared object file: No such file or directory)) in Unknown on line 0
Looks like php can not find libclntsh.so.18.1
library from Oracle client. So I decided to check the oracle's home lib to take look:
# ls -l libclntsh*
lrwxrwxrwx. 1 oracle oinstall 61 Mar 26 16:20 libclntsh.so -> /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
lrwxrwxrwx. 1 oracle oinstall 56 Mar 26 16:19 libclntsh.so.10.1 -> /u01/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so
-rwxr-xr-x. 1 oracle oinstall 47251283 Mar 26 16:20 libclntsh.so.11.1
What I am thinking is that the oci8 extension is trying to load this library for 18c oracle version while my current client is 11g. No idea on how to solve it.