Operating System - HP-UX
1751691 Members
4654 Online
108781 Solutions
New Discussion юеВ

Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

 
ajay_2
Occasional Contributor

Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

What are the additional configurations parameter required for using PHP/Apacahe2 with Oracle 817 64bit DB on HPUX11 64bit systems. It alway complians about shared libraries on the system.
5 REPLIES 5
Yogeeraj_1
Honored Contributor

Re: Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

hi,

make sure that you have compiled PHP with the option --with-oracle[=DIR], where DIR defaults to your environmment variable ORACLE_HOME.

hope this helps!

best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
ajay_2
Occasional Contributor

Re: Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

Compile time options included with-oci8 and with-oracle. Problem seems to HP libraries and have applied latest HP linker patch on the system
Ravi_8
Honored Contributor

Re: Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

Hi,

is the kernel parameters are as per oracle recomendation?
never give up
Yogeeraj_1
Honored Contributor

Re: Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

hi,

Are you using PHP-4.0.6?

If yes, you will have to modify the php-4.0.6/configure file because of Oracle changes after version 8.1.5.

Oracle decided to change the "orainst" directory name since version 8.1.5 to "install" in the $ORACLE_HOME directory. Therefore the script cannot open the file called "unix.rgs" there ! Configure script can not find oracle version so it returns always 7.3 as ORACLE_VERSION.

SOLUTION:

In php-4.0.6/configure file comment out (#) lines between 34050 - 34068. and then write manually ORACLE_VERSION=8.1 to line 34070

#echo $ac_n "checking Oracle version""... $ac_c" 1>&6 (34050. line)
#echo "configure:34052: checking Oracle version" >&5
#if test -s "$ORACLE_DIR/orainst/unix.rgs"; then
#ORACLE_VERSION=`grep '"ocommon"' $ORACLE_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
#test -z "$ORACLE_VERSION" && ORACLE_VERSION=7.3
#elif test -f $ORACLE_DIR/lib/libclntsh.s?.8.0; then
#ORACLE_VERSION=8.1
#elif test -f $ORACLE_DIR/lib/libclntsh.s?.1.0; then
#ORACLE_VERSION=8.0
#elif test -f $ORACLE_DIR/lib/libclntsh.a; then
#if test -f $ORACLE_DIR/lib/libcore4.a; then
#ORACLE_VERSION=8.0
#else
#ORACLE_VERSION=8.1
#fi
#else
#{ echo "configure: error: Oracle needed libraries not found" 1>&2; exit 1; }
#fi
#echo "$ac_t""$ORACLE_VERSION" 1>&6 (34068.line )

ORACLE_VERSION=8.1 #(34070. line)



and also comment out lines between 31537 - 31555 and then write manually ORACLE_VERSION=8.1 to line 31556

# echo $ac_n "checking Oracle version""... $ac_c" 1>&6 (31537. line)
#echo "configure:31539: checking Oracle version" >&5
# if test -s "$OCI8_DIR/orainst/unix.rgs"; then
# OCI8_VERSION=`grep '"ocommon"' $OCI8_DIR/orainst/unix.rgs | sed 's/ */:/g' | cut -d: -f 6 | cut -c 2-4`
# test -z "$OCI8_VERSION" && OCI8_VERSION=7.3
# elif test -f $OCI8_DIR/lib/libclntsh.s?.8.0; then
# OCI8_VERSION=8.1
# elif test -f $OCI8_DIR/lib/libclntsh.s?.1.0; then
# OCI8_VERSION=8.0
# elif test -f $OCI8_DIR/lib/libclntsh.a; then
# if test -f $OCI8_DIR/lib/libcore4.a; then
# OCI8_VERSION=8.0
# else
# OCI8_VERSION=8.1
# fi
#else
# { echo "configure: error: Oracle-OCI8 needed libraries not found" 1>&2; exit 1; }
# fi
# echo "$ac_t""$OCI8_VERSION" 1>&6

OCI8_VERSION=8.1 #(3156. line)

and finally issue following command to finish

#make clean
#./configure --with-oci8=/u01/app/oracle/product/8.1.7 --with-apxs=/www/bin/apxs --enable-track-vars --with-oracle=/u01/app/oracle/product/8.1.7 --enable-sigchild
#make
#make install

after adding following lines to httpd.conf file

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

and before restart apache, apache must be told where ORACLE LIB directory is. To accomplish this

#export $LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/u01/app/oracle/product/8.1.7/lib

if your oracle lib dir is different than /u01/app/oracle/product/8.1.7/lib change this with your $ORACLE_HOME/lib
and restart Apache by issuing the apachectl restart command.

===============================
[see also: http://www.enderunix.org/documents/eng/php_oracle_en.html]

hope this helps!

Best regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
ajay_2
Occasional Contributor

Re: Oracle 817 64 bit with PHP/Apache on HPUX 11 64bit

PHP version is 4.2.3 and Apache 2.0.43. Oracle 8.1.7

Able to configure sucessfully on Solaris 2.7 but not on HPUX 11 64bit. Always shared library problem.