Something that I'd like to share with you!

Wednesday, August 13, 2008

Enabling OCI8 for XAMPP under Linux

1 comment :
Following instruction from
here are my output.

My case is similar to this problem. The only different is, I have* which is older than the expected version. BTW, my OS is SLES 9.3. First thing to do is to download Oracle Instant Client version 10 to match the expected version from;

It is recommended to download .gz version than .rpm version since the .gz version is quite easy to be extracted. My case, I accidentally downloaded the .rpm version. So to extract it need special rpm2cpio command as below.

normuser@MYSERVER:~/OC> ls -al
total 32048
drwxr-xr-x 2 normuser normgroup 112 2008-08-12 13:03 ./
drwxr-xr-x 13 normuser normgroup 784 2008-08-12 13:03 ../
-rw-r--r-- 1 normuser normgroup 32782200 2008-08-12 12:55 oracle-instantclient-basic-

normuser@MYSERVER:~/OC> rpm2cpio oracle-instantclient-basic- | cpio -idv

Now, copy all .so files into xampp lib directory named /opt/lampp/lib/.

MYSERVER:/apps/home/normuser/OC/usr/lib/oracle/ # cp * /opt/lampp/lib/

Next is to issue the lampp oci8 command by telling the program that the expected libs are at /opt/lampp/lib/ as root since xampp is under root.

MYSERVER:/opt/lampp # ./lampp oci8
Please enter the path to your Oracle or Instant Client installation:
[/opt/oracle] /opt/lampp/lib
installing symlink...
patching php.ini...
OCI8 add-on activation likely successful.
XAMPP: Stopping Apache with SSL...
XAMPP: Starting Apache with SSL (and PHP5)...

Now you can test your connection with some PHP example code from

1 comment :

chathuranga bandara said...

This nice and work well Thanks