Has anyone had any luck with php4.0.4 and jdk1.3? Everytime I try and create a java object I get the following error:
Fatal error: Unable to load Java Library libjvm.so, error: /usr/local/jdk1.3/jre/lib/i386/classic/libjvm.so: undefined symbol: jdk_sem_post in /stuff/apache/htdocs/test.php on line 3

The script I am running to test this is the test script from the PHP-Java article on this site. I've looked through the archives but it doesn't look like anyone has had any luck. I've got php4.0.4 working with jdk1.2.2, but jdk1.3 is giving me a headache. Any help would be greatly appreciated.

Thanks

    Aaron wrote:

    Has anyone had any luck with php4.0.4 and jdk1.3? Everytime I try and create a java object I get the following error:
    Fatal error: Unable to load Java Library libjvm.so, error: /usr/local/jdk1.3/jre/lib/i386/classic/libjvm.so: undefined symbol: jdk_sem_post in /stuff/apache/htdocs/test.php on line 3

    i've had a similar prob., try to add the directory /usr/local/jdk1.3/jre/lib/i386 on your /etc/ld.so.conf and make a 'ldconfig'.
    hope that helps.
    with this i made it until a can't start java vm error then i got stuck does anybody know something about??

      7 days later

      I just posted a couple of responses to get around this problem. Basically, php4's ext/java/config.m4 needs to be fixed to accomodate the new JDK directory structure.

      Change the line (around line 69):
      test -d $i/classic && AC_ADD_LIBPATH($i/classic)

      to:
      test -d $i/hotspot && AC_ADD_LIBPATH($i/hotspot)
      test -d $i/server && AC_ADD_LIBPATH($i/server)
      test -d $i/classic && AC_ADD_LIBPATH($i/classic)

      and rerun ./buildconf before retrying configure/make/make install.

      I'll look into making this change in CVS after I check with the code owner.

        Write a Reply...