oci8 installation problem

Issues related to applications and software problems
nike
Posts: 38
Joined: 2018/05/07 14:05:24

oci8 installation problem

Post by nike » 2020/05/13 02:35:32

sir i have install oracle 12.2( 64 bit) and remi-php7.2 with instantclient 12.2 in centos 7 but oci8 cant install because of below error


from /var/tmp/oci8/oci8.c:49:
/usr/include/oracle/12.2/client64/ociap.h:11189:7: error: initializing argument 1 of 'sword OCISessionPoolDestroy(OCISPool*, OCIError*, ub4)' [-fpermissive]
sword OCISessionPoolDestroy (OCISPool *spoolhp,
^
In file included from /var/tmp/oci8/oci8.c:49:0:
/var/tmp/oci8/oci8.c:3388:46: error: invalid conversion from 'void*' to 'OCIError*' [-fpermissive]
(dvoid *) session_pool->err, OCI_SPD_FORCE));
^
/var/tmp/oci8/php_oci8_int.h:302:8: note: in definition of macro 'PHP_OCI_CALL'
func params; \
^
In file included from /usr/include/oracle/12.2/client64/oci.h:3456:0,
from /var/tmp/oci8/php_oci8_int.h:58,
from /var/tmp/oci8/oci8.c:49:
/usr/include/oracle/12.2/client64/ociap.h:11189:7: error: initializing argument 2 of 'sword OCISessionPoolDestroy(OCISPool*, OCIError*, ub4)' [-fpermissive]
sword OCISessionPoolDestroy (OCISPool *spoolhp,
^
make: *** [oci8.lo] Error 1
ERROR: `make' failed


anyone can help me please

User avatar
remirepo
Posts: 390
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: oci8 installation problem

Post by remirepo » 2020/05/13 09:13:06

> sir i have install oracle 12.2( 64 bit) and remi-php7.2 with instantclient 12.2 in centos 7 but oci8 cant install because of below error

Don't know how you install oci8 extension (seems from bad sources)

BTW, as you are using my repo, simply install "php-oci8" package.

Notice: this package use latest oracle client version 19.6 (but allow connection to database version 11.2+)
Remi's Repository - Forum - Blog

nike
Posts: 38
Joined: 2018/05/07 14:05:24

Re: oci8 installation problem

Post by nike » 2020/05/13 15:55:20

remirepo wrote:
2020/05/13 09:13:06
> sir i have install oracle 12.2( 64 bit) and remi-php7.2 with instantclient 12.2 in centos 7 but oci8 cant install because of below error

Don't know how you install oci8 extension (seems from bad sources)

BTW, as you are using my repo, simply install "php-oci8" package.

Notice: this package use latest oracle client version 19.6 (but allow connection to database version 11.2+)
-------now it is error below

PHP Warning: PHP Startup: Unable to load dynamic library 'oci8.so' (tried: /usr/lib64/php/modules/oci8.so (libclntsh.so.19.1: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/oci8.so.so (/usr/lib64/php/modules/oci8.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
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.19.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 'pdo_oci' (tried: /usr/lib64/php/modules/pdo_oci (/usr/lib64/php/modules/pdo_oci: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/pdo_oci.so (libclntsh.so.19.1: cannot open shared object file: No such file or directory)) in Unknown on line 0
Could not open input file: -

User avatar
remirepo
Posts: 390
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: oci8 installation problem

Post by remirepo » 2020/05/14 05:18:31

As I said, you need the Oracle Client Library 19.x which provides the missing library.

(no RPM dependency, because Oracle RPM are broken and have no provides)
Remi's Repository - Forum - Blog

nike
Posts: 38
Joined: 2018/05/07 14:05:24

Re: oci8 installation problem

Post by nike » 2020/05/14 06:02:01

remirepo wrote:
2020/05/14 05:18:31
As I said, you need the Oracle Client Library 19.x which provides the missing library.

(no RPM dependency, because Oracle RPM are broken and have no provides)
thank you sir .

nike
Posts: 38
Joined: 2018/05/07 14:05:24

Re: oci8 installation problem

Post by nike » 2020/05/14 14:14:07

nike wrote:
2020/05/14 06:02:01
remirepo wrote:
2020/05/14 05:18:31
As I said, you need the Oracle Client Library 19.x which provides the missing library.

(no RPM dependency, because Oracle RPM are broken and have no provides)lem
thank you sir .
same problem is showing .although i added the path in bash profile
export LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6

oracle bash_profile below


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/bin:$HOME/ora01/app/oracle:$HOME/ora01/app/oracle/product/12.2.0:$HOME/usr/lib/oracle/12.2/client64/lib
export PATH
export LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6
export ORACLE_HOME=/usr/lib/oracle/12.2/client64
export TNS_ADMIN=/ora01/app/oracle/product/12.2.0/db_1/network/admin
PATH=$PATH:$HOME/.local/bin:$HOME/bin:$HOME/ora01/app/oracle:$HOME/ora01/app/oracle/product/12.2.0/db_1/bin:$HOME/ora01/app/oracle/product/12.2.0:$HOME/usr/lib

# Oracle Settings
export TMP=/tmp

export ORACLE_HOSTNAME=server
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1
export ORACLE_SID=orcl

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH = $PATH:$ORACLE_HOME/bin

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;



sir please help where is problem ..

User avatar
remirepo
Posts: 390
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: oci8 installation problem

Post by remirepo » 2020/05/14 14:37:18

> same problem is showing .although i added the path in bash profile

You need to add this path in the apache service environment
See /etc/sysconfig/httpd for instructions
Remi's Repository - Forum - Blog

User avatar
remirepo
Posts: 390
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: oci8 installation problem

Post by remirepo » 2020/05/14 14:47:54

Also, in your bash

Code: Select all

 export LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6
 ...
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
So obviously this cannot work
Remi's Repository - Forum - Blog

nike
Posts: 38
Joined: 2018/05/07 14:05:24

Re: oci8 installation problem

Post by nike » 2020/05/14 14:55:41

remirepo wrote:
2020/05/14 14:37:18
> same problem is showing .although i added the path in bash profile

You need to add this path in the apache service environment
See /etc/sysconfig/httpd for instructions
---
i added in /etc/sysconfig/httpd
export LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6

sorry sir same problem is showing

User avatar
remirepo
Posts: 390
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: oci8 installation problem

Post by remirepo » 2020/05/14 17:26:44

With systemd, /etc/sysconfig/httpd is NOT a bash script, so should not use the "export" keyword.

Also check content of /ora01/app/oracle/product/19.6.0/instantclient_19_6 (for libclntsh.so.19.1)

Also check from command ligne

Code: Select all

$ LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6 php --ri oci8

oci8

OCI8 Support => enabled
OCI8 DTrace Support => enabled
OCI8 Version => 2.2.0
Oracle Run-time Client Library Version => 19.6.0.0.0
Oracle Compile-time Instant Client Version => 19.6
...
Remi's Repository - Forum - Blog

Post Reply

Return to “CentOS 7 - Software Support”