provide some detailed instructions for oc8/linux install that leave no gaps

instructions that work for newbies

I've never heard of :



For example:

You should install OCI8 by yourself. Here is how:

1) Do this as user oracle: cd /tmp; pecl bundle oci8. The output should look 
like this:

-bash-3.00$ cd /tmp
-bash-3.00$ pecl bundle oci8
downloading oci8-1.3.4.tar ...
Starting to download oci8-1.3.4.tar (Unknown size)
.......................................................done: 1,053,184 bytes
Package ready at '/tmp/oci8'

Then, still as "oracle", do the following:
cd /tmp/oci8

The output will look something like this:
-bash-3.00$ cd /tmp/oci8
-bash-3.00$ phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519

If you now take a look at the directory, you will see the "configure" script. 
Run it as "oracle" because it needs the ORACLE_HOME environment variable. That 
will produce an output that
should look like this:

checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h

After that, still as "oracle", you should run "make". The output should look 
like this:
/bin/sh /tmp/oci8/libtool --mode=link gcc -DPHP_ATOM_INC -I/tmp/oci8/include 
-I/tmp/oci8/main -I/tmp/oci8 -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/TSRM 
-I/usr/local/include/php/Zend -I/usr/local/include/php/ext 
-I/ORACLE/app/oracle/product/client/plsql/public -DHAVE_CONFIG_H -g -O2 -o -export-dynamic -avoid-version -prefer-pic -module -rpath 
/tmp/oci8/modules oci8.lo oci8_lob.lo oci8_statement.lo oci8_collection.lo 
oci8_interface.lo -Wl,-rpath,/ORACLE/app/oracle/product/client/lib 
-L/ORACLE/app/oracle/product/client/lib -lclntsh
gcc -shared .libs/oci8.o .libs/oci8_lob.o .libs/oci8_statement.o 
.libs/oci8_collection.o .libs/oci8_interface.o 
-L/ORACLE/app/oracle/product/client/lib -lclntsh -Wl,-rpath 
-Wl,/ORACLE/app/oracle/product/client/lib -Wl,-soname -Wl, -o 
(cd .libs && rm -f && ln -s ../
/bin/sh /tmp/oci8/libtool --mode=install cp ./ /tmp/oci8/modules
cp ./.libs/ /tmp/oci8/modules/
cp ./.libs/oci8.lai /tmp/oci8/modules/
PATH="$PATH:/sbin" ldconfig -n /tmp/oci8/modules

After that, you should switch to the "root" user and run "make install. Here is 
the output:
-bash-3.00$ su
Terminal type is vt100.
Erase is backspace.
Kill is control-X (^X).
[EMAIL PROTECTED] oci8# make install
Installing shared extensions: 

Now, you should adjust the value of "extension_dir" php.ini parameter to point 
to that
directory, check that you have something like in your php.ini 
and restart your Apache server. Voila, you are done.

I have 11g1 enterprise on Fedora 9 and wonder why I need oracle instant 
client....maybe just to make it work! Baloney

OTN Forum is loaded with post about not being able to connect!

The following does not work on my computer Fedora 9

<?php // File: anyco.php
   (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
if ($conn=oci_connect('hr', 'hr', $db))
 echo "Successfully connected to Oracle.\n";
 // OCILogoff($conn);
 $err = OCIError();
 echo "Oracle Connect Error " . $err['message'];



PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to