I have dug through several forums trying to find a solution to this issue. I have configured PHP4.0.6 with Sun's JDK1.3.1 on RH7.1. I keep receiving a the following error message:
Fatal error: Unable to load Java Library /usr/java/jdk1.3.1/jre/lib/i386
/classic/libjvm.so, error: /usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so: un
defined symbol: jdk_sem_post in /tmp/php-4.0.6/ext/java/jver.php on line
My php.ini file looks like the following:
[Java]
java.class.path=/usr/local/lib/php/php_java.jar:/usr/share/kaffe/worldpac_fulfil
lment.jar
java.home=/usr/java/jdk1.3.1
java.library=/usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so
java.library.path=/usr/local/lib/php/extensions/no-debug-non-zts-20001222:/usr/j
ava/jdk1.3.1/jre/lib/i386:/usr/java/jdk1.3.1/jre/lib/i386/classic:/usr/java/jdk1
.3.1/jre/lib/i386/hotspot:/usr/java/jdk1.3.1/jre/lib/i386/native_threads
extension=libphp_java.so
And when I ldd -d libjvm.so I receive the following:
/usr/bin/ldd -d libjvm.so
libm.so.6 => /lib/i686/libm.so.6 (0x4009a000)
libnsl.so.1 => /lib/libnsl.so.1 (0x400be000)
libdl.so.2 => /lib/libdl.so.2 (0x400d5000)
libc.so.6 => /lib/i686/libc.so.6 (0x400d9000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaaa000)
undefined symbol: jdk_sem_post (./libjvm.so)
undefined symbol: jdk_sem_init (./libjvm.so)
undefined symbol: jdk_pthread_sigmask (./libjvm.so)
undefined symbol: jdk_sem_wait (./libjvm.so)
undefined symbol: jdk_pthread_sigmask (./libjvm.so)
I pretty much understand that the issue is with the JDK but I cannot figure out how to fix it. I have tried the the ld.so.conf( and ran ldconfig, also did a reboot) which is as follows:
/usr/lib
/usr/kerberos/lib
/usr/X11R6/lib
/usr/local/lib
/usr/java/jdk1.3.1/jre/lib/i386
/usr/java/jdk1.3.1/jre/lib/i386/classic
/usr/java/jdk1.3.1/jre/lib/i386/native_threads
/usr/java/jdk1.3.1/jre/lib/i386/green_threads
This has gotten to be a major holdup. I have read through several posts and tried all they suggest to no avail. I am going nuts, I know this can work because others have done it. The only thing left that I haven't looked into is this error message from the php debug.log:
/usr/bin/ld: warning: libstdc++-libc6.1-1.so.2, needed by /usr/java/jdk1.3.1/jre
/lib/i386/hotspot/libjvm.so, not found (try using -rpath or -rpath-link)
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to __che
ck_eh_spec'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference tothr
ow'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to termi
nate(void)'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference tocp
pop_exception'
/usr/java/jdk1.3.1/jre/lib/i386/hotspot/libjvm.so: undefined reference to `__cp
eh_info'
collect2: ld returned 1 exit status
I don't have libstdc++-libc6.1-1.so.2 on my system. So I will go back and try install it and see what happens. Also I have tried kaffe and had it working but the predone Java API's I was using didn't want to work so I am trying Sun's JDK. Any ideas would be greatly appreciated.
Bill