oci8 installation problem

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

Re: oci8 installation problem

Post by nike » 2020/05/15 02:32:56

remirepo wrote:
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
...
------
sorry sir i already delete it from /etc/sysconfig/httpd
also check the directory /ora01/app/oracle/product/19.6.0/instantclient_19_6 (for libclntsh.so.19.1) and file is there

[root@juserver oracle]# 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

Directive => Local Value => Master Value
oci8.max_persistent => -1 => -1
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
oci8.default_prefetch => 100 => 100
oci8.old_oci_close_semantics => Off => Off
oci8.connection_class => no value => no value
oci8.events => Off => Off

Statistics =>
Active Persistent Connections => 0
Active Connections => 0

-----
i have copied three files such as (libclntsh.so.19.1,libclntshcore.so.19.1,libnnz19.so) into /ora01/app/oracle/product/12.2.0/db_1/lib
then php -v NO ERROR

but when i restart httpd
same error showing
please help sir

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

Re: oci8 installation problem

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

> [root@juserver oracle]# LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6 php --ri oci8
> oci8

So it works

> i have copied three files such as (libclntsh.so.19.1,libclntshcore.so.19.1,libnnz19.so) into /ora01/app/oracle/product/12.2.0/db_1/lib

No, this doesn't make sense

Simply add the "LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6" in /etc/sysconfig/httpd
Remi's Repository - Forum - Blog

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

Re: oci8 installation problem

Post by nike » 2020/05/15 08:37:39

remirepo wrote:
2020/05/15 05:06:13
> [root@juserver oracle]# LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6 php --ri oci8
> oci8

So it works

> i have copied three files such as (libclntsh.so.19.1,libclntshcore.so.19.1,libnnz19.so) into /ora01/app/oracle/product/12.2.0/db_1/lib

No, this doesn't make sense

Simply add the "LD_LIBRARY_PATH=/ora01/app/oracle/product/19.6.0/instantclient_19_6" in /etc/sysconfig/httpd
----
i have already done that before u said but no result .....
i cann't understand what i shall do ,sir?

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

Re: oci8 installation problem

Post by remirepo » 2020/05/15 09:58:08

> i have already done that before u said but no result .....

You said you add it with the "export" keyword, I said you must remove it (only the "export")


And if you use FPM also see /etc/sysconfig/php-fpm
Remi's Repository - Forum - Blog

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

Re: oci8 installation problem

Post by nike » 2020/05/15 11:26:50

remirepo wrote:
2020/05/15 09:58:08
> i have already done that before u said but no result .....

You said you add it with the "export" keyword, I said you must remove it (only the "export")


And if you use FPM also see /etc/sysconfig/php-fpm
yes sir i added it without export in /etc/sysconfig/httpd
and i didn't use php-fpm

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

Re: oci8 installation problem

Post by remirepo » 2020/05/15 11:41:42

Sorry, no other idea, If it works from CLI, it should also work in web.
Remi's Repository - Forum - Blog

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

Re: oci8 installation problem

Post by nike » 2020/05/16 15:40:58

remirepo wrote:
2020/05/15 11:41:42
Sorry, no other idea, If it works from CLI, it should also work in web.
-------
sir when i have checked using "oracle" user it is running with php warning like
[oracle@juserver ~]$ php -v
PHP Warning: Module 'oci8' already loaded in Unknown on line 0
PHP 7.2.31 (cli) (built: May 12 2020 09:23:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

AND php --ri oci8
[oracle@juserver ~]$ php --ri oci8
PHP Warning: Module 'oci8' already loaded in Unknown on line 0

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

Directive => Local Value => Master Value
oci8.max_persistent => -1 => -1
oci8.persistent_timeout => -1 => -1
oci8.ping_interval => 60 => 60
oci8.privileged_connect => Off => Off
oci8.statement_cache_size => 20 => 20
oci8.default_prefetch => 100 => 100
oci8.old_oci_close_semantics => Off => Off
oci8.connection_class => no value => no value
oci8.events => Off => Off

Statistics =>
Active Persistent Connections => 0
Active Connections => 0

AND also
[oracle@juserver ~]$ php -m
PHP Warning: Module 'oci8' already loaded in Unknown on line 0
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mysqli
mysqlnd
oci8
openssl
pcntl
-------

but when i checked with "root " user showing below error
----
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
[PHP Modules]
------------------------------------------------- please help sir ------------------------------------

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

Re: oci8 installation problem

Post by remirepo » 2020/05/17 06:21:25

> PHP Warning: Module 'oci8' already loaded in Unknown on line 0

You have 2 "extension=oci8" directives in your php configuration.
Clean up the one installed manually, as the package provides its own configuration file

> libclntsh.so.19.1: cannot open shared object file

Again, LD_LIBRARY_PATH is not properly set...



P.S. Also notice that if you have set the linker path to 19.6 installation when this user is for database 12.3.... this may create issues....
Remi's Repository - Forum - Blog

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

Re: oci8 installation problem

Post by remirepo » 2020/05/18 13:57:38

I have tried to summarize various solutions on
https://blog.remirepo.net/post/2020/05/ ... ns-for-PHP
Remi's Repository - Forum - Blog

Post Reply