Error Compiling php 5.1.6 with Oracle Instant Client 10.1.0.5 on Fedora 5
Hello
I have Oracle 10.1.0 enterprise database installed on a Windows 2003 server.
I have another machine that has Fedora Core 5 installed on it. I downloaded:
Apache 2.2.3
Php 5.1.6
OracleInstantClient 10.1.0.5 (base and skdk packages) from technet.oracle.com
I created a directory called /usr/lib/instantclient10_1 in which I unzipped
the files for the Oracle Instant Client and the SDK into /usr/lib/instantclient10_1.
So inside /usr/lib/instantclient10_1 I have:
all the unzipped filed from the base for the instant client as well as
a directory called sdk with files inside this subdirectory.
I compiled and installed Apache.
I then tried to configure php using the instantclient with the configure option
--with-oci8=instantclient/usr/lib/instantclient10_1
The first time I did this I got the error: "link from
/usr/lib/instantclient10_1/libclntsh.so to libclntsh.so.10
not found"
Well I had the libclntsh.so.10 but no such link. So I did the following:
ln -s libclntsh.so.10.1 libclntsh.so
I assume this was OK to do but I found it strange that I had to do this.
Question #1 - why should I have to do this?
I then tried to configure php again but got an error that I paste in from
the debug.log. From this debug log you can see the configure options I gave for
php as well as the error. It says "cannot find -lirc". Now I did put into
/etc/ld.so.conf the line /usr/lib/gaim since that is where libirc.so is and ran
ldconfig but it still complained. When I copied libirc.so into /usr/lib it then said there were
lots of errors in that libirc.so. The only item in the configure options depending on lirc is
the with-oci8. Why does with-oci8 depend on lirc?
I also tried the above on Red Hat AS 4.0 and got the same errors.
Question #2 -- what do I do?
Thank You
Gail Lange
Here is the debug.log in the case when libirc.so is just in /usr/lib/gaim:
CONFIGURE: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-track-vars'
'--enable-inline-optimization' '--with-gd' '--with-zlib' '--enable-debug'
'--with-oci8=instantclient,/usr/lib/instantclient10_1' '--enable-sigchild'
CC: gcc
CFLAGS: -I/usr/include -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES: -I/usr/include/libxml2 -I/home/gail/php/php-5.1.6/ext/date/lib
-I/usr/lib/instantclient10_1/sdk/include
LDFLAGS: -L/usr/lib -Wl,-rpath,/usr/lib/instantclient10_1 -L/usr/lib/instantclient10_1
LIBS: -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl
-lirc -lclntsh -lxml2 -lz -lm
DLIBS:
SAPI: apache2handler
PHP_RPATHS: /usr/lib/instantclient10_1
uname -a: Linux localhost.localdomain 2.6.15-1.2054_FC5smp #1 SMP Tue Mar 14 16:05:46 EST 2006
i686 i686 i386 GNU/Linux
gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/lib/instantclient10_1
-L/usr/lib/instantclient10_1 conftest.c -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm
-lxml2 -lz -lm -ldl -lm -lnsl -lirc -lclntsh -lxml2 -lz -lm 1>&5
conftest.c: In function 'main':
conftest.c:3: warning: incompatible implicit declaration of built-in function 'exit'
/usr/bin/ld: cannot find -lirc
collect2: ld returned 1 exit status
Thanks
To be perfectly honest, I'm not sure. Everything I could find on it had to do with IRC or some kind of remote control thing (for controlling audio/media players). Maybe if Ivan stops by he'll know what it means... he knows quite a lot about the inner workings of many of these libraries.
http://us3.php.net/install.unix was the most useful info I could find.
There's also this thread:
Cannot find ld -lirc PHP Linux
~Jer
Similar Messages
-
TOAD 8.5 with Oracle Instant Client 10: ORA-03134
Hi,
I have tried TOAD 8.5.0.50 and also TOra 1.3.16 to connect to the database via Oracle Instant Client 10, but I am restricted with this error message:
"ORA-03134: Connections to this server version are no longer supported."
Does anyone have any idea what is wrong? Earlier version of TOAD works alright. We are using Oracle 8i. Are there any compatibility issues between Oracle database version with Oracle Instant Client version?
Thanks.Just want to share with everyone. This is a reply that I got from another forum:
this is a oracle bug!
connections with the 10g client are supported to 8.1.7.0 and above.
the bug in the client causes this error.
you are only able to connect to 8.1.7.4 and above.
i made a service request but oracle is not able to patch the
instant client.
you have to use 10.1.0.3 client or above
Regards. -
Imp Exp utility in ubuntu 10.4 with oracle instant client 10
Hi,
I have a problem with the imp/exp utility on Ubuntu 10.4.
I have installed the oracle instant client 10, and I have followed this thread
[http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/impexp.htm#CHDDBGDF]
So, I've set env variable in my .bashrc
ORACLE_HOME=/home/lucia/Programmi/instantclient10_1
export ORACLE_HOME
LD_LIBRARY_PATH=/home/lucia/Programmi/instantclient10_1:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
PATH=/home/lucia/Programmi/instantclient10_1:${PATH}
export PATH
SQLPATH=/home/lucia/Programmi/instantclient10_1:${SQLPATH}
export SQLPATH
Sqlplus works fine, but when I try to use the utility exp/imp
exp DB_USER/DB_PW@DB_SCHEMA owner=DB_USER buffer=300000 LOG=DB_USER.log FILE=DB_USER.dmp compress=n
I have the following error:
No command 'exp' found, did you mean:
Command 'xep' from package 'pvm-examples' (universe)
Command 'ex' from package 'vim' (main)
Command 'ex' from package 'nvi' (universe)
Command 'ex' from package 'vim-nox' (universe)
Command 'ex' from package 'vim-gnome' (main)
Command 'ex' from package 'vim-tiny' (main)
Command 'ex' from package 'vim-gtk' (universe)
Command 'axp' from package 'axp' (universe)
Command 'expr' from package 'coreutils' (main)
Command 'expn' from package 'sendmail-base' (universe)
Command 'epp' from package 'e16' (universe)
exp: command not found
(I cannot use data pump exp)
Any suggestions?
thanks in advance.
Luciaroot@laptop:~# /tmp/CVU_11.2.0.1.0_lucia/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.1.0_lucia/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_lucia/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_lucia/orarun.log
[: 845: true: unexpected operator
[: 860: unexpected operator
Any suggestions?
thanks
LuciaHello,
I had the same problem. It was related to the shell script interpreter being used: it is really a bash script asking to be interpreted as sh. For the impatient, the solution was to change the first line of the script orarun.sh to read as:
#!/bin/bash
Explanation:
1. The script runfixup.sh calls orarun.sh. The latter is the one that fails starting at line 845.
2. The script is really a bash script as can be seen from the if syntax used. For example at line 191 we see the double equall sign ==:
if [ "`echo $SET_KERNEL_PARAMETERS | tr A-Z a-z`" == "true" ]
3. The bash man page says:
string1 == string2
string1 = string2
True if the strings are equal. = should be used with the test command for POSIX conformance.
string1 != string2
True if the strings are not equal.
(End of man page excerpt)
Notice in particular that for a bash script to be POSIX it should avoid the == and just use =
4. orarun.sh has on its first line #!/bin/sh. On my Ubuntu system, sh is a softlink to dash and the dash man page says:
s1 = s2 True if the strings s1 and s2 are identical.
s1 != s2 True if the strings s1 and s2 are not identical.
5. So this script script uses bash syntax but is interpreted by dash. It is possible that this worked fine for the Oracle developer if on their system sh was softlinked to bash (which is often the case). Apparently, one should then be very careful to not use idioms that are not POSIX compliant.
6. Another solution is to change the /bin/sh softlink from dash to bash. Personally, I was less comfortable doing this (the possible repercussions were wider than the proposed solution above).
After making the change, the script ran perfectly. I think the best solution is for Oracle to update the script to be POSIX compliant or to identify itself as bash.
Hope that helped,
Mark Gaber
Edited by: user1112514 on Jun 30, 2010 3:28 AM -
ORA-01816 when running with Oracle Instant Client
good morning
we are running the same SQL script on 2 computers.
- native system with DB
- via Oracle Instant client
when running via the instant client i get the following error.
( select to_char(to_date('1970-01-01') + "DATE" / 86400000, 'YYYY-MM-DD') "CD", logical_name
ERROR at line 2:
ORA-01861: literal does not match format string
thanks for any hintIt probably works on one and not the other because you have set the NLS_DATE_FORMAT for one system to match the format of the string you are passing in, so Oracle knows how to do the implicit conversion.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Oracle instant client & unixODBC did not work on Fedora 4
Dear experts,
Please try to fix the following problem.
I want to connect to oracle 10g on windows XP from client that runs Fedora 4 using ODBC.
*1. I installed oracle instant client on Fedora:*
• oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm
• oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
• oracle-instantclient11.2-odbc-11.2.0.1.0-1.i386.rpm
• oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.i386.rpm
*2. Set the following environment variables:*
• ORACLE_HOME =/usr/lib/oracle/11.2/client
• ORACLE_HOME_LISTNER=/usr/lib/oracle/11.2/client/bin
• LD_LIBRARY_PATH =/usr/lib/oracle/11.2/client/lib
• SQLPATH =/usr/lib/oracle/11.2/client/lib
• TNS_ADMIN =/usr/lib/oracle/11.2/client/bin
• TWO_TASK =//xxx.xxx.xxx.xxx:1521/orcl
*3. Test connection from Fedora to Windows and it works perfect.*
sqlplus system/pass@//xxx.xxx.xxx.xxx:1521/orcl
*4. Intsall unixODBC-2.3.0.tar.gz*
*5. Add Oracle ODBC entry in odbc.ini*
[ORCL]
Driver = Oracle 11g ODBC driver
ServerName = xxx.xxx.xxx.xxx
Database = orcl
DSN = ORCL
Port = 1521
*6. And this’s the Oracle ODBC driver entry in odbcinst.ini*
[Oracle 11g ODBC driver]
Description = Oracle ODBC driver for Oracle 11g
Driver = /usr/lib/oracle/11.2/client/lib/libsqora.so.11.1
Driver64 =
Setup =
Setup64 =
UsageCount =
CPTimeout =
CPReuse =
FileUsage =
*7. Now, isql -v orcl system pass, fails and reports the following error:*
[S1000][unixODBC][Oracle][ODBC][Ora]ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
[ISQL]ERROR: Could not SQLConnect
Here’s my tnsnames.ora:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
(CONNECT_DATA =
(SID = ORCL)
(SERVICE_NAME = ORCL)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
Here’s my listener.ora:
SID_LIST_ORCL =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
(ORACLE_HOME = /usr/lib/oracle/11.2/client)
(GLOBAL_NAME = ORCL)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /usr/lib/oracle/11.2/client)
(PROGRAM = extproc)
ORCL =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
Here’s my sqlnet.ora:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora, listener.ora & sqlnet.ora are at /usr/lib/oracle/11.2/client/bin
Please I’m waiting your help, sorry for long post.
Best regards,
Edited by: 788062 on Aug 15, 2010 2:32 PMIt works now after removing listener.ora & sqlnet.ora and modifying ServerName from xxx.xxx.xxx.xxx to //xxx.xxx.xxx.xxx:1521/orcl.
Thanks for your time. -
Hi,
I have both Oracle Client 9.2 and Instant Client 10.2.0.1.0 on my laptop. How to make Toad 8.5.1 locate tnsnames.ora file for instant client.
When I open Toad, and selects "Instant Client 10.2.0.1.0" as installed client, it shows the error message "tnsnames.ora not found!"
Below is the setting:
Instant Client - 10.2.0.1.0
ORACLE_HOME_NAME: C:\Program Files\PHP\
ORACLE_HOME: C:\Program Files\PHP\
ORACLE_SID:
NLS_LANG:
SQLPATH:
LOCAL:
C:\Program Files\PHP\ exists.
C:\Program Files\PHP\ is in PATH.
Client DLL: C:\Program Files\PHP\oci.dll
Client Version: 10.2.0.1.0
Home is valid.
Thanks
AshutoshSal, your comment is pretty irrelevant to the question :^)
user570251, since you are restricted to using Windows, it will not be easy for you to use two different Oracle clients on the same machine.
Basically, you'll have to change TNS_ADMIN whenever you want to change between clients.
Why do you need two client versions on your computer?
Yours,
Laurenz Albe -
PHP 5.2.2 with Oracle support on AIX5.3 aix64
Hello,
I am trying to compile PHP 5.2.2 with Oracle Instant Client support on an AIX 5.3 64 bit system.
(Below, $CV contains /opt/freeware/CV2)
I have installed Oracle Instant Client 10.1 (both base and sdk for AIX 64 bit) in directory: $CV/instantclient10_1
I have executed the following commands in that directory:
# ln -s libclntsh.a libclntsh.so
# ln -s libclntsh.a libclntsh.so.10.1
configure doesn't accept Oracle Instant Client 10.2.
The configure line for PHP is as follows:
./configure prefix=$CV with-apxs2=$CV/apache2/bin/apxs with-config-file-path=$CV/lib with-gd with-pear with-gettext with-mime-magic with-zlib-dir=/opt/freeware/lib with-png with-zlib with-jpeg-dir=/opt/freeware/lib with-png-dir=/opt/freeware/lib with-freetype-dir=/opt/freeware/lib with-mysql=$CV/mysql with-oci8=instantclient,$CV/instantclient10_1 enable-sigchild
Configure runs fine but when I run gmake, I get the following errors:
In file included from /opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:50:
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/php_oci8_int.h:354: error: parse error before 'oraub8'
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c: In function 'php_oci_init_global_handles':
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:436: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c: In function 'php_oci_fetch_errmsg':
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:925: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:932: warning: pointer targets in passing argument 1 of '_estrndup' differ in signedness
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:932: warning: pointer targets in assignment differ in signedness
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c: In function 'php_oci_do_connect_ex':
/opt/freeware/BUILD/CV2/php-5.2.2/ext/oci8/oci8.c:1044: warning: pointer targets in passing argument 2 of 'OCINlsCharSetNameToId' differ in signedness
gmake: *** [ext/oci8/oci8.lo] Error 1
I have also tried "--with-oci8-instant-client=$CV/instantclient10_1" instead of --with-oci8=... on the configure command line. That configured fine and gmake finished succesfully but when I tried, none of the oci_ or oci functions were known.
I have seen this problem a few number of times on the internet but nobody was able to provide a solution. PHP claims: "This is Oracle bug 4901517." but I have been unable to find it.
Can someone please help me out?
THANX.
Greetinx
JohanHi,
I am having the same issue, (php 5.1.4, AIX 5.2, instant client 10.1). I tried cj's solution, it got me up to the linking part, but dies when trying to create sapi/cgi/php with a lot of undefined symbols.
From the instructions I set the LIBPATH=/my_instant_client_dir.
Has anyone found what oratypes.h need to be changed to? Did this work for anyone else?
ld: 0711-317 ERROR: Undefined symbol: .OCIEnvInit
ld: 0711-317 ERROR: Undefined symbol: .OCIHandleAlloc
ld: 0711-317 ERROR: Undefined symbol: .OCIErrorGet
ld: 0711-317 ERROR: Undefined symbol: .OCIHandleFree
ld: 0711-317 ERROR: Undefined symbol: .OCIStmtPrepare2
ld: 0711-317 ERROR: Undefined symbol: .OCIStmtRelease
ld: 0711-317 ERROR: Undefined symbol: .OCIAttrSet
ld: 0711-317 ERROR: Undefined symbol: .OCIStmtFetch
ld: 0711-317 ERROR: Undefined symbol: .OCIStmtSetPieceInfo
ld: 0711-317 ERROR: Undefined symbol: .OCIStmtExecute
ld: 0711-317 ERROR: Undefined symbol: .OCIAttrGet
ld: 0711-317 ERROR: Undefined symbol: .OCIParamGet
ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorFree
ld: 0711-317 ERROR: Undefined symbol: .OCIDefineByPos
ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorAlloc
ld: 0711-317 ERROR: Undefined symbol: .OCILobGetLength
ld: 0711-317 ERROR: Undefined symbol: .OCILobFileClose
ld: 0711-317 ERROR: Undefined symbol: .OCILobFileOpen
ld: 0711-317 ERROR: Undefined symbol: .OCILobCharSetId
ld: 0711-317 ERROR: Undefined symbol: .OCILobRead2
ld: 0711-317 ERROR: Undefined symbol: .OCILobWrite
ld: 0711-317 ERROR: Undefined symbol: .OCILobDisableBuffering
ld: 0711-317 ERROR: Undefined symbol: .OCILobEnableBuffering
ld: 0711-317 ERROR: Undefined symbol: .OCILobCopy
ld: 0711-317 ERROR: Undefined symbol: .OCILobClose
ld: 0711-317 ERROR: Undefined symbol: .OCILobIsTemporary
ld: 0711-317 ERROR: Undefined symbol: .OCILobFreeTemporary
ld: 0711-317 ERROR: Undefined symbol: .OCILobFlushBuffer
ld: 0711-317 ERROR: Undefined symbol: .OCILobAppend
ld: 0711-317 ERROR: Undefined symbol: .OCILobTrim
ld: 0711-317 ERROR: Undefined symbol: .OCILobErase
ld: 0711-317 ERROR: Undefined symbol: .OCILobIsEqual
ld: 0711-317 ERROR: Undefined symbol: .OCILobCreateTemporary
ld: 0711-317 ERROR: Undefined symbol: .OCILobOpen
ld: 0711-317 ERROR: Undefined symbol: .OCIDateToText
ld: 0711-317 ERROR: Undefined symbol: .OCIBindByName
ld: 0711-317 ERROR: Undefined symbol: .OCIBindObject
ld: 0711-317 ERROR: Undefined symbol: .OCIBindDynamic
ld: 0711-317 ERROR: Undefined symbol: .OCIDateFromText
ld: 0711-317 ERROR: Undefined symbol: .OCITypeByName
ld: 0711-317 ERROR: Undefined symbol: .OCIDescribeAny
ld: 0711-317 ERROR: Undefined symbol: .OCITypeByRef
ld: 0711-317 ERROR: Undefined symbol: .OCIObjectNew
ld: 0711-317 ERROR: Undefined symbol: .OCICollSize
ld: 0711-317 ERROR: Undefined symbol: .OCICollMax
ld: 0711-317 ERROR: Undefined symbol: .OCICollTrim
ld: 0711-317 ERROR: Undefined symbol: .OCICollAppend
ld: 0711-317 ERROR: Undefined symbol: .OCINumberFromReal
ld: 0711-317 ERROR: Undefined symbol: .OCIStringAssignText
ld: 0711-317 ERROR: Undefined symbol: .OCICollGetElem
ld: 0711-317 ERROR: Undefined symbol: .OCINumberToReal
ld: 0711-317 ERROR: Undefined symbol: .OCIStringPtr
ld: 0711-317 ERROR: Undefined symbol: .OCICollAssignElem
ld: 0711-317 ERROR: Undefined symbol: .OCICollAssign
ld: 0711-317 ERROR: Undefined symbol: .OCIObjectFree
ld: 0711-317 ERROR: Undefined symbol: .OCIEnvNlsCreate
ld: 0711-317 ERROR: Undefined symbol: .OCIServerAttach
ld: 0711-317 ERROR: Undefined symbol: .OCISessionBegin
ld: 0711-317 ERROR: Undefined symbol: .OCIPasswordChange
ld: 0711-317 ERROR: Undefined symbol: .OCINlsCharSetNameToId
ld: 0711-317 ERROR: Undefined symbol: .OCINlsEnvironmentVariableGet
ld: 0711-317 ERROR: Undefined symbol: .OCIServerVersion
ld: 0711-317 ERROR: Undefined symbol: .OCITransRollback
ld: 0711-317 ERROR: Undefined symbol: .OCITransCommit
ld: 0711-317 ERROR: Undefined symbol: .OCIServerDetach
ld: 0711-317 ERROR: Undefined symbol: .OCISessionEnd -
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. -
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. -
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 is a memory hog?
Hi all,
I am having (potentially) an issue that I need to confirm with folks out there. I am not a DBA - I have a decent understanding of SQL and have been exposed to several RDBMS's, but this is my first time developing in PHP specifically with Oracle in mind.
First, my setup (note this is for development, not production; ultimately, the final deployed environment will be 2 high-end SPARC servers (one for web, one for db)):
1. DEV: Webserver running Solaris 10, Apache 2.0.52 and PHP 5.1.2 and Oracle Instant Client v.10.1.0.3 (note all versions except PHP haven been dictated by the customer). PHP is compiled with apxs2, postgres, sqlite-utf8 and oracle support (hooked into instant client).
2. DEV: DB server running Oracle 10g on Windows 2003. Using stock configuration.
I have a PHP application using AdoDB for abstraction and Smarty for templating; also using Fusebox.
The whole setup as described above works flawlessly. I notice that the apache process(es) usually sit between 20-25M given the LoadModule configuration in Apache, and the extensions being loaded in PHP. Whenever I make connection to postgres, or sqlite, the processes stay within the described memory usage patterns above (so 20-25M).
However, whenever I attempt making a connection using the Oracle Instant Client (using either native OCI8 or adoDB calls, using both persistent and non-persistent connections), the Apache process jumps from a meager 20-25M to 85M+... I don't even have to do a select - just the very action of establishing the connection results in this jump in memory usage.
What I need to know is - is this normal? Is it normal for the client to have this size of a footprint on memory? If so, I need to ensure that the final deployed environment is capable of handling these kinds of jumps. If this is NOT normal, well, heck folks, I need some friendly pointers.
Any and all help would be greatly appreciated.
Thanks,I emailed the OCI team and got this:
'Basically, the data shared library, which is about 85MB, gets mapped to the process
virtual address when it is initially loaded by dlopen(). However, only the pages needed
by the application are actually mapped to the physical memory, and they get swapped
out by OS unless re-used. The data shared library is loaded as a shareable read-only
const data. Therefore, a process memory map should show that it is shared among all
Apache processes.'
Some linking quirks on various platforms were ironed out pretty early, but on Solaris, if
you have metalink access, check out bug 4304233 .
There is an Instant Client forum at Instant Client
-- cj -
Import error imp-00017: following statement failed with oracle error 1659:
Hi all,
I am trying to import a file (dmp) which is of 1.63GB size,
when I type
imp
dbname/pwd@db
c:\filepath
30720
no
no
yes
yes
yes
I am getting the error imp-00017: following statement failed with oracle error 1659:
-- end it says Ora-01659 unable to allocate minextents beyond 1 in tablespace USERS
--unable to create INITIAL extent for segment in tablespace USERS
--import terminated successfully with warnings
when I looked into
select maxbytes,file_name from dba_data_files where tablespace_name='USERS';3.4360+10 c:\oracle\product\10.2.0\oradata\orcl\users01.dbf
kindly help me in solving this is.
Regards,
aak
Edited by: AAK 460425 on Apr 12, 2009 6:33 PMThanks,
select bytes from user_free_space where tablespace_name='USERS'
BYTES
458752
720896
458752
655360
43384832
is the size less?
My apology I have updated this in the below thread, which is same as this one.
Re: Import error -
PHP 4.3.11 Oracle Instant Client 10.1.0.4 and my firewall
I've successfully compiled php with oci8 instant client support.
The web server is in the DMZ and Oracle on a windows machine in my
local net .. I've set up my firewall to allow the communication
betweeen my web server and the oracle machine by freeing the
standard port 1521.
when I call the ociplogin function I pass as server argument //192.168.10.3:1521/medDB which match my oracle server configuration.
As result I become
Warning: ociplogon(): ociopen_server: ORA-12541: TNS:no listener
Well I've checked my firewall ad I noticed it blocked connections from
my web server to my oracle on the port 1035.
Today I rebooted the web server .. restarted apache
and on the firewall I had the same blocking
but this time on the port 1044.
Someone knows something about this strange behaviour ?
thank you in advance
AlexHi,
Here is the link where you can find the ports : http://www.freshports.org/search.php?query=linux-oracle-instantclient-&search=go&num=10&stype=name&method=match&deleted=excludedeleted&start=1&casesensitivity=caseinsensitive
One question :
I'm trying to run sqlplus, but have a pb of version :
(sh)$ sqlplus
sqlplus: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /compat/linux/usr/lib/oracle/10.2.0.1.20050713/client/lib/libsqlplus.so)
sqlplus: /lib/libpthread.so.0: version `GLIBC_2.3.2' not found (required by /compat/linux/usr/lib/oracle/10.2.0.1.20050713/client/lib/libclntsh.so.10.1)
sqlplus: /lib/libc.so.6: version `GLIBC_2.3.3' not found (required by /compat/linux/usr/lib/oracle/10.2.0.1.20050713/client/lib/libclntsh.so.10.1)
sqlplus: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /compat/linux/usr/lib/oracle/10.2.0.1.20050713/client/lib/libclntsh.so.10.1)
sqlplus: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /compat/linux/usr/lib/oracle/10.2.0.1.20050713/client/lib/libnnz10.so)
I had the same problem when I tried to compile directly from the client.
I can't find GLIBC_2.3.3 on FreeBSD 5.3.
Do you know if it works with another version of FreeBSD ? or should I install an emulator (I tried red hat 8.8, but doesn't work)? I tried to compile glib2.3.3, but it hasn't been ported on FreeBSD.
Anyway, I will try with redhat9.
Thanks,
Basha -
PLease help!! cannot make install php with oci8 instant client
Cannot make install :
Installing PHP SAPI module: cgi
Installing PHP CGI into: /usr/local/bin/
Installing PEAR environment: /usr/local/lib/php/
ld.so.1: php: fatal: libnnz10.so: open failed: No such file or directory
*** Error code 137
The following command caused the error:
/home/dmitriy/install/php-4.4.4/sapi/cli/php -n -dshort_open_tag=0 -dopen_basedir= -dsafe_mode=0 -dmemory_limit=-1 /home/dmitriy/install/php-4.4.4/pear/install-pear.php -d "/usr/local/lib/php" -b "/usr/local/bin" /home/dmitriy/install/php-4.4.4/pear/packages/*.tar
make: Fatal error: Command failed for target `install-pear-packages'
Current working directory /home/dmitriy/install/php-4.4.4
*** Error code 1
The following command caused the error:
if /home/dmitriy/install/php-4.4.4/build/shtool mkdir -p /usr/local/lib/php; then \
make -s install-pear-packages; \
else \
cat /home/dmitriy/install/php-4.4.4/pear/install-pear.txt; \
exit 5; \
fi
make: Fatal error: Command failed for target `install-pear'
LD_LIBRARY_PATH is set where i unziped oracle client instantclient
debug.log
CONFIGURE: './configure' '-with-oci8-instant-client=/home/dmitriy/instantclient_10_2'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS
CXX:
CXXFLAGS:
INCLUDES: -I/home/dmitriy/instantclient_10_2/sdk/include
LDFLAGS: -R/usr/ucblib -L/usr/ucblib -R/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -R/home/dmitriy/instantclient_10_2 -L/home/dmitr
iy/instantclient_10_2
LIBS: -lresolv -lm -lnsl -lsocket -lgcc -lclntsh
DLIBS:
SAPI: cgi
PHP_RPATHS: /usr/ucblib /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 /home/dmitriy/instantclient_10_2
uname -a: SunOS solaris 5.10 Generic_118855-33 i86pc i386 i86pc
gcc -o conftest -g -O2 -D_POSIX_PTHREAD_SEMANTICS -R/usr/ucblib -L/usr/ucblib -R/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -L/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3 -R/home/d
mitriy/instantclient_10_2 -L/home/dmitriy/instantclient_10_2 conftest.c -lresolv -lm -lnsl -lsocket -lgcc -lclntsh 1>&5
ld.so.1: conftest: fatal: libnnz10.so: open failed: No such file or directoryPlease grab the "re-factored" oci8 code from http://pecl.php.net/package/oci8. The version of oci8 distributed with PHP 4 should be avoided. Replace the PHP 4.4 ext/oci8 directory completely with the new package, run buildconf --force and then configure/make etc. Note the configure option for instant client has changed:
--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib
-- cj -
Hi,
on a windows 2008 machine that has the Oracle instant client 11_1 installed (11.01.00.06) i am calling SQLDriverConnect in the following way:
std::string str = "Driver={Oracle in instantclient11_1};Dbq=//10.10.101.66:1521/orcl;;Uid=myUser;pwd=a;b";
odbcRc = SQLDriverConnect(hdbc, NULL, (SQLTCHAR*)str.c_str(), str.size(), (SQLTCHAR*)szConnStrOut, 1024, &cbConnStrOut, SQL_DRIVER_NOPROMPT)) == SQL_ERROR);
as long as the password contains no special chars (namely semicolon) it works fine. but when I try to use special chars in the password It stops working, with an invalid username/password error.
State: 28000 Native error: 1017 Message: [Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied
i tried different variations of adding " (\") over the password, over the entire pwd=a;b or braces { but nothing seems to work.
the thing is that using ODBC works! what I did was:
open ODBC, go to System DSN tab, add "Oracle in instantclient11_1", then fill the following information:
Data source name: Anything
TNS Service Name: //10.10.101.66:1521/orcl
User ID: myUser
then i press test connection, enter the password "a;b"
and it works!
I cannot figure out what's my problem.
Thanks,
Roy.I've created your test table in my Oracle database using this extra character and I'm able to describe it properly.
SQL> desc test;
Name Null? Type
ATTIVITÀ VARCHAR2(40)
My character set being used is:
SQL> select * from v$nls_parameters;
NLS_CHARACTERSET
WE8ISO8859P15
NLS_NCHAR_CHARACTERSET
AL16UTF16
NLS_LENGTH_SEMANTICS
BYTE
So as long as it doesn't work for you in your native Oracle database I don't think it would work with DG4ODBC. So yes, it would be best to log a service request so that the Oracle database support can check out the NLS issue.
Edited by: kgronau on Sep 28, 2011 9:21 AM
To be complete here the describe of the MySQL table native and using DG4ODBC:
mysql> create table TEST (attività Varchar(40));
Query OK, 0 rows affected (0.00 sec)
mysql> desc TEST;
---------------------------------------------------+
| Field | Type | Null | Key | Default | Extra |
---------------------------------------------------+
| attività | varchar(40) | YES | | NULL | |
---------------------------------------------------+
1 row in set (0.00 sec)
SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 28 09:20:17 2011
SQL> desc "gateway"."TEST"@MYSQL_DG4ODBC_EMGTW_1122_DB;
Name Null? Type
attività VARCHAR2(80)
So in general it should work.
Maybe you are looking for
-
IBE_INDIVIDUAL customer default values for iStore walk in user
We have enabled walk-in user IBE_INDIVIDUAL for iStore.No approval required for this type of users and they can start shopping/place order right away after registration. How can we make sure that certain values are defaulted for this PERSON type of c
-
Timeout with error when starting playback of movie?
It appears that my Apple TV (2nd gen - w/uptodate software) often has trouble starting the playback of locally hosted movies. Once a movie has begun to be played back, there is never a problem with the continuation of playback or any other playback i
-
Need to find where my mac pro is registered
I registered my mac pro need to find out where i registered it too. This is not a personal mac, but one registered for my company, need to clone the info for a new purchase.
-
How do you use align and distribute in PSE11?
I need a complete work-up on using align and distribute in Elements 11.
-
I store my music library on an external drive and periodically back up the library to another external ( only when Itunes is not up). Recently I backed up my music library again, and the next time I went into Itunes to download some more music, Itune