-3

My PHP project uses Oracle DB and it runs on Linux environment.

I believe I need to download OCI8 for Linux but I can't find this version of oci8 (php-oci8-5.4.16-48.el7.rpm) anywhere.

Can anyone have any clue to solve this issue? Any link/document?

0

1 Answer 1

1

Based on this manual on PHP web site you should use pecl.

Run this command:

pecl install oci8

Edit your php.ini file and add the line:

extension=oci8.so

In case of problem follow this answer:

For anyone stumbling upon this question, here is the proper way to handle it in Linux. (I am using CentOS commands for the demo below but Ubnutu shouldn't be any different)

Step 1: Get the Oracle libs.

EDIT: Thanks to Christopher Jones for the comment, you can find the direct RPM links at https://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/

wget oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm 
wget oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm 

Step 2: Install.

yum install oracle-instantclient18.3-basic-18.3.0.0.0-1.x86_64.rpm
yum install  oracle-instantclient18.3-devel-18.3.0.0.0-1.x86_64.rpm 

Step 3: configure (make the path of the oracle libs to be discoverable)

sudo sh -c "echo /usr/lib/oracle/18.3/client64/lib > /etc/ld.so.conf.d/oracle.conf"
sudo ldconfig
2
  • I did all this but no luck :( . I am getting error like No releases available for package "pecl.php.net/oci8". Now how to solve this error?
    – Maximious
    Sep 28, 2021 at 10:20
  • Will edit my answer Sep 28, 2021 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .