Operating System - HP-UX
1823759 Members
4715 Online
109664 Solutions
New Discussion юеВ

PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

 
N.S.Sreenivas
Occasional Contributor

PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

Hi All,

Now we are having problem in compiling PHP 5 with --with-oci8=$ORACLE_HOME option.

make is exiting with error the below error

***********************
/usr/ccs/bin/ld: /pp/ora920/product/9.2.0/lib/libclntsh.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.
*** Error exit code 1

Stop.
************************

After searching on the net, we have tried changing the env setting as below, to point oracle 32 bit client libs. But did not work
-----------------------------
SHLIB_PATH=/pp/ora920/product/9.2.0/lib32:
and
LDFLAGS=-L/pp/ora920/product/9.2.0/lib32
------------------------------

Any suggestions or work around would be of great help..

Thanks in advance,

6 REPLIES 6
Alex Lavrov.
Honored Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

Why do you want to compile it as 32bit?
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Bart Paulusse
Respected Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

Hi,

I had the same problem. Somehow the Makefile contains reference tot the 64-bit lib-directory instead of the 32 bit lib-directory.
I haven't found the cause of this problem so I resorted to change the Makefile.

cp Makefile Makefile.org

sed "s#/pp/ora920/product/9.2.0/lib#/pp/ora920/product/9.2.0/lib32#g" Makefile.org Makefile

then run make.

regards,

Bart


ps. are you using apache1.x or 2? I couldn't get php5 compiled as DSO for apache2 so I used apache1.x with PHP as static module.
Ermin Borovac
Honored Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

Bart is right. You need to replace references to Oracle 64-bit with 32-bit paths.

Other choice would be to modify configure file and all relevant lines as follows

ORACLE_DIR/lib -> ORACLE_DIR/lib32
OCI_DIR/lib -> OCI_DIR/lib32
N.S.Sreenivas
Occasional Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

Hi Ermin,

Changing OCI8_DIR --> ORACLE_HOME/lib32 in configure file worked.

There was no error when 'make' was executed and libphp5.so is created.

But apache does not start, we have "Unresolved external" error when apache tries to load libphp5.so module.

Would appreciate any help!

Thanks,

Alex Lavrov.
Honored Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

You must set environment variables for apache, so it will be able to search for the libraries in the additional directories.

http://httpd.apache.org/docs/env.html
I don't give a damn for a man that can only spell a word one way. (M. Twain)
Ermin Borovac
Honored Contributor

Re: PHP 5 and Oracle 9i on HP UX 11.11 configuration problem..

You must set ORACLE_HOME before starting apache.

You are starting httpd with apachectl, right? If not, make sure SHLIB_PATH contains /lib.

Otherwise do 'ldd -v' and 'ldd -r' on libphp5.so and check the output.