ID: 14870
Updated by: [email]sniper@php.net[/email]
Reported By: msopacua at idg dot nl
Status: Feedback
Bug Type: Dynamic loading
Operating System: BSDi 4.x
PHP Version: 4.0CVS-2002-10-16
New Comment:

Melvyn, your comment got lost due to that db corruption we had..can you
please re-add it?



Previous Comments:
------------------------------------------------------------------------

[2003-08-13 23:23:38] [email]sniper@php.net[/email]

I tried searching for similar issues in other projects
and found this document:
[url]http://www.pix.net/software/bsdos/elf_faq.html#How%20do%20I%20build%20a%20program%20 that%20dynamically%20loads%20a%20shared%20object%2 0(with%20dlopen(3[/url])

Basically what I read about BSDi's support for dlopen() was
not really promising.

Could you try compiling PHP as static module in Apache to
see if the problem really is the "double" dlopen:

Apache-dlopen(PHP-dlopen(curl.so))

(when PHP is build as static module, the first dlopen() is nuked of
course :)



------------------------------------------------------------------------

[2003-07-21 12:23:27] msopacua at idg dot nl

Thanx Jani, but it's not the cause. I've tried it regardless and it
doesn't help.

It's defenitely a linker issue, although a ktrace doesn't reveal much
info.

------------------------------------------------------------------------

[2003-07-10 18:33:38] [email]sniper@php.net[/email]

Not sure whether this has nothing to do with this bug,
but take a look in Apache 1.3.27 sources, src/main/http_main.c file
and look for WORKAROUND_SOLARIS_BUG. You could try defining that and
recompile apache (make clean && make) to see if it has any effect?


------------------------------------------------------------------------

[2002-10-20 10:33:46] [email]msopacua@php.net[/email]

I've created a php script, to test this :-).
Output is as follows:
================================================== ==========
RESULTS SIGTEST
------------------------------------------------------------
Mysql bundled: OK
Mysql external: NOT OK
Aspell external: NOT OK
GD bundled: OK
XML Bundled: OK
XML external: OK
XSLT external: NOT OK
Iconv external: OK
GNU gettext, external: OK
OpenSSL external: NOT OK
Curl external, without SSL: NOT OK
Curl external, with SSL: NOT OK
================================================== ==========

The commonalities seem to be, that the modules which fail, load more
than 1 external shared library. MySQL loads zlib, Aspell loads several
aspell libs, OpenSSL has -lssl and -lcrypt and curl loads -lssl ("Curl
external, without SSL", simply means --with-openssl was not given.
-lssl and -lcrypt are still linked in).
The only exceptions to this, are the Bundled GD, which is compiled with
libjpeg, libpng, libz and libfreetype and the Bundled MySQL.

The common factors with these is, that libphp4.so doesn't call
libgd/libmysqlclient, but has this code built in.

Concluding this goes wrong when there are 2 levels of dynamic loading:
apache -> libphp4 -> libfoo -> libbar

It reminded me of bug in BSD/OS 4.x series, on how symbols are
resolved:
[url]http://www.geocrawler.com/archives/3/127/1999/5/0/1795873/[/url]

Can somebody experience in this, take a look if it makes any sense in
comparison to what PHP is doing?


------------------------------------------------------------------------

[2002-10-17 04:06:49] [email]msopacua@php.net[/email]

Ok, just a quick status update:
The 'old' gd still exposes the problem. The bundled gd does not, in
contradiction to my previous report. This was actually caused because,
the bundled MySQL lib, is OK, BUT an external mysql lib (3.23.53) also
exposes the problem.

Since I tried both, with the same zlib option, and both MySQL libs have
been linked with the same zlib, it cannot be a zlib problem.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/14870[/url]

--
Edit this bug report at [url]http://bugs.php.net/?id=14870&edit=1[/url]