I need to install PDO_OCI in ubuntu machine, there is no default package that I could install with apt-get.
There are a lot of tutorials showing how to do it, but when I follow them, I have problems related to compilation (configure, make,...)
Here what I did:
pecl install oci8
error: oci.h not found
mkdir -p /tmp/pear/download/
pecl download pdo_oci
pdo_driver.h not found ...
The PDO, PDO_OCI extensions from
pecl install are obsolete because latest PHP version has them built-in its core & installation these extensions by this way mostly failed.
I've spent a lot of time to try to do this following several approach with no luck, and finally find it out by myself a clean way to do this: compile & install the extensions from PHP source.
During the compilation, there are some tricks as well, I've described the process in detail in my personal blog: http://itblog.study.land/how-to-install-php5-pdo_oci-oci8-and-other-extensions-for-ubuntu/
Short steps are listed here:
Download & compile PDO_OCI (and OCI8 if needed) form PHP source packages, there are some tricks that you need to applied here, including:
sudo ln -s /usr/include/php5/ /usr/include/php
and edit the Makefile:
EXTRA_INCLUDES = -I/usr/include/oracle/11.2/client64
Enable the extensions and restart web server
This has been tested for Debian 7.6 as well
Hope this helps.