You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2011/09/23 17:16:26 UTC

DO NOT REPLY [Bug 51884] Apache child segfaults when PHP makes LDAP calls

https://issues.apache.org/bugzilla/show_bug.cgi?id=51884

--- Comment #1 from Rainer Jung <ra...@kippdata.de> 2011-09-23 15:16:26 UTC ---
It looks like you build Apache against Solaris LDAP and PHP against OpenLDAP.
When running the Apache with PHP, the runtime linker will first load system
LDAP (the Apache dependency) and then OpenLDAP (when loading the PHP module).

Now when calling actual LDAP functions from within mod_php, the runtime linker
will not resolve the symbols first in OpenLDAP, but will search all libs in the
original loading order, so system LDAP first. If it finds a symbol there, it
will use it there, if not then in OpenLDAP. This can easily lead to
inconsistencies and crashes.

Check, whether it is true, that your Apache including mod_php loads different
versions of LDAP. Use e.g. Solaris "pldd". Then try to produce a core for the
crash and check with "pstack" or a debugger, where the crash happens, e.g. if
it happens inside an LDAP function. If so, the above situation is likely the
culprit.

Think about building PHP against the system LDAP. As an alternative, you can
try the so-called "direct" linking (linker flag -Bdirect), which changes the
runtime linker search order. But that might lead to a tedious exercise in
changing build files.

Regards,

Rainer

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org