Operating System - HP-UX
1834141 Members
2140 Online
110064 Solutions
New Discussion

bad magic number for shared library

 
Tammy Liang
Regular Advisor

bad magic number for shared library

I installed hpuxwsApache A.2.0.59.00 on HPUX 11.11. I started apache and can not use oci8.sl due to the bad magic number for shared library /users/oracle/product/9.2.0/lib/libclntsh.sl.9.0. Below is my SHLIB_PATH
SHLIB_PATH=/users/oracle/product/9.2.0/lib32:/users/oracle/product/9.2.0/lib:/opt/hpws/apache/php/lib/php/extensions:/opt/hpws/apache/lib:/opt/hpws/apache/lib/LDAP:/opt/hpws/apache/lib::/usr/local/lib

Below is chatr oci8.sl:

shared library
shared library dynamic path search:
SHLIB_PATH enabled second
embedded path enabled first /usr/local/lib
internal name:
oci8.sl
shared library list:
dynamic /opt/oracle/lib32/libclntsh.sl.9.0
dynamic /usr/lib/libc.2
shared vtable support disabled
static branch prediction disabled
executable from stack: D (default)
kernel assisted branch prediction enabled
lazy swap allocation disabled
text segment locking disabled
data segment locking disabled
third quadrant private data space disabled
fourth quadrant private data space disabled
third quadrant global data space disabled
data page size: D (default)
instruction page size: D (default)
nulptr references enabled

Thanks for any suggestion.

Tammy
take easy, enjoy life
11 REPLIES 11
Fabian Briseño
Esteemed Contributor
Tammy Liang
Regular Advisor

Re: bad magic number for shared library

Thanks for reply. I checked out these URLs.
2 of them can not be displayed. The other two do not help... I am using the sw bundle distrubed from HP. I did not compile any program.
take easy, enjoy life
Fabian Briseño
Esteemed Contributor

Re: bad magic number for shared library

Tammy Liang
Regular Advisor

Re: bad magic number for shared library

Still has problem.
Below is the export SHLIB_PATH.

export SHLIB_PATH=$ORACLE_HOME/lib32:$APACHE_PREFIX/php/lib/php/extensions:$SHLI
B_PATH


Below are the error messages from error_log file. Looks the oci8.sl is using /users/oracle/product/9.2.0/lib/libclntsh.sl.9.0 instead in lib32 library.

PHP Warning: PHP Startup: Unable to load dynamic library '/opt/hpws/apache/php/lib/php/extensions/oci8.sl' - Bad magic number for shared library: /users/oracle/product/9.2.0/lib/libclntsh.sl.9.0 in Unknown on line 0
[Fri Oct 26 09:40:49 2007] [notice] Apache/2.0.59 HP-UX_Apache-based_Web_Server (Unix) DAV/2 PHP/5.2.2 configured -- resuming normal operations
englb146 ...hpws/apache/logs #
take easy, enjoy life
Fabian Briseño
Esteemed Contributor

Re: bad magic number for shared library

More threads.


http://www.webservertalk.com/archive292-2004-9-392483.html


http://www.webservertalk.com/archive292-2005-7-1122087.html



http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=543174&admit=-682735245+1193427416713+28353475

I dont know if i already sent this thread but it explains something about mixing 32bit a 64bit libraries as a reason for "bad magic number" libraries.
Knowledge is power.
Tammy Liang
Regular Advisor

Re: bad magic number for shared library

Thanks for URL links again.
I do think the mix of 32 bit and 64 bit is the reason. Do you know where I can download the latest verion of hpuxwsApache that run on hpux 11.11 PA-RISC2 64 bit?

Tammy
take easy, enjoy life
Fabian Briseño
Esteemed Contributor

Re: bad magic number for shared library

Tammy.
Dont know if this is related but have you checked file permissions, and group permission.
Knowledge is power.
Tammy Liang
Regular Advisor

Re: bad magic number for shared library

I did. They are 755.
englb146 ...product/9.2.0/lib # ll libclntsh*
lrwxr-xr-x 1 root sys 16 Feb 10 2006 libclntsh.sl -> libclntsh.sl.9.0
-rwxr-xr-x 1 oracle dba 13647280 Apr 1 2003 libclntsh.sl.9.0
englb146 ...product/9.2.0/lib # cd ../lib32
englb146 ...product/9.2.0/lib32 # ll | grep libclntsh
lrwxr-xr-x 1 oracle dba 16 Feb 10 2006 libclntsh.sl -> libclntsh.sl.9.0
lrwxrwxr-x 1 root sys 16 Oct 25 16:32 libclntsh.sl.8.0 -> libclntsh.sl.9.0
-rwxr-xr-x 1 oracle dba 16310272 Apr 1 2003 libclntsh.sl.9.0
englb146 ...product/9.2.0/lib32 #
take easy, enjoy life
Fabian Briseño
Esteemed Contributor

Re: bad magic number for shared library

Here's another link.
see if this helps.


http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSSUITE
Knowledge is power.
Tammy Liang
Regular Advisor

Re: bad magic number for shared library

Thanks. I download the depot from the link you sent and run into the bad magic number.
take easy, enjoy life
Dennis Handly
Acclaimed Contributor

Re: bad magic number for shared library

>I did. They are 755.
englb146 ...product/9.2.0/lib # ll libclntsh*

What does file(1) show for that file and the ones in lib32/?