Get mod_auth_oracle to work on Freebsd

Iu hh iuhh at hotmail.com
Mon Jun 27 10:06:32 GMT 2005


Hi guys,

I'm desparate for some help with installing mod_auth_oracle on my Freebsd 
server.  I'm trying to get Apache to authenticate against u/p database held 
in our Oracle database, as we are moving from single server to multiple 
servers, a distributed authentication is really important for us.  btw I'm 
using Apache 2.0.54, Oracle client 10.1.0.3 and mod_auth_oracle 1.1.1.

First of all I've installed all three oracle instant client ports, then I've 
tried to compile mod_auth_oracle from source as there's no freebsd port.  
I've made the following modifications to the Makefile:
@@ -4,9 +4,9 @@
##

builddir=.
-top_srcdir=/etc/httpd
-top_builddir=/etc/httpd
-include /usr/lib/httpd/build/special.mk
+top_srcdir=/usr/local/share/apache2
+top_builddir=/usr/local/share/apache2
+include /usr/local/share/apache2/build/special.mk

#   the used tools
APXS=apxs
@@ -17,7 +17,7 @@
DEFS=-DOCI7
INCLUDES=-I${ORACLE_HOME}/rdbms/demo
else
-INCLUDES=-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public
+INCLUDES=-I${ORACLE_HOME}/rdbms/demo -I${ORACLE_HOME}/rdbms/public 
-I/usr/local/include/apache2 
-I/compat/linux/usr/include/oracle/10.1.0.3/client
endif
SH_LIBS=-L${ORACLE_HOME}/lib/ -lclntsh


Then I added enviromental variable, compiled and installed mod_auth_oracle, 
all went OK.
export ORACLE_HOME=/usr/compat/linux/usr/lib/oracle/10.1.0.3/client/
gmake && gmake install

Finally I've added the following line to httpd.conf:
LoadModule auth_oracle_module    libexec/apache2/mod_auth_oracle.so
AddModule mod_auth_oracle.c
PassEnv ORACLE_HOME TNS_ADMIN NLS_LANG

However, when I tried to restart apache with the new module, I've got the 
following error:
# apachectl -t
Syntax error on line 283 of /usr/local/etc/apache2/httpd.conf:
Cannot load /usr/local/libexec/apache2/mod_auth_oracle.so into server: 
Shared object "libclntsh.so.10.1" not found, required by 
"mod_auth_oracle.so"

I tried to tweak the library path as follows:
export 
LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/compat/linux/lib:/usr/compat/linux/usr/lib/oracle/10.1.0.3/client/lib:/usr/compat/linux/usr/share/oracle/10.1.0.3/client:/usr/compat/linux/usr/include/oracle/10.1.0.3/client
and tested apache again, got even worse results:
# apachectl -t
Bus error (core dumped)

I suspect this is a result of mix and matching linux compatibility library 
and native fbsd library; however I've ran out of options to fix this 
problem.  Here're some readable texts from the httpd.core, hope it's of any 
help...
...
NIS_DEFAULTS
unable to free arguments
NIS+: callback timed out
%s.%d.%d
NIS+: failed to register callback dispatcher
NIS+: failed to read local socket info
NIS+: out of memory allocating callback
/lib/ld-linux.so.2
...
svc_unix.c - cannot getsockname or listen
svcunix_create: out of memory
svc_unix: makefd_xprt: out of memory
DST not allowed in SUID/SGID programs
empty dynamic string token substitution
opening file=%s; opencount == %u
closing file=%s; opencount == %u
RTLD_NEXT used in code not dynamically loaded
/lib/ld-linux.so.2
...
ELF file version ident does not match current one
ELF file version does not match current one
ELF file's phentsize not the expected size
only ET_DYN and ET_EXEC can be loaded
cannot open shared object file
symbol=%s;  lookup in file=%s
file=%s;  needed by %s (relocation dependency)
binding file %s to %s: %s symbol `%s'
%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx
cannot make segment writable for relocation
%s: Symbol `%s' has different size in shared object, consider re-linking
%s: profiler found no PLTREL in object %s
%s: profiler out of memory shadowing PLTREL of %s
can't restore segment prot after reloc
DST not allowed in SUID/SGID programs
empty dynamics string token substitution
cannot load auxiliary `%s' because ofempty dynamic string token substitution
load auxiliary object=%s requested by file=%s
load filtered object=%s requested by file=%s
cannot allocate dependency list
cannot allocate symbol search list
error while loading shared libraries
checking for version `%s' in file %s required by file %s
no version information available (required by
cannot allocate version reference table
%s: file is no correct profile data file for `%s'
Out of memory while initializing profiler
FATAL: cannot determine library version
unexpected PLT reloc type 0x??
unexpected reloc type 0x??

Is there anyway I can compile this module with Linux compabitility library 
depency to run on the native fbsd Apache?  Thanks a lot for your help!

Cheers,
Hui

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters



More information about the freebsd-questions mailing list