我已將我的ubuntu 13.04升級到13.10,不幸的是它改變了我在我的php和apache中配置的所有內容。現在我有新版本的Apache和PHP。以前我成功安裝了pdo_oci並在我的php項目中使用了Oracle,但現在升級後,我不得不重新安裝pdo_oci,我成功了,並在php.ini中添加了extension = pdo_oci.so,但php似乎沒有加載它。請幫忙。我如何確保pdo_oci已準備好使用,並且我能做些什麼來使php加載它。PHP未加載pdo_oci驅動程序
2
A
回答
0
好吧,沒有人似乎願意回答。下面是我的回答:
大多數問題發生因您下載PDO_OCI目錄內的config.m4文件的不兼容。所以我做了所有必要的改變,最終成功安裝了。現在它正在工作。上次沒有人能幫助我,太傷心了!
這裏的config.m4文件內容,我不能一步的指示得到步驟來更改爲我做的每一行,因爲有很多的變化我幾乎不記得他們所有人。如果您遇到類似問題,您可以複製並粘貼。
dnl $Id: config.m4,v 1.14.2.1 2005/09/24 23:23:24 sniper Exp $
if test "$PHP_PDO" != "no"; then
AC_DEFUN([AC_PDO_OCI_VERSION],[
AC_MSG_CHECKING([Oracle version])
if test -s "$PDO_OCI_DIR/orainst/unix.rgs"; then
PDO_OCI_VERSION=`grep '"ocommon"' $PDO_OCI_DIR/orainst/unix.rgs | sed 's/[ ][ ]*/:/g' | cut -d: -f 6 | cut -c 2-4`
test -z "$PDO_OCI_VERSION" && PDO_OCI_VERSION=7.3
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.11.2; then
PDO_OCI_VERSION=11.2
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
PDO_OCI_VERSION=10.1
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.9.0; then
PDO_OCI_VERSION=9.0
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.8.0; then
PDO_OCI_VERSION=8.1
elif test -f $PDO_OCI_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME.1.0; then
PDO_OCI_VERSION=8.0
elif test -f $PDO_OCI_DIR/lib/libclntsh.a; then
if test -f $PDO_OCI_DIR/lib/libcore4.a; then
PDO_OCI_VERSION=8.0
else
PDO_OCI_VERSION=8.1
fi
else
AC_MSG_ERROR(Oracle-OCI needed libraries not found under $PDO_OCI_DIR)
fi
AC_MSG_RESULT($PDO_OCI_VERSION)
])
PHP_ARG_WITH(pdo-oci, Oracle OCI support for PDO,
[ --with-pdo-oci[=DIR] PDO: Oracle-OCI support. Default DIR is ORACLE_HOME.
You may also use --with-pdo-oci=instantclient,prefix,version to use
the InstantClient SDK. For Linux with 10.1.0.3 rpms (for example) use:
--with-pdo-oci=instantclient,/usr,10.1.0.3])
if test "$PHP_PDO_OCI" != "no"; then
AC_MSG_CHECKING([Oracle Install-Dir])
if test "$PHP_PDO_OCI" = "yes" -o -z "$PHP_PDO_OCI"; then
PDO_OCI_DIR=$ORACLE_HOME
else
PDO_OCI_DIR=$PHP_PDO_OCI
fi
AC_MSG_RESULT($PDO_OCI_DIR :$PHP_PDO_OCI:)
AC_MSG_CHECKING([if that is sane])
if test -z "$PDO_OCI_DIR"; then
AC_MSG_ERROR([
You need to tell me where to find your oracle SDK, or set ORACLE_HOME.
])
else
AC_MSG_RESULT([yes])
fi
if test "instantclient" = "`echo $PDO_OCI_DIR | cut -d, -f1`" ; then
PDO_OCI_IC_PREFIX="`echo $PDO_OCI_DIR | cut -d, -f2`"
PDO_OCI_IC_VERS="`echo $PDO_OCI_DIR | cut -d, -f3`"
AC_MSG_CHECKING([for oci.h])
if test -f $PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client/oci.h ; then
PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
AC_MSG_RESULT($PDO_OCI_IC_PREFIX/include/oracle/$PDO_OCI_IC_VERS/client)
elif test -f $PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include/oci.h ; then
PHP_ADD_INCLUDE($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
AC_MSG_RESULT($PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/include)
else
AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your instant client install])
fi
PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/client/lib"
PDO_OCI_VERSION="`echo $PDO_OCI_IC_VERS | cut -d. -f1-2`"
else
if test -d "$PDO_OCI_DIR/rdbms/public"; then
PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/public)
PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/rdbms/public"
fi
if test -d "$PDO_OCI_DIR/rdbms/demo"; then
PHP_ADD_INCLUDE($PDO_OCI_DIR/rdbms/demo)
PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/rdbms/demo"
fi
if test -d "$PDO_OCI_DIR/network/public"; then
PHP_ADD_INCLUDE($PDO_OCI_DIR/network/public)
PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/network/public"
fi
if test -d "$PDO_OCI_DIR/plsql/public"; then
PHP_ADD_INCLUDE($PDO_OCI_DIR/plsql/public)
PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/plsql/public"
fi
if test -d "$PDO_OCI_DIR/include"; then
PHP_ADD_INCLUDE($PDO_OCI_DIR/include)
PDO_OCI_INCLUDES="$PDO_OCI_INCLUDES -I$PDO_OCI_DIR/include"
fi
if test -f "$PDO_OCI_DIR/lib/sysliblist"; then
PHP_EVAL_LIBLINE(`cat $PDO_OCI_DIR/lib/sysliblist`, PDO_OCI_SYSLIB)
elif test -f "$PDO_OCI_DIR/rdbms/lib/sysliblist"; then
PHP_EVAL_LIBLINE(`cat $PDO_OCI_DIR/rdbms/lib/sysliblist`, PDO_OCI_SYSLIB)
fi
PDO_OCI_LIB_DIR="$PDO_OCI_DIR/lib"
AC_PDO_OCI_VERSION($PDO_OCI_DIR)
fi
case $PDO_OCI_VERSION in
8.0)
PHP_ADD_LIBRARY_WITH_PATH(nlsrtl3, "", PDO_OCI_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(core4, "", PDO_OCI_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(psa, "", PDO_OCI_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(clntsh, $PDO_OCI_LIB_DIR, PDO_OCI_SHARED_LIBADD)
;;
8.1)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
9.0)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
10.1)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
10.2)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
11.2)
PHP_ADD_LIBRARY(clntsh, 1, PDO_OCI_SHARED_LIBADD)
;;
*)
AC_MSG_ERROR(Unsupported Oracle version! $PDO_OCI_VERSION)
;;
esac
PHP_ADD_LIBPATH($PDO_OCI_LIB_DIR, PDO_OCI_SHARED_LIBADD)
PHP_CHECK_LIBRARY(clntsh, OCIEnvCreate,
[
AC_DEFINE(HAVE_OCIENVCREATE,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
PHP_CHECK_LIBRARY(clntsh, OCIEnvNlsCreate,
[
AC_DEFINE(HAVE_OCIENVNLSCREATE,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
dnl
dnl Check if we need to add -locijdbc8
dnl
PHP_CHECK_LIBRARY(clntsh, OCILobIsTemporary,
[
AC_DEFINE(HAVE_OCILOBISTEMPORARY,1,[ ])
], [
PHP_CHECK_LIBRARY(ocijdbc8, OCILobIsTemporary,
[
PHP_ADD_LIBRARY(ocijdbc8, 1, PDO_OCI_SHARED_LIBADD)
AC_DEFINE(HAVE_OCILOBISTEMPORARY,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
dnl
dnl Check if we have collections
dnl
PHP_CHECK_LIBRARY(clntsh, OCICollAssign,
[
AC_DEFINE(HAVE_OCICOLLASSIGN,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
dnl Scrollable cursors?
PHP_CHECK_LIBRARY(clntsh, OCIStmtFetch2,
[
AC_DEFINE(HAVE_OCISTMTFETCH2,1,[ ])
], [], [
-L$PDO_OCI_LIB_DIR $PDO_OCI_SHARED_LIBADD
])
ifdef([PHP_CHECK_PDO_INCLUDES],
[
PHP_CHECK_PDO_INCLUDES
],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php5/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$abs_srcdir/ext
elif test -f $prefix/include/php5/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php5/ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
pdo_inc_path=$prefix/include/php/ext
else
AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
fi
AC_MSG_RESULT($pdo_inc_path)
])
PHP_NEW_EXTENSION(pdo_oci, pdo_oci.c oci_driver.c oci_statement.c, $ext_shared,,-I$pdo_inc_path)
PHP_SUBST_OLD(PDO_OCI_SHARED_LIBADD)
PHP_SUBST_OLD(PDO_OCI_DIR)
PHP_SUBST_OLD(PDO_OCI_VERSION)
ifdef([PHP_ADD_EXTENSION_DEP],
[
PHP_ADD_EXTENSION_DEP(pdo_oci, pdo)
])
fi
fi
0
您試圖更新的autoconf或從源代碼編譯?
我跑phpize時有同樣的問題。
相關問題
- 1. QSqlDatabase:驅動程序未加載驅動程序未加載
- 2. Py2app不包含Sqlite驅動程序 - 「數據庫錯誤:驅動程序未加載驅動程序未加載」
- 3. QT:驅動程序未加載,但驅動程序存在
- 4. QMYSQL驅動程序未加載
- 5. QT4未加載ODBC驅動程序
- 6. Qt 5.5.1,QSQLite:「未加載驅動程序」
- 7. Qt:QSqlDatabase:QMYSQL驅動程序未加載
- 8. MySql驅動程序未加載
- 9. QSqlDatabase:QTDS驅動程序未加載
- 10. PHP 7 SQLSRV驅動程序不加載
- 11. 使用OSR驅動程序加載程序加載驅動程序錯誤
- 12. 加載JDBC驅動程序
- 13. 手動加載驅動程序
- 14. 啓動時未加載Windows CE 7 SPI驅動程序
- 15. 未自動加載Apache Derby驅動程序
- 16. Microsoft PHP SQL驅動程序與PHP SQL驅動程序
- 17. 無法加載JDBC驅動程序。在
- 18. 無法加載JDBC驅動程序com.sqlserver.jdbc.Driver
- 19. 無法加載類[oracle.jdbc.driver.Oracle驅動程序]
- 20. JDBC/Connectorj:何時加載驅動程序?
- 21. 無法加載JDBC驅動程序
- 22. 加載驅動程序時出錯:com.mysql.jdbc.Driver
- 23. Hadoop不加載jdbc驅動程序
- 24. Java DB德比驅動程序加載
- 25. 的ActiveX:無法加載驅動程序
- 26. 無法加載Oracle驅動程序
- 27. 嵌入式linux驅動程序加載
- 28. 加載了錯誤的驅動程序
- 29. XAMPP jdbc驅動程序不加載
- 30. MySQL驅動程序不加載在Java