Skip to Main Content

Containers, Cloud Native & Kubernetes


For appeals, questions and feedback, please email

How can I get the InstantClient configured for a PHP docker image?

Nathan BennettNov 20 2023 — edited Nov 20 2023

I have a pretty basic PHP docker image and I'm trying to install the Oracle InstantClient - I have a copy of the unzipped in the container and have created a lib directory and symlinked the file to . ORACLE_HOME is also set up to & added to the PATH. Everything seems to be working up untill…

When trying to install the oci8 module via pecl :

pecl install oci8 --with-oci8=instantclient,/opt/oracle/instantclient_11_2

I get the following error:

/tmp/pear/temp/oci8/php_oci8_int.h:56:10: fatal error: oci.h: No such file or directory
56 | #include <oci.h>
| ^~~~~~~

From what I've read, there's also an ‘InstantClient SDK’ which may be needed in addition to the, but I don't see anywhere to download it. The links on the Oracle InstantClient Downloads page don't seem SDK related….

Thanks for any help!

This post has been answered by Nathan Bennett on Nov 21 2023
Jump to Answer
Post Details
Added on Nov 20 2023