|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57351 Unable to install PDO_OCI
Submitted: 2006-11-07 06:09 UTC Modified: 2015-08-29 12:33 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nicolas dot ternisien at gmail dot com Assigned: cmb (profile)
Status: Closed Package: PECL (PECL)
PHP Version: 5.1.6 OS: Linux/Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nicolas dot ternisien at gmail dot com
New email:
PHP Version: OS:


 [2006-11-07 06:09 UTC] nicolas dot ternisien at gmail dot com
If you try to do :

pecl install pdo

Add into /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini

Then restart Apache2

And if you try to do a

pecl install pdo_oci

Then you will have the following error :

pear/PDO_OCI requires PHP extension "pdo" (version >= 1.0)
No valid packages found
install failed


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-27 09:39 UTC] bjoern dot mueller at ivz dot de
workaround: try to build pdo_oci on your own.

pecl download pdo_oci
tar -cf PDO_OCI-1.0.tar
cd PDO_OCI-1.0
./configure --prefix=/usr/local --with-pdo-oci=instantclient,/usr/local/instantclient,

you will need to download and untar the oracle instanclient (basic and sdk) from oracle homepage into /usr/local/instantclient

if you receive an error ("to dumb to figure out where oci.h is") vi the configure script and modify the searchpath for the oracle headerfiles (in my case they were found in /usr/local/instantclient/sdk).

if your make exits with an error "cannot find -lclntsh" try

1. to symlink in /usr/local/instanclient to
2. to add /usr/local/instantclient to your /etc/ and run ldconfig
3. to vi the configure script again and edit the PDO_OCI_LIB_DIR (PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX")

remember to make clean and configure again if you edit the configure script. 

last step is to copy the extension (./modules/ to php extension_dir and to add "" to php.ini ...

here is my diff configure script:

uppsala:/tmp/PDO_OCI-1.0 # diff configure
<     if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
>     if test -f $PDO_OCI_IC_PREFIX/sdk/include/oci.h ; then
<   if test "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" != "/usr/include"; then
>   if test "$PDO_OCI_IC_PREFIX/sdk/include" != "/usr/include"; then
<   if test -z "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" || echo "$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client" | grep '^/' >/dev/null ; then
<     ai_p=$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client
>   if test -z "$PDO_OCI_IC_PREFIX/sdk/include" || echo "$PDO_OCI_IC_PREFIX/sdk/include" | grep '^/' >/dev/null ; then
>     ai_p=$PDO_OCI_IC_PREFIX/sdk/include
<     ep_dir="`echo $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client|$SED 's%/*[^/][^/]*/*$%%'`"
>     ep_dir="`echo $PDO_OCI_IC_PREFIX/sdk/include|$SED 's%/*[^/][^/]*/*$%%'`"
<     ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client\"`"
>     ai_p="$ep_realdir/`basename \"$PDO_OCI_IC_PREFIX/sdk/include\"`"
<     PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
uppsala:/tmp/PDO_OCI-1.0 #

best regards

 [2007-04-27 11:26 UTC]
Just use the pdo_oci that comes with PHP, as it is newer than the one in pecl.
 [2007-04-29 13:35 UTC] nicolas dot ternisien at gmail dot com
The question is how to make it work easily with the Debian packaging of instantclient of Oracle (

Does the pdo_oci version provided by PHP can be installed by default on an Ubuntu installation, or does it still need a pear/pecl install pdo_oci ?

Thanks for your answers
 [2007-04-30 08:06 UTC] bjoern dot mueller at ivz dot de
pecl/pear installation of pdo_oci is not stable at the moment on any linux i have tested so far and if you dont want to spend a whole bunch of time in investigating confscripts details just grab php5 tarball and instantclient basic/sdk zips and install from source. 

if you want your paketmanager to know about it you would have to install php source rpm for your dist, vi the specfile, build and install your own rpm.

best regards 

 [2008-09-12 13:16 UTC] jcfiala at gmail dot com
BTW: This is a really useful page for getting pdo_oci installed - thanks for writing it all down!
 [2015-08-28 13:16 UTC]
-Status: Open +Status: Closed -Package: PDO_OCI +Package: PECL -Assigned To: +Assigned To: cmb
 [2015-08-28 13:16 UTC]
As the PECL package is not maintained anymore, I'm closing this
 [2015-08-29 12:33 UTC]
Use the PDO_OCI included in core PHP.  As cmb says, the standalone pecl package is obsolete.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jul 06 03:01:28 2020 UTC