Page 1 of 2
PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Thu Apr 25, 2019 8:44 am
by lexisnexis
Nagios XI: 5.5.2
A few weeks ago, the Linux server were patched and the OCI8 library is requiring libclntsh.so.18.1. I have upgraded the oracle-instant-client to 18.5 on the Linux server. Why is this message still showing up in Nagios XI?
Capture.PNG
[PHP Warning: PHP Startup: Unable to load dynamic library '/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 '/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]
Code: Select all
set | grep -i oracle
LD_LIBRARY_PATH=/usr/lib/oracle/18.5/client64/lib
ORACLE_HOME=/usr/lib/oracle/18.5/client64
TNS_ADMIN=/usr/lib/oracle/18.5/client64
Code: Select all
locate libclntsh.so.18.1
/usr/lib/oracle/18.5/client64/lib/libclntsh.so.18.1
Code: Select all
php -i | grep -i oci
/etc/php.d/20-oci8.ini,
/etc/php.d/30-pdo_oci.ini,
oci8
OCI8 Support => enabled
OCI8 DTrace Support => enabled
OCI8 Version => 2.0.12
oci8.connection_class => no value => no value
oci8.default_prefetch => 100 => 100
oci8.events => Off => Off
oci8.max_persistent => -1 => -1
oci8.old_oci_close_semantics => Off => Off
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
PDO drivers => dblib, mysql, oci, pgsql, sqlite
PDO_OCI
PDO Driver for OCI 8 and later => enabled
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Thu Apr 25, 2019 8:59 am
by lexisnexis
I forgot to add some information. The RPM used to install the upgrade of oracle-instantclient18.5: oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm
Code: Select all
Oracle instantclient on the server:
/usr/lib/oracle/12.1/client64
/usr/lib/oracle/18.5/client64/
[code]
[code]
grep error_report /etc/php.ini
; error_reporting
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING
; Eval the expression with current error_reporting(). Set to true if you want
; error_reporting(0) around the eval().
Code: Select all
cat /etc/sysconfig/httpd
#
# This file can be used to set additional environment variables for
# the httpd process, or pass additional options to the httpd
# executable.
#
# Note: With previous versions of httpd, the MPM could be changed by
# editing an "HTTPD" variable here. With the current version, that
# variable is now ignored. The MPM is a loadable module, and the
# choice of MPM can be changed by editing the configuration file
# /etc/httpd/conf.modules.d/00-mpm.conf.
#
#
# To pass additional options (for instance, -D definitions) to the
# httpd binary at startup, set OPTIONS here.
#
#OPTIONS=
#
# This setting ensures the httpd process is started in the "C" locale
# by default. (Some modules will not behave correctly if
# case-sensitive string comparisons are performed in a different
# locale.)
#
LANG=C
#LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri Apr 26, 2019 9:11 am
by tgriep
Did you install all 3 of the Oracle Instant Client packages?
Code: Select all
oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm
oracle-instantclient18.5-sqlplus-18.5.0.0.0-3.x86_64.rpm
oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm
What version of PHP is installed on the server and what repository did it come from?
Run the following and post it here.
Code: Select all
php -v
yum list installed |grep -i php
Did you upgrade the path for the commands in XI?
Code: Select all
/usr/bin/env LD_LIBRARY_PATH=/usr/lib/oracle/18.5/client64/lib ORACLE_HOME=/usr/lib/oracle/18.5/client64 $USER1$/check_oracle_health $ARG1$
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri Apr 26, 2019 11:40 am
by lexisnexis
Did you install all 3 of the Oracle Instant Client packages? No only installed Basic
What version of PHP is installed on the server and what repository did it come from?
Code: Select all
php -v
PHP 5.6.40 (cli) (built: Jan 9 2019 12:34:16)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
Code: Select all
yum list installed |grep -i php
php.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-ZendFramework.noarch 1.12.20-1.el7.remi @Frozen-LN-remi
php-ZendFramework-Db-Adapter-Pdo.noarch
php-ZendFramework-Db-Adapter-Pdo-Oci.noarch
php-bcmath.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-cli.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-common.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-devel.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-fedora-autoloader.noarch 1.0.0-1.el7.remi @Frozen-LN-remi
php-gd.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-ldap.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mbstring.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mcrypt.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mssql.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mysqlnd.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-oci8.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-pdo.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-pear.noarch 1:1.10.7-4.el7.remi @DevFrozen-LN-remi
php-pear-HTML-Template-IT.noarch
php-pecl-crypto.x86_64 0.3.1-1.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-igbinary.x86_64 2.0.8-1.el7.remi.5.6 @DevFrozen-LN-remi-php56
php-pecl-jsonc.x86_64 1.3.10-2.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-jsonc-devel.x86_64 1.3.10-2.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-memcached.x86_64 2.2.0-3.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-msgpack.x86_64 0.5.7-1.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-ssh2.x86_64 0.13-3.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-zip.x86_64 1.15.4-1.el7.remi.5.6 @DevFrozen-LN-remi-php56
php-pgsql.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-process.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-snmp.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-soap.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-xml.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php73.x86_64 1.0-0.1.el7.remi @DevFrozen-LN-remi
php73-php-cli.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-common.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-json.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-soap.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-runtime.x86_64 1.0-0.1.el7.remi @DevFrozen-LN-remi
Did you upgrade the path for the commands in XI?
No, but I will update them.
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri Apr 26, 2019 1:03 pm
by tgriep
Install all 3 of the RPM files in the server. I think they are required for the plugin.
Update the command and let us know if it works.
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Mon Apr 29, 2019 8:00 am
by lexisnexis
Will check into this and get back to you.
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Mon Apr 29, 2019 1:13 pm
by tgriep
OK, Let us know how it works out.
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri May 03, 2019 12:27 pm
by lexisnexis
I was able to install the 3 packages and restarted the httpd service, but I am still getting the PHP Warning messages. I updated the ORACLE commands in Nagios.
Any other suggestions?
sudo yum list | grep oracle
nagios-plugins-oracle.x86_64 2.2.1-16.20180725git3429dad.el7
oracle-instantclient18.5-basic.x86_64 18.5.0.0.0-3 installed
oracle-instantclient18.5-devel.x86_64 18.5.0.0.0-3 installed
oracle-instantclient18.5-sqlplus.x86_64
golang-googlecode-tools-oracle.x86_64 0-1.0.hgd32b5854c941.el7
kmod-oracleasm.x86_64 2.0.8-22.1.el7_6 Frozen-LN-updates
mono-data-oracle.x86_64 4.6.2-4.el7 Frozen-LN-epel
pcp-pmda-oracle.x86_64 4.1.0-5.el7_6 Frozen-LN-updates
tuned-profiles-oracle.noarch 2.10.0-6.el7_6.3 Frozen-LN-updates
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri May 03, 2019 1:57 pm
by ssax
The problem is that you have two different versions of PHP installed, you'll need to fix that:
Code: Select all
php.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-ZendFramework.noarch 1.12.20-1.el7.remi @Frozen-LN-remi
php-ZendFramework-Db-Adapter-Pdo.noarch
php-ZendFramework-Db-Adapter-Pdo-Oci.noarch
php-bcmath.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-cli.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-common.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-devel.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-fedora-autoloader.noarch 1.0.0-1.el7.remi @Frozen-LN-remi
php-gd.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-ldap.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mbstring.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mcrypt.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mssql.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-mysqlnd.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-oci8.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-pdo.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-pear.noarch 1:1.10.7-4.el7.remi @DevFrozen-LN-remi
php-pear-HTML-Template-IT.noarch
php-pecl-crypto.x86_64 0.3.1-1.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-igbinary.x86_64 2.0.8-1.el7.remi.5.6 @DevFrozen-LN-remi-php56
php-pecl-jsonc.x86_64 1.3.10-2.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-jsonc-devel.x86_64 1.3.10-2.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-memcached.x86_64 2.2.0-3.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-msgpack.x86_64 0.5.7-1.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-ssh2.x86_64 0.13-3.el7.remi.5.6 @Frozen-LN-remi-php56
php-pecl-zip.x86_64 1.15.4-1.el7.remi.5.6 @DevFrozen-LN-remi-php56
php-pgsql.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-process.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-snmp.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-soap.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
php-xml.x86_64 5.6.40-1.el7.remi @DevFrozen-LN-remi-php56
Code: Select all
php73.x86_64 1.0-0.1.el7.remi @DevFrozen-LN-remi
php73-php-cli.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-common.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-json.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-php-soap.x86_64 7.3.1-1.el7.remi @DevFrozen-LN-remi
php73-runtime.x86_64 1.0-0.1.el7.remi @DevFrozen-LN-remi
Please post the full output of these commands (run them as root):
Please PM me a copy of your profile if you're able to generate it, you can download it from
Admin > System Profile > Download Profile.
If you're unable to generate the the profile through the web interface, please try generating it from the command line by running these commands as root:
Code: Select all
rm -rf /usr/local/nagiosxi/var/components/profile.zip
/usr/local/nagiosxi/scripts/components/getprofile.sh SUPPORT
Then send me the resulting
/usr/local/nagiosxi/var/components/profile.zip file.
If the profile script fails, please include the ENTIRE output.
Re: PHP Warning for OCI8 - libclntsh.so.18.1 can not open
Posted: Fri May 03, 2019 3:20 pm
by lexisnexis
I sent the profile.zip via the PM you requested.
I have 2 version of PHP, because I have monitor check which require PHP 7.
Not sure if you wanted the -V to be lowercase to get the version.
Code: Select all
[root@XX ~]# php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/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 '/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
PHP 5.6.40 (cli) (built: Jan 9 2019 12:34:16)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[nagios@XX ~]$ sudo su - nagios
Last login: Fri May 3 16:10:05 EDT 2019 on pts/0
[nagios@XX ~]$ php -v
PHP 5.6.40 (cli) (built: Jan 9 2019 12:34:16)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies