Under the heading "Build java module with -ljava" you mention that there
were crashing problems because libjava.so was linked agains pthread and
apache wasn't. This is not uncommon problem for other libraries such as
oci8. You can link apache with pthread which will prevent the segfaults. See
oci8 manual page for instructions.
Thanks for the tip.

I built apache with -lpthread and I was able to get a little bit farther with
linking the java module with -ljava.For the first time I was able to run the
following script through apache:

However, I had other problems that keep this build method from working right.

The code
$system = new Java('java.lang.System');
would hang apache. Why the more advanced classloader.php example worked and
this one didn't I have no idea. Both examples worked fine in the CLI
build of PHP.

I also noticed that if i create the JVM in PHP_MINIT_FUNCTION() instead of
creating it on the first request for java, apache hangs for every java
request. This works fine in the CLI build. Since I get no segfault and
strace -p gives me no output at all, I'm stumped.


Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
groupphp-dev @
postedDec 5, '02 at 6:33p
activeDec 6, '02 at 6:53p

2 users in discussion

Tony J. White: 2 posts Edin Kadribasic: 1 post



site design / logo © 2022 Grokbase