Operating System - HP-UX
1753809 Members
8203 Online
108805 Solutions
New Discussion юеВ

dlopen probleme with PHP4 + Apache2

 
CARBONNEAUX
New Member

dlopen probleme with PHP4 + Apache2

Probleme Description:

have compile apache2 with dso support, and i tested it separatly...it's ok! work fin with apache included dso!

after, i've compiled php with apxs2 support, without probleme...

The php module has been correctly installed in apache modules directory and
the apache conf have been correctly modify by the php installer...

but... when i try to start apache with php module,
they can't load php module...

when i verify with ldd -d why the module don't load, i've this result:
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libintl.sl => /usr/local/lib/libintl.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libiconv.sl => /usr/local/lib/libiconv.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libxml2.sl => /usr/local/lib/libxml2.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libintl.sl => /usr/local/lib/libintl.sl
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/lib/libz.sl => /usr/local/lib/libz.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/lib/libbz2.sl => /usr/local/lib/libbz2.sl
/usr/local/lib/libdb.sl => /usr/local/lib/libdb.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libxslt.sl => /usr/local/lib/libxslt.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/lib/libintl.sl => /usr/local/lib/libintl.sl
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/local/lib/libz.sl => /usr/local/lib/libz.sl
/usr/local/lib/libxml2.sl => /usr/local/lib/libxml2.sl
/usr/local/lib/libxsltbreakpoint.sl => /usr/local/lib/libxsltbreakpoint.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libjpeg.sl => /usr/local/lib/libjpeg.sl
/usr/local/lib/libz.sl => /usr/local/lib/libz.sl
/usr/local/lib/libpng.sl => /usr/local/lib/libpng.sl
/usr/local/lib/X11/libXpm.sl => /usr/local/lib/X11/libXpm.sl
/usr/lib/libX11.3 => /usr/lib/libX11.3
/usr/local/lib/libt1.sl => /usr/local/lib/libt1.sl
/usr/local/lib/libgd.sl => /usr/local/lib/libgd.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libiconv.sl => /usr/local/lib/libiconv.sl
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/local/lib/libz.sl => /usr/local/lib/libz.sl
/usr/local/lib/libpng.sl => /usr/local/lib/libpng.sl
/usr/local/lib/libfreetype.sl => /usr/local/lib/libfreetype.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/lib/libjpeg.sl => /usr/local/lib/libjpeg.sl
/usr/lib/libX11.3 => /usr/lib/libX11.3
/usr/local/lib/X11/libXpm.sl => /usr/local/lib/libXpm.sl
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/local/lib/libexpat.sl => /usr/local/lib/libexpat.sl
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/apache2/lib/libaprutil-0.sl.9 => /usr/local/apache2/lib/libaprutil-0.sl.9
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/local/apache2/lib/libapr-0.sl.9 => /usr/local/apache2/lib/libapr-0.sl.9
/usr/lib/libc.2 => /usr/lib/libc.2
/usr/lib/libdld.2 => /usr/lib/libdld.2
/usr/lib/libpthread.1 => /usr/lib/libpthread.1
/usr/lib/libnsl.1 => /usr/lib/libnsl.1
/usr/lib/libxti.2 => /usr/lib/libxti.2
/usr/lib/libm.2 => /usr/lib/libm.2
/usr/lib/libcl.2 => /usr/lib/libcl.2
/usr/lib/libisamstub.1 => /usr/lib/libisamstub.1
/usr/lib/libdld.2 => /usr/lib/libdld.2
symbol not found: _SYSTEM_ID (/usr/lib/libc.2)
symbol not found: _end (/usr/lib/libc.2)
symbol not found: __dld_loc (/usr/lib/libdld.2)
symbol not found: ap_loaded_modules (/usr/local/apache2/modules/libphp4.so)
symbol not found: unixd_config (/usr/local/apache2/modules/libphp4.so)
symbol not found: ap_server_root (/usr/local/apache2/modules/libphp4.so)
symbol not found: _SYSTEM_ID (/usr/lib/libcl.2)
symbol not found: __dld_loc (/usr/lib/libcl.2)

some symbole seem to not be resolved....

have searched for this symbole....

and i have found some of this symbol in httpd binary

#nm httpd | grep ap_server_root
ap_hack_ap_server_root_relative|1073780904|extern|data |$DATA$
ap_server_root |1073757188|extern|data |$DATA$
ap_server_root_relative| 303164|extern|entry |
ap_server_root_relative| 303216|extern|code |$CODE$

#nm httpd | grep ap_loaded_modules
ap_loaded_modules |1073757324|extern|data |$DATA$

this global export seem to be correctly exported by httpd....

but unixd_config is undef...!!??? i'm not sure wat correct... but apache work fine without libphp4.so...!!!

#nm httpd | grep unixd_config
unixd_config |1073807808|undef |common |$BSS$

i've found the other symbol in hp-ux library....

but i've seen before similare probleme with "mod_auth_ldap" module from musquit,
but only _SYSTEM_ID, _end and __dld_loc symbol i've not been resolved...
for this i've found on the forum how to correct this probleme,
by in using "export LD_PRELOAD=/usr/bin/libcl.sl" or in adding export CFLAGS="-lcl" before compiling apache...

but with php this trick don't work....

i think is globale visibility probleme between httpd binary and (libphp4.so) loaded librairy...

i think that dyn lib can't access to global export of the binary who have loaded the library...

have you any idea to correct this!!!!?

have tried to upgrade to libtool v1.5 but without amelioration...

Best Regards,
Mathieu
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: dlopen probleme with PHP4 + Apache2

This is almost always caused by the $SHLIB_PATH variable being wrong in the startup scripts.

Not that I'm familiar, but consider backing out the libtool upgrade.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
CARBONNEAUX
New Member

Re: dlopen probleme with PHP4 + Apache2

i don't use SHLIB or LD_LIBRARY, all lib are intalled in absolute path:

[soignes:root]/usr/local/apache2#chatr modules/libphp4.so
modules/libphp4.so:
shared library
shared library dynamic path search:
SHLIB_PATH disabled second
embedded path enabled first /varsoft/delivery/CEGTOOL/src/php-4.3.6/libs
internal name:
libphp4.sl
shared library list:
dynamic /usr/lib/libcl.2
static /usr/local/apache2/lib/libapr-0.sl.9
static /usr/local/apache2/lib/libaprutil-0.sl.9
static /usr/local/lib/libexpat.sl
dynamic /usr/local/lib/libdb-4.2.sl
dynamic /usr/lib/libpthread.1
dynamic /usr/lib/libdld.2
static /usr/local/lib/libgd.sl
static /usr/local/lib/libt1.sl
dynamic /usr/lib/libX11.3
dynamic /usr/local/lib/X11/libXpm.sl
dynamic /usr/local/lib/libpng.sl
dynamic /usr/local/lib/libz.sl
static /usr/local/lib/libjpeg.sl
static /usr/local/lib/libxsltbreakpoint.sl
static /usr/local/lib/libxslt.sl
dynamic /usr/local/lib/libbz2.sl
dynamic /usr/lib/libm.2
static /usr/local/lib/libxml2.sl
static /usr/local/lib/libintl.sl
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 disabled

i that way have no probleme to find library !


some symbol for exemple are in libdld.sl, when you read the ldd result, you see that dld are in list! or why they can resolv symbol of it!!!!