note 44814 added to ref.oracle
| From: | spam2004 at turniton dot dk | Date: | Tue, 17 Aug 2004 13:32:47 +0000 |
| Subject: | note 44814 added to ref.oracle | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74812@lists.php.net to get a copy of this message | ||
I had a hard time getting Oracle to work with the new PHP5 - here is a short step by step guide that
may be usefull to others..
Oracle installation problems and workarounds for Fedora2 and Debian..
1) Get the oracle client stuff and put it into /usr/lib/oracle..
My output from "ls -R /usr/lib/oracle/"
/usr/lib/oracle/:
10.1.0.2
/usr/lib/oracle/10.1.0.2:
client
/usr/lib/oracle/10.1.0.2/client:
lib
/usr/lib/oracle/10.1.0.2/client/lib:
classes12.jar libclntsh.so libclntsh.so.10.1 libnnz10.so libocci.so.10.1 libociei.so
libocijdbc10.so ojdbc14.jar
2) Set the ORACLE environment vars
export ORACLE_HOME=/usr/lib/oracle/10.1.0.2/client/
export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.2/client/lib
export NLS_LANG=DANISH
3) Get the oracle source files
nzerror.h oci1.h ociap.h ocidef.h ocidfn.h oci.h ocikpr.h ori.h oro.h nzt.h oci8dp.h
ociapr.h ocidem.h ociextp.h ocikp.h oratypes.h orl.h ort.h
4) edit the file oci.h and add a line in the top below the comments
#define OCI_NLS_CHARSET_ID 0
5) Copy the oracle source files (.h and .c) files to
php-5.0.0/ext/oci8/ and also copy them to php-5.0.0/main/
6) Goto the php-5.0.0. dir and do a ./configure --with-oci8 and other stuff you need..
7) make install
8) Add these lines to /etc/rc.d/initd/httpd
export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.2/client/lib
export NLS_LANG=DANISH
export ORACLE_HOME=/usr/lib/oracle/10.1.0.2/client/lib
export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.2/client/lib
export TZ=GMT
export NLS_DUAL_CURRENCY='.'
# Notice the line export NLS_DUAL_CURRENCY='.' is needed to get the stuff to run correctly
on Fedora 2 .. otherwise you get a nasty misleading error about invalid username or password!.
----
Manual Page -- http://www.php.net/manual/en/ref.oracle.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44814
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44814&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44814&report=yes
Search -- http://master.php.net/manage/user-notes.php