|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-11-07 06:09 UTC] nicolas dot ternisien at gmail dot com
Description: ------------ If you try to do : pecl install pdo Add extension=pdo.so 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 14:00:01 2025 UTC |
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,10.2.0.3 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 libclntsh.so.10.1 in /usr/local/instanclient to libclntsh.so 2. to add /usr/local/instantclient to your /etc/ld.so.conf 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/pdo_oci.so) to php extension_dir and to add "extension=pdo_oci.so" to php.ini ... here is my diff configure script: uppsala:/tmp/PDO_OCI-1.0 # diff configure.save configure 3962c3962 < 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 3964c3964 < 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 3966,3967c3966,3967 < 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 3970c3970 < 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%/*[^/][^/]*/*$%%'`" 3973c3973 < 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\"`" 4035c4035 < PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib" --- > PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX" uppsala:/tmp/PDO_OCI-1.0 # best regards bjoern