Instant client libraries 32-11.1.0.6.0
I install Oracle 11g (windows 32 bit platform) on windows 2003. It installed successfully and is up.
From another windows 2003 machine, I am trying to connect from a windows application to that oracle server using instant client libraires.
I had downloaded instantclient-basic-win32-11.1.0.6.0 for windows. I also downloaded instantclient-odbc-win32-11.1.0.6.0.zip
to the same location say C:\instantclient. Also I installed odbc_instant.exe from this folder. It said "ODBC installed successfully".
and added this path (C:\instantclient) to path variable. I set this path for TNS_Admin also in system environment.
When I try to install my application, when I select oracle connectivity, I had to give path for odbc drivers.
I selected this path "c:\instantclient" for oracle client libraries where I had downloaded the client libraires.
It gives error "Could not find required ORACLE Instant Client Libraries in the path specified"
Please help how to get these client libraries to connect to the oracle db server 11g.
thanks in advance,
Prema S
I would recommend two things.
1. Open an SR and ask support where to find what you are looking for.
2. Move your company to 64bit because 32bit is a terminally ill and the respirator will be removed very soon.
Similar Messages
-
OCIEnvNlsCreate():Oracle Instant Client libraries
Pls help solve this error:
[Mon Feb 18 13:45:14 2008] [error] [client 0.0.0.0] PHP Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in C:\\EID_Web\\test.php on line 3
[Mon Feb 18 13:45:14 2008] [error] [client 0.0.0.0] PHP Warning: oci_close() expects parameter 1 to be resource, boolean given in C:\\EID_Web\\test.php on line 14
[Mon Feb 18 13:45:18 2008] [error] [client 0.0.0.0] PHP Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in C:\\EID_Web\\test.php on line 3
[Mon Feb 18 13:45:18 2008] [error] [client 0.0.0.0] PHP Warning: oci_close() expects parameter 1 to be resource, boolean given in C:\\EID_Web\\test.php on line 14.
tried to change the path but still no changes.
this is what i use:
apache 2.2,oracle server 10g ,instant client 10g, windows 2000,php 5.2
Message was edited by:
tamseMake sure that you have only one Oracle Client on the client machine.
Delete/uninstall all others. Best uninstall all Oracle Software on that machine and reinstall one client.
Before you try to connect from a PHP script, try to connect with sqlplus. If that works, proceed.
The PHP you use must compiled and linked against the Oracle client version you use, else it won't work.
Now try again. If you still get the same errors, post the error messages and relevant parts of the PHP script.
Be aware that this forum is for Instant Client, so there might be better forums for PHP questions.
Yours,
Laurenz Albe -
Oracle Instant Client libraries wouldn't install
I tried installing Oracle libraries (main file is called "oracle-instantclient-basic-10.2.0.4-1.i386", SDK and SQL according to the manual Oracle provides here: http://download.oracle.com/docs/cd/B1930601/install.102/e12121/insttask.htm#CIHEJFGF
After files is unzipped, manual instructs to use "runInstaller" command out of the directory where files are placed but this command is not recognized which tells me that either command file is missing or command is spelled wrong in the manual.
If anybody has successfully installed Oracle Instant Client on OS X 10.6 from the official Oracle download, please help! Thanks in advance.Ok - I ran an ugly hack (similar to what I did with Linux) and manually moved files to locations which Oracle considers default and which do not require environmental variables, as follows:
When in the directory where Oracle client files were unzipped, run these commands:
cp sdk/include/*.h /usr/include
cp sqlplus /usr/bin
cp lib /usr/lib
Also, to be able to install OCI8 PHP module, following symbolic link will need to be created:
A symbolic link will need to be created as follows:
cd /usr/lib
ln -s libclntsh.dylib.10.1 libclntsh.dylib
I then installed oci8 for PHP and DBD::oracle for Perl and ran some test files, they work. However, if somebody knows why libraries didn't install with the command, as manual instructs, please answer! Thanks in advance! -
Oracle Instant Client and OUT Parameter of custom type in Stored Procedures
Hi @ all!
I try to set up a simple client application, that calls a stored procedure via Instant Client from C#.
The stored procedure and assiciated types looks like this:
TYPE MYVALUE AS OBJECT
Id INTEGER,
value FLOAT
TYPE MYVALUELIST AS TABLE OF MYVALUE;
PROCEDURE ReadValues( ID IN INTEGER,
RESULTSET OUT MYVALUELIST)
IS
...I created an Oracle Command executing this SP and added OracleParameters for ID and (where I got stuck) the RESULTSET.
Is it possible to pass a parameter with a custom type from C# in some way?
I already tried it as a function with SELECT * FROM TABLE(ReadValues(1));
With my parameter RESULTSET as the RETURN type. But since I use DML within the procedure, this does not work inside of a query...
Any suggestions?
Thanks in advance!Hi Greg!
Sorry, I misunderstood the forum topic then. =(
Anyway, in the example you provided in the link, this is nearly exactly my situation. But there the Oracle.DataAccess.Client is used, where the OracleDBType can be called to initialize an object of type person. I use the instant client libraries called by using System.Data.OracleClient. There is only the OracleType enum, that does not contain an object or something similar.
So I do it right now after trying a bit with a ref cursor parameter and an OracleDataAdapter - the ref cursor is passed back from Oracle as a DataReader, so die DataAdapter is able to use it for a .Fill():
OracleCommand cmd = new OracleCommand();
cmd.Parameters.Add("RESULTSET", OracleType.Cursor).Direction = ParameterDirection.Output;
OracleDataAdapter odr = new OracleDataAdapter(cmd);
DataTable result = new DataTable();
odr.Fill(result);Within my stored procedure I just added the following OUT parameter:
PROCEDURE ReadValues( ID IN INTEGER,
RESULTSET OUT sys_refcursor)
IS
currentlist MYVALUELIST;
... [Adding elements to that list] ...
OPEN resultset for select * from TABLE(currentlist);It works now, but I don't like that solution that much since I'm always afraid that there are lots of opened cursors idyling around. Do I have to close this one explicitly after filling my table by the DataAdapter?
Regards -
Php 5.1.2 doesn't seem to recognize the --with-oci8-instant-client option
I just tried configuring php 5.1.2 with the --with-oci8-instant-client option and could never get phpinfo() to show the oci8 section...
Finally went back and tried php 5.1.1 and it worked.
If anyone else could verify this behavior, maybe the PHP folks should be notified??Discovered the issue:
the configure script changed the format of the config option
in php 5.1.1:
--with-oci8[=DIR] Include Oracle (OCI8) support using an ORACLE_HOME
install. The default DIR is ORACLE_HOME
--with-oci8-instant-client[=DIR]
Include Oracle (OCI8) support using
Oracle Instant Client. DIR is the directory with the
Instant Client libraries. On Linux it will default to
/usr/lib/oracle/<most_recent_version>/client/lib
Other platforms will need to have it explicitly specified
HOWEVER, in php 5.1.2:
--with-oci8[=DIR] Include Oracle (OCI8) support.
The default DIR is ORACLE_HOME.
Use --with-oci8=instantclient,/path/to/oic/lib
to use Oracle Instant Client installation
This explains why the --with-oci8-instant-client option is ignored. The new format is:
--with-oci8=instantclient,/path/to/libs -
Solaris PHP 5.2.12 Oracle Instant Client Error
We are testing a Oracle Solaris Express 11 Server with the standard Apache and PHP installation. But we need the Oracle Instant client and the oci8 module enabled for our company applications.
We did this by using ./pecl install oci8 in /usr/php/5.2/bin. We set the LD_LIBRARY_PATH in /etc/apache2/2.2/envvars
a 32bits solaris (x86) version of the Oracle Instant Client 11.2 is installed in /opt/oracle/instantclient_11_2 with the symbolic link made.
envvars:
LD_LIBRARY_PATH=/opt/oracle/instantclient_11_2
ORACLE_HOME=/opt/oracle/instantclient_11_2
ORACLE_BASE=/opt/oracle/instantclient_11_2
he oci8 module installed and php loads it.
phpinfo(); output:
oci8
OCI8 Support enabled
Version 1.4.6
Revision $Revision: 313688 $
Active Persistent Connections 0
Active Connections 0
Oracle Run-time Client Library Version 11.2.0.2.0
Oracle Instant Client Version 11.2
Temporary Lob support enabled
When we first view a site there is no problem but very randomly we get the following error:
OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries*
but when we use echo getenv("LD_LIBRARY_PATH"); in php the output is "/opt/oracle/instantclient_11_2"
now the strange this is as randomly as it appears it disappears we can load the web-page without problems and after a couple of clicks the error is back. if we wait a coupe of seconds you can reload the page and it loads normaly.
The error appears to be random and we get it over and over agian, it comes and goes after a cpl of pages are viewed. It seems to appear more when there are multiple users browsing on the website.
Is there a fix for this? is this an known bug? It seems strange the instant client works some times and fails a second later without a change in the system.
Hope someone can help us.
Edited by: user10978378 on Sep 3, 2011 4:20 AMSolved it by compiling apache 2.2.20 into 64bits using:
CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64" ./configure enable-so enable-cgi enable-info enable-rewrite enable-deflate enable-ssl
and compiling php 5.3.8 into 64bits:
CFLAGS="-m64" CXXFLAGS="-m64" LDFLAGS="-m64" ./configure with-apxs2=/usr/local/apache2/bin/apxs with-gd with-zlib disable-ipv6 with-jpeg-dir=/usr/ with-png-dir=/usr/ with-freetype-dir=/usr/ with-pear with-openssl with-oci8=instantclient,/opt/oracle/instantclient_10_2
and using the 10.2.0.4 instant client.
there might be a bug in the 11.x ones, they dont seem to work on Oracle Solaris 11. -
The Instant Client SDK on Linux was released today
The 10.1.0.3 Linux Instant Client SDK was posted on OTN today. See
http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html
You can now use Instant Client to compile PHP. You need to modify
PHPs configuration scripts first. One suggested change is given in
PHP bug http://bugs.php.net/bug.php?id=31084 The diff in the bug is a
little awkwardly wrapped. Here it is again for ease of
cutting/pasting. See the bug for the other instructions.
-- CJ
--- ext/oci8/config.m4.orig 2004-02-04 01:22:34.000000000 +1100
+++ ext/oci8/config.m4 2004-12-14 18:36:21.000000000 +1100
@@ -38,16 +38,46 @@
OCI8_VERSION=8.1
fi
else
- AC_MSG_ERROR(Oracle-OCI8 needed libraries not found)
+ AC_MSG_ERROR([Oracle (OCI8) required libraries not found])
fi
AC_MSG_RESULT($OCI8_VERSION)
-PHP_ARG_WITH(oci8, for Oracle-OCI8 support,
-[ --with-oci8[=DIR] Include Oracle-oci8 support. Default DIR is ORACLE_HOME.])
+AC_DEFUN(AC_OCI8IC_VERSION,[
+ AC_MSG_CHECKING([Oracle Instant Client version])
+ if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then
+ if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
+ if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then
+ AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found])
+ fi
+ OCI8_VERSION=10.1
+ else
+ AC_MSG_ERROR([Oracle Instant Client library version not supported])
+ fi
+ else
+ AC_MSG_ERROR([Oracle Instant Client libraries not found])
+ fi
+ AC_MSG_RESULT([$OCI8_VERSION])
+])
+
+PHP_ARG_WITH(oci8, for Oracle (OCI8) support using ORACLE_HOME installation,
+[ --with-oci8[[=DIR]] Include Oracle (OCI8) support using an ORACLE_HOME
+ install. The default DIR is ORACLE_HOME])
+
+PHP_ARG_WITH(oci8-instant-client, for Oracle (OCI8) support using Oracle Instant Client,
+[ --with-oci8-instant-client[[=DIR]] Include Oracle (OCI8) support using
+ Oracle Instant Client. DIR is the directory with the
+ Instant Client libraries. On Linux it will default to
+ /usr/lib/oracle/<most_recent_version>/client/lib
+ Other platforms will need to have it explicitly specified.])
if test "$PHP_OCI8" != "no"; then
- AC_MSG_CHECKING([Oracle Install-Dir])
+
+ if test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+ AC_MSG_ERROR([--with-oci8 and --with-oci8-instant-client are mutually exclusive])
+ fi
+
+ AC_MSG_CHECKING([Oracle Install Directory])
if test "$PHP_OCI8" = "yes"; then
OCI8_DIR=$ORACLE_HOME
else
@@ -116,14 +146,18 @@
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+
10.1)
PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
AC_DEFINE(HAVE_OCI_9_2,1,[ ])
+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+
- AC_MSG_ERROR(Unsupported Oracle version!)
+ AC_MSG_ERROR([Unsupported Oracle version])
esac
@@ -145,10 +179,88 @@
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+ dnl
+ dnl Check if we have collections
+ dnl
+ PHP_CHECK_LIBRARY(clntsh, OCICollAssign,
+ [
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+ ], [], [
+ -L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+ ])
+
+
PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
AC_DEFINE(HAVE_OCI8,1,[ ])
PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
PHP_SUBST_OLD(OCI8_DIR)
PHP_SUBST_OLD(OCI8_VERSION)
+
+elif test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+
+ AC_MSG_CHECKING([Oracle Instant Client directory])
+ if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
+dnl Generally the Instant Client can be anywhere so the user must pass in the
+dnl directory to the libraries. But on Linux we default to the most recent
+dnl version in /usr/lib
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1`
+ if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
+ AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8-instant-client=DIR])
+ fi
+ fi
+ AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT)
+
+ OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
+
+ AC_MSG_CHECKING([Oracle Instant Client SDK header directory])
+
+dnl Header directory for Instant Client SDK RPM install
+ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | sed -e 's!^/usr/lib/oracle/\(.*\)/client/lib[[/]]*$!/usr/include/oracle/\1/client!'`
+
+dnl Header directory for Instant Client SDK zip file install
+ OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include
+
+ if test -f "$OCISDKRPMINC/oci.h"; then
+ AC_MSG_RESULT($OCISDKRPMINC)
+ PHP_ADD_INCLUDE($OCISDKRPMINC)
+ OCI8INCDIR=$OCISDKRPMINC
+ elif test -f "$OCISDKZIPINC/oci.h"; then
+ AC_MSG_RESULT($OCISDKZIPINC)
+ PHP_ADD_INCLUDE($OCISDKZIPINC)
+ OCI8INCDIR=$OCISDKZIPINC
+ else
+ AC_MSG_ERROR([Oracle Instant Client SDK header files not found])
+ fi
+
+ OCISYSLIBLIST=`echo "$OCI8INCDIR" | sed -e 's!\(.*\)/include$!\1/demo/sysliblist!'`
+ if test -f "$OCISYSLIBLIST"; then
+ PHP_EVAL_LIBLINE(`cat $OCISYSLIBLIST`, OCI8_SYSLIB)
+ fi
+
+ AC_OCI8IC_VERSION($PHP_OCI8_INSTANT_CLIENT)
+ case $OCI8_VERSION in
+ 10.1)
+ PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
+ PHP_ADD_LIBPATH($PHP_OCI8_INSTANT_CLIENT, OCI8_SHARED_LIBADD)
+ ;;
+
+ *)
+ AC_MSG_ERROR([Unsupported Oracle Instant Client version])
+ ;;
+ esac
+
+ AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
+ AC_DEFINE(HAVE_OCI_9_2,1,[ ])
+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+ AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[ ])
+
+ PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
+ AC_DEFINE(HAVE_OCI8,1,[ ])
+
+ PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
+ PHP_SUBST_OLD(OCI8_DIR)
+ PHP_SUBST_OLD(OCI8_VERSION)
+
fiI've just installed the 10.1.0.3 instant client basic and sdk and php-4.3.9 on a Mandrake 10 Linux system
However I can`t patch the config.m4 file.
patch -p0 config.m4 php_oci8ic_buildpatch
patching file config.m4
Hunk #1 FAILED at 38.
Hunk #2 FAILED at 146.
Hunk #3 FAILED at 179.
3 out of 3 hunks FAILED -- saving rejects to file config.m4.rej
config.m4.rej says:
*** 38,53 ****
OCI8_VERSION=8.1
fi
else
- AC_MSG_ERROR(Oracle-OCI8 needed libraries not found)
fi
AC_MSG_RESULT($OCI8_VERSION)
- PHP_ARG_WITH(oci8, for Oracle-OCI8 support,
- [ --with-oci8[=DIR] Include Oracle-oci8 support. Default DIR is ORACLE_HOME.])
if test "$PHP_OCI8" != "no"; then
- AC_MSG_CHECKING([Oracle Install-Dir])
if test "$PHP_OCI8" = "yes"; then
OCI8_DIR=$ORACLE_HOME
else
--- 38,83 ----
OCI8_VERSION=8.1
fi
else
+ AC_MSG_ERROR([Oracle (OCI8) required libraries not found])
fi
AC_MSG_RESULT($OCI8_VERSION)
+ AC_DEFUN(AC_OCI8IC_VERSION,[
+ AC_MSG_CHECKING([Oracle Instant Client version])
+ if test -f $PHP_OCI8_INSTANT_CLIENT/libociei.$SHLIB_SUFFIX_NAME; then
+ if test -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME.10.1; then
+ if test ! -f $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME; then
+ AC_MSG_ERROR([Link from $PHP_OCI8_INSTANT_CLIENT/libclntsh.$SHLIB_SUFFIX_NAME to libclntsh.$SHLIB_SUFFIX_NAME.10.1 not found])
+ fi
+ OCI8_VERSION=10.1
+ else
+ AC_MSG_ERROR([Oracle Instant Client library version not supported])
+ fi
+ else
+ AC_MSG_ERROR([Oracle Instant Client libraries not found])
+ fi
+ AC_MSG_RESULT([$OCI8_VERSION])
+ ])
+
+ PHP_ARG_WITH(oci8, for Oracle (OCI8) support using ORACLE_HOME installation,
+ [ --with-oci8[[=DIR]] Include Oracle (OCI8) support using an ORACLE_HOME
+ install. The default DIR is ORACLE_HOME])
+
+ PHP_ARG_WITH(oci8-instant-client, for Oracle (OCI8) support using Oracle Instant Client,
+ [ --with-oci8-instant-client[[=DIR]] Include Oracle (OCI8) support using
+ Oracle Instant Client. DIR is the directory with the
+ Instant Client libraries. On Linux it will default to
+ /usr/lib/oracle/<most_recent_version>/client/lib
+ Other platforms will need to have it explicitly specified.])
if test "$PHP_OCI8" != "no"; then
+
+ if test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+ AC_MSG_ERROR([--with-oci8 and --with-oci8-instant-client are mutually exclusive])
+ fi
+
+ AC_MSG_CHECKING([Oracle Install Directory])
if test "$PHP_OCI8" = "yes"; then
OCI8_DIR=$ORACLE_HOME
else
*** 116,129 ****
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
10.1)
PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
AC_DEFINE(HAVE_OCI_9_2,1,[ ])
- AC_MSG_ERROR(Unsupported Oracle version!)
esac
--- 146,163 ----
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+
10.1)
PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD)
AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
AC_DEFINE(HAVE_OCI_9_2,1,[ ])
+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+
+ AC_MSG_ERROR([Unsupported Oracle version])
esac
*** 145,154 ****
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
AC_DEFINE(HAVE_OCI8,1,[ ])
PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
PHP_SUBST_OLD(OCI8_DIR)
PHP_SUBST_OLD(OCI8_VERSION)
fi
--- 179,266 ----
-L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+ dnl
+ dnl Check if we have collections
+ dnl
+ PHP_CHECK_LIBRARY(clntsh, OCICollAssign,
+ [
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+ ], [], [
+ -L$OCI8_DIR/lib $OCI8_SHARED_LIBADD
+ ])
+
+
PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
AC_DEFINE(HAVE_OCI8,1,[ ])
PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
PHP_SUBST_OLD(OCI8_DIR)
PHP_SUBST_OLD(OCI8_VERSION)
+
+ elif test "$PHP_OCI8_INSTANT_CLIENT" != "no"; then
+
+ AC_MSG_CHECKING([Oracle Instant Client directory])
+ if test "$PHP_OCI8_INSTANT_CLIENT" = "yes"; then
+ dnl Generally the Instant Client can be anywhere so the user must pass in the
+ dnl directory to the libraries. But on Linux we default to the most recent
+ dnl version in /usr/lib
+ PHP_OCI8_INSTANT_CLIENT=`ls -d /usr/lib/oracle/*/client/lib 2> /dev/null | tail -1`
+ if test -z "$PHP_OCI8_INSTANT_CLIENT"; then
+ AC_MSG_ERROR([Oracle Instant Client directory not found. Try --with-oci8-instant-client=DIR])
+ fi
+ fi
+ AC_MSG_RESULT($PHP_OCI8_INSTANT_CLIENT)
+
+ OCI8_DIR=$PHP_OCI8_INSTANT_CLIENT
+
+ AC_MSG_CHECKING([Oracle Instant Client SDK header directory])
+
+ dnl Header directory for Instant Client SDK RPM install
+ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | sed -e 's!^/usr/lib/oracle/\(.*\)/client/lib[[]]*$!/usr/include/oracle/\1/client!'`
+
+ dnl Header directory for Instant Client SDK zip file install
+ OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include
+
+ if test -f "$OCISDKRPMINC/oci.h"; then
+ AC_MSG_RESULT($OCISDKRPMINC)
+ PHP_ADD_INCLUDE($OCISDKRPMINC)
+ OCI8INCDIR=$OCISDKRPMINC
+ elif test -f "$OCISDKZIPINC/oci.h"; then
+ AC_MSG_RESULT($OCISDKZIPINC)
+ PHP_ADD_INCLUDE($OCISDKZIPINC)
+ OCI8INCDIR=$OCISDKZIPINC
+ else
+ AC_MSG_ERROR([Oracle Instant Client SDK header files not found])
+ fi
+
+ OCISYSLIBLIST=`echo "$OCI8INCDIR" | sed -e 's!\(.*\)/include$!\1/demo/sysliblist!'`
+ if test -f "$OCISYSLIBLIST"; then
+ PHP_EVAL_LIBLINE(`cat $OCISYSLIBLIST`, OCI8_SYSLIB)
+ fi
+
+ AC_OCI8IC_VERSION($PHP_OCI8_INSTANT_CLIENT)
+ case $OCI8_VERSION in
+ 10.1)
+ PHP_ADD_LIBRARY(clntsh, 1, OCI8_SHARED_LIBADD)
+ PHP_ADD_LIBPATH($PHP_OCI8_INSTANT_CLIENT, OCI8_SHARED_LIBADD)
+ ;;
+
+ *)
+ AC_MSG_ERROR([Unsupported Oracle Instant Client version])
+ ;;
+ esac
+
+ AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])
+ AC_DEFINE(HAVE_OCI_9_2,1,[ ])
+ AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ])
+ AC_DEFINE(PHP_OCI8_HAVE_COLLECTIONS,1,[ ])
+ AC_DEFINE(HAVE_OCI_INSTANT_CLIENT,1,[ ])
+
+ PHP_NEW_EXTENSION(oci8, oci8.c, $ext_shared)
+ AC_DEFINE(HAVE_OCI8,1,[ ])
+
+ PHP_SUBST_OLD(OCI8_SHARED_LIBADD)
+ PHP_SUBST_OLD(OCI8_DIR)
+ PHP_SUBST_OLD(OCI8_VERSION)
+
fi
How can i patch the config.m4 file?? -
Instant Client not working on Windows Server 2003
Hi everybody,
I have installed the Instant Client libraries on a machine running Windows Server 2003 in order to connect to a remote Oracle server. I also installed the sqlplus package. I copied them in a local directory, updated the Environment variable PATH and restarted. When I try to execute sqlplus to test if everything works fine, I get the following errors:
sqlplus user/[email protected]:1521/orcl
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
Also, when I try to use PHP OCI8 functions like oci_connect() I get an error like:
PHP Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries
I checked it and the PATH variable points to the instant client libraries.
Any ideas?
Thanks in advance!I get the following errors: sqlplus user/[email protected]:1521/orcl SP2-1503: Unable to initialize Oracle call interface SP2-0152: ORACLE may not be functioning properly Also, when I try to use PHP OCI8 functions like oci_connect......Like the error suggested, the instant client libraries does not include the Network Service required by SQLPLUS.
The connect string you are trying to use doesn't work for SQLPLUS. SQLPLUS will need proper TNS names configured.
In another words, instanct client libraries installation is not enough to use sqlplus. Use Runtime installation or Customized installation. -
Instant client on windows 2000, path problems
I have successfully installed the client and all work fine. But from time to time for no apparent reason php script gives an error
"Warning oci_connect (): OCIEnvNlsCreate () failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries."
I checked the environment variables, they are correct.
If you restart Apache, everything starts to work fine. What may be the problem?
(sorry for my English, it's not my native language)I agree, but this is for the QA group and they generally test the app and access the DB using app only but now for some certain modules they want to check the data in the database but they dont know how to write SQL so they decided to use microsoft sql writer (I never used it :) ) and for that they want to setup odbc and for that they need client, so they are not going to use sqlplus and that why I just wanna install instant client on their desktops.
Daljit Singh -
Instant client and Error while trying to retrieve text for error ORA-01019
For an older Windows app, I am exploring using Windows 32 bit IC instead of a full Oracle client installation:
IC 10.1.0.5 works fine for me but has the problem of not being able to connect if run from a folder containing parens (). ie., C:\Program Files (x86).
IC 10.2.0.3 gives the error "Cannot load any communication DLLs, network may not be installed". SQL+ works.
IC 10.2.0.4 gives the error "Error while trying to retrieve text for error ORA-01019". SQL+ works.
Does someone know why these three versions of IC would behave this differently on the same environment?
I have tried all sorts of things with ORACLE_HOME and TNS_ADMIN with IC 10.2.0.4.
Do you know which client version is the first to have the fix for the known C:\Program Files (x86) connect problem?
Or are their patches to IC 10.1.0.5 that I could implement ?
Any help or enlightenment would be appreciated.The web server is not seeing the Oracle environment correctly. You need to set PATH to the instant client libraries. ORA_NLS33 is not used for Oracle 10g clients. Perhaps you have some library conflict with two versions of Oracle on the machine?
These may help:
http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html#envvars
http://blogs.oracle.com/opal/2006/05/01 -
Problem PHP Oracle - Instant Client
Hi,
i have been trying to resolve this issue but im not really sure what i need to do, could someone help me?
Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries
Im getting this error when i try to connect to a Oracle database via PHP.
My host is Windows, Oracle instant client is on C:\instantclient_11_2 and added on PATH Variables.
I think there are missing some oracle variables on my phpinfo(), below:
OCI8 Support
enabled
Version
1.4.9
Revision
$Id: 44bfa713983a99b3e59477f6532e5fb51b6dee94 $
Active Persistent Connections
0
Active Connections
0
Oracle Run-time Client Library Version
0.0.0.0.0
Oracle Instant Client Version
11.2
Temporary Lob support
enabled
Collections support
enabled
Directive
Local Value
Master Value
oci8.connection_class
no value
no value
oci8.default_prefetch
100
100
oci8.events
Off
Off
oci8.max_persistent
-1
-1
oci8.old_oci_close_semantics
Off
Off
oci8.persistent_timeout
-1
-1
oci8.ping_interval
60
60
oci8.privileged_connect
Off
Off
oci8.statement_cache_size
20
20
Environment
Variable
Value
REDIRECT_HANDLER
application/x-httpd-php
REDIRECT_STATUS
200
HTTP_HOST
marcelb01v
HTTP_USER_AGENT
Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0
HTTP_ACCEPT
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_LANGUAGE
en-US,en;q=0.5
HTTP_ACCEPT_ENCODING
gzip, deflate
HTTP_CONNECTION
keep-alive
PATH
C:\instantclient_11_2;O:\ora11202w\BIN;C:\PHP\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;
SystemRoot
C:\windows
COMSPEC
C:\windows\system32\cmd.exe
PATHEXT
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR
C:\windows
SERVER_SIGNATURE
no value
SERVER_SOFTWARE
Apache/2.2.25 (Win32) mod_fcgid/2.3.6
SERVER_NAME
marcelb01v
SERVER_ADDR
10.26.213.195
SERVER_PORT
80
REMOTE_ADDR
10.45.112.152
DOCUMENT_ROOT
C:/htdocs
SERVER_ADMIN
SCRIPT_FILENAME
C:\htdocs\stuffs\test.php
REMOTE_PORT
51461
REDIRECT_URL
/stuffs/test.php
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.1
REQUEST_METHOD
GET
QUERY_STRING
no value
REQUEST_URI
/stuffs/test.php
SCRIPT_NAME
/stuffs/test.php
ORIG_SCRIPT_FILENAME
C:/PHP/php-cgi.exe
ORIG_PATH_INFO
/stuffs/teste.php
ORIG_PATH_TRANSLATED
C:\htdocs\stuffs\test.php
ORIG_SCRIPT_NAME
/php/php-cgi.exe
PHP Variables
Variable
Value
_SERVER["REDIRECT_HANDLER"]
application/x-httpd-php
_SERVER["REDIRECT_STATUS"]
200
_SERVER["HTTP_HOST"]
marcelb01v
_SERVER["HTTP_USER_AGENT"]
Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0
_SERVER["HTTP_ACCEPT"]
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
_SERVER["HTTP_ACCEPT_LANGUAGE"]
en-US,en;q=0.5
_SERVER["HTTP_ACCEPT_ENCODING"]
gzip, deflate
_SERVER["HTTP_CONNECTION"]
keep-alive
_SERVER["PATH"]
C:\instantclient_11_2;O:\ora11202w\BIN;C:\PHP\;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;
_SERVER["SystemRoot"]
C:\windows
_SERVER["COMSPEC"]
C:\windows\system32\cmd.exe
_SERVER["PATHEXT"]
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
_SERVER["WINDIR"]
C:\windows
_SERVER["SERVER_SIGNATURE"]
no value
_SERVER["SERVER_SOFTWARE"]
Apache/2.2.25 (Win32) mod_fcgid/2.3.6
_SERVER["SERVER_NAME"]
marcelb01v
_SERVER["SERVER_ADDR"]
10.26.213.195
_SERVER["SERVER_PORT"]
80
_SERVER["REMOTE_ADDR"]
10.45.112.152
_SERVER["DOCUMENT_ROOT"]
C:/htdocs
_SERVER["SERVER_ADMIN"]
_SERVER["SCRIPT_FILENAME"]
C:\htdocs\stuffs\test.php
_SERVER["REMOTE_PORT"]
51461
_SERVER["REDIRECT_URL"]
/stuffs/test.php
_SERVER["GATEWAY_INTERFACE"]
CGI/1.1
_SERVER["SERVER_PROTOCOL"]
HTTP/1.1
_SERVER["REQUEST_METHOD"]
GET
_SERVER["QUERY_STRING"]
no value
_SERVER["REQUEST_URI"]
/stuffs/test.php
_SERVER["SCRIPT_NAME"]
/stuffs/test.php
_SERVER["ORIG_SCRIPT_FILENAME"]
C:/PHP/php-cgi.exe
_SERVER["ORIG_PATH_INFO"]
/stuffs/test.php
_SERVER["ORIG_PATH_TRANSLATED"]
C:\htdocs\stuffs\test.php
_SERVER["ORIG_SCRIPT_NAME"]
/php/php-cgi.exe
_SERVER["PHP_SELF"]
/stuffs/test.php
_SERVER["REQUEST_TIME"]
1399483024Your PATH includes "C:\instantclient_11_2;O:\ora11202". This hints that you have multiple versions of Oracle installed, which is common cause of issues.
Do you need Instant Client? If you already have an Oracle DB you don't really need Instant Client unless you have a particular version requirement. -
Instant client AIX library search paths
If you use the AIX "dump -H" command against the various Instant Client libraries, you'll notice that some non-existant paths (from the original build) are included.
For example:
$ dump -H libclntsh.a
shows a library search path of:
/b/114/lib:/usr/lib:/lib
This can create security problems, particulary with set-uid programs which link against such libraries.
When you next build your AIX libraries, you may wish to use the "-bnolibpath" or perhaps an explicit "-blibpath" directive with the loader.
Just a thought. Thanks for providing the Instant Client.Thanks for the report.
-- CJ -
Instant Client sqlplus: error while loading shared libraries: libsqlplus.so
os : Linux ch5dlfp090 2.6.18-128.el5 #1 SMP Wed Dec 17 11:58:23 EST 2008 ppc64 ppc64 ppc64 GNU/Linux
Oracle : Instant client
[oracle@ch5dlfp090 instantclient_10_2]$ pwd
/shared/instantclient/64bit/instantclient_10_2
[oracle@ch5dlfp090 instantclient_10_2]$ ls -ltr
total 108288
-rwxrwxr-x 1 oracle dba 72658720 Dec 27 2008 libociei.so
-rwxrwxr-x 1 oracle dba 41007 Dec 27 2008 genezi
-rw-rw-r-- 1 oracle dba 237 Dec 27 2008 BASIC_README
-r-xr-xr-x 1 oracle dba 3790338 Dec 27 2008 libnnz10.so
-rwxrwxr-x 1 oracle dba 23543028 Dec 27 2008 libclntsh.so.10.1
-r--r--r-- 1 oracle dba 1555682 Dec 27 2008 ojdbc14.jar
-r-xr-xr-x 1 oracle dba 164432 Dec 27 2008 libocijdbc10.so
-rwxrwxr-x 1 oracle dba 3014136 Dec 27 2008 libocci.so.10.1
-r--r--r-- 1 oracle dba 1609607 Dec 27 2008 classes12.jar
-r--r--r-- 1 oracle dba 1646178 Dec 27 2008 orai18n.jar
-r-xr-xr-x 1 oracle dba 48473 Dec 27 2008 libheteroxa10.so
-rw-rw-r-- 1 oracle dba 235 Dec 27 2008 JDBC_README
-rw-rw-r-- 1 oracle dba 241 Dec 27 2008 SQLPLUS_README
-r-xr-xr-x 1 oracle dba 15629 Dec 27 2008 sqlplus
-r-xr-xr-x 1 oracle dba 1183998 Dec 27 2008 libsqlplus.so
-r-xr-xr-x 1 oracle dba 1443102 Dec 27 2008 libsqlplusic.so
-r--r--r-- 1 oracle dba 1525 Dec 27 2008 glogin.sql
drwxrwxr-x 4 oracle dba 16384 Dec 27 2008 sdk
[oracle@ch5dlfp090 instantclient_10_2]$
Issue : When I tried to connect Sqlplus
[oracle@ch5dlfp090 instantclient_10_2]$ sqlplus
sqlplus: error while loading shared libraries: libsqlplus.so: wrong ELF class: ELFCLASS64
When I connect with 32 bit instant client of Power Linux version I am able to connect
When Hardware is 64 os 64 Bit Instnat client 64 bit not working
what could be the reason ? How to resolve this ?Pl post in the Instant Client forum - Instant Client
What does "which sqlplus" return ?
This thread may be relevant - Instant client for Solaris AMD x64
HTH
Srini -
Can a program compilied with 32 libraries work with Instant Client 64 bit?
We are compiling our program on IBM AIX 5L and HP-UX PA_RISC with 32 libraries (using ORACLE_HOME/lib32)
for AIX and HP-UX RISC the only available Instant Client 10gR2 is 64 bit. there is no 32 version.
can a program compilied with 32 libraries work with Instant Client 64 bit?64 bit clients can be downloaded from here: http://www.oracle.com/technetwork/topics/dotnet/downloads/index.html
That said, Visual Studio itself is 32 bit, so if you want the developer tools to work, you'll need a 32 bit client. If you're not using the developer tools in your project and you're compiling your project for AnyCPU or x64, the 64 bit client will work. If you're compiling for x86, you need the 32 bit client. (If you want to do both, you'll need two clients installed.)
edit - Actually, it looks like in this case you might be running into a problem of needing a 32 bit client & ODBC connection. The error mesage could be misleading here as Visual Studio itself is 32 bit. Did you create the ODBC connection using control panel? If so, that's a 64 bit connection.
32 bit ones are created using c:\windows\syswow64\odbcad32.exe
Edited by: Tridus on Jan 3, 2013 3:24 PM
Edited by: Tridus on Jan 3, 2013 3:24 PM -
Attempting to Run 'Instant Client' via XCode on Mac OS X (v10.4.6)
Environment: OS X (10.4.6) on G4.
The Setup:
I used 'Oracle Instant Client Installer' {http://www.kyngchaos.com/} to install the necessary Oracle libraries here:
[Users/oracle]ls /usr/local/oracle/lib
libclntsh.10.1.dylib* libclntsh.so@ libnnz10.dylib@ libocci.dylib.10.1@ libocijdbc.dylib@
libclntsh.dylib@ libnnz.10.dylib* libocci.10.1.dylib* libociei.dylib* libocijdbc10.dylib@
libclntsh.dylib.10.1@ libnnz.dylib@ libocci.dylib@ libocijdbc.10.dylib*
I've read that LD_LIBRARY_PATH is rather "archaic" for the Mac OS X vs a directory of dylibs accessable directly from XCode.
2) I set the XCode 2.2.1 Library search Path as:
USER_HEADER_SEARCH_PATHS = /usr/local/oracle/sdk/include
LIBRARY_SEARCH_PATHS = /usr/local/oracle/lib
==============
So my questions are:
1) How do I find the available APIs?
I've looked at an on-line example but don't know what I'm doing.
I saw some source-code demo on-line so I essentially cut/pasted the following code.
The following is what I've done within the NSApp's Delegate method:
#include "/usr/local/oracle/sdk/include/oci.h"
static OCIEnv *p_env;
static OCIError *p_err;
static OCISvcCtx *p_svc;
static OCIStmt *p_sql;
static OCIDefine p_dfn = (OCIDefine ) 0;
static OCIBind p_bnd = (OCIBind ) 0;
int p_bvi;
char p_sli[20];
int rc;
char errbuf[100];
int errcode;
@implementation AppDelegate
- (id)init {
self = [super init];
if (self) {
rc = OCIInitialize((ub4) OCI_DEFAULT, (dvoid *)0, // Initialize OCI
(dvoid * (*)(dvoid *, size_t)) 0,
(dvoid * (*)(dvoid *, dvoid *, size_t))0,
(void (*)(dvoid *, dvoid *)) 0 );
// Initialize environment
rc = OCIEnvInit( (OCIEnv **) &p_env, OCI_DEFAULT, (size_t) 0, (dvoid **) 0 );
// Initialize handles:
rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_err, OCI_HTYPE_ERROR,
(size_t) 0, (dvoid **) 0);
rc = OCIHandleAlloc( (dvoid *) p_env, (dvoid **) &p_svc, OCI_HTYPE_SVCCTX,
(size_t) 0, (dvoid **) 0);
NSLog(@"{Appdelegate} Init.");
return self;
} // end init().
==============
What I get is:
test has exited due to signal 6 (SIGABRT).
[Session started at 2006-05-20 16:01:28 -0700.]
ZeroLink: unknown symbol '_OCIInitialize'
2) Am I on the right track or what am I doing wrong?
-- Oracle/OS X neopyte.
Ric.Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
Maybe you are looking for
-
when i switch on my Zen Micro it shows the Creative logo ,but doesnt proceed there after . Also i dont hear any sound on key events . When i get in to recovery mode im able to select the options ,if i select reload firmware it displays "erasing firmw
-
How can I reboot my Touch when the screen is frozen and I cannot use the "slide to power off" feature?
-
ITunes v/s Dell printer software - Help needed! At the end of my tether!
HI there In Jan I purachsed a new Dell printer and since this I have been unable to use my IPOD due to an error. I have been in contact with Dell, the IT dep rang me and advised that as the IPOD was mainly designed to work with the MAC system sometim
-
XQuery function : Adding day to current date
I have a requirement to add 1 day to the current date during the Xquery transformation. Does anyone know if there is any xquery function that does that? From this link, http://download.oracle.com/docs/cd/E13214_01/wli/docs92/xref/xqdtopref.html#wp116
-
Does anyone recognise this error?
java.rmi.ServerError: Error occurred in server thread; nested exception is: java.lang.ExceptionInInitializerError java.lang.ExceptionInInitializerError: java.lang.IllegalArgumentException: Unterminated quote <<no stack trace available>> I have a serv