Oracle extension

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mwagz
Forum Newbie
Posts: 2
Joined: Wed Mar 14, 2007 3:30 am

Oracle extension

Post by mwagz »

If I uncomment 'extension=oci8.sl' in /opt/hpws/apache/php/conf/php.ini and set the appropriate oracle variables in apachectl, do i need to recompile php to enable the oci8 module.

As of now the oci8 does not appear loaded when I do phpinfo() and i cant run ocilogon, i get call to undefined function when i try. I have already restarted apache a couple of times.

Any help?



OS :HP-UX
mwagz
Forum Newbie
Posts: 2
Joined: Wed Mar 14, 2007 3:30 am

Post by mwagz »

I have followed the following steps to enable the
oracle extension for php on hp ux

1. Uncomment the following line in /opt/hpws/apache/conf/php.ini

extension=oci8.sl

2. Uncomment and set appropriate values for the following
variables in apachectl:

export ORACLE_HOME = /path/to/oracle-8.1.6/client/side/libraries
export SHLIB_PATH=$SHLIB_PATH:$ORACLE_HOME/lib
export LD_PRELOAD=$LD_PRELOAD:$ORACLE_HOME/JRE/lib/PA_RISC/native_thread
s/libjava.sl
export ORACLE_SID=ConnectionName

3. I have edited my httpd.conf and added
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php

4. I have restarted apache and still I get the error
Call to undefined function ocilogon()

Any
help?
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

mwagz wrote:1. Uncomment the following line in /opt/hpws/apache/conf/php.ini
is that the correct php? Please check

Code: Select all

echo 'ini: ', get_cfg_var('cfg_file_path');
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

paste your

Code: Select all

phpinfo();
information here. Generally on any linux , you need to compile PHP with the following options

Code: Select all

./configure
 --with-oracle=/path/to/oracle/home/dir
  --with-oci8=/path/to/oracle/home/dir
Post Reply