Hope someone can put me out of my misery, i've been trying to get PHP 4.0.5 --with-java=/usr/java/jdk1.3.1 for about 3 weeks now on a Cobalt RaQ3i, mostly trying out different settings in php.ini and environment variables. phpinfo shows me lots of good stuff and I'm sure PHP is working fine apart from Java support. Todays error message of the day is:
Fatal error: Unable to load Java Library /usr/java/jdk1.3.1/jre/lib/i386/libjava.so, error: /usr/java/jdk/jre/lib/i386/classic/libjvm.so: undefined symbol: jdk_sem_post in /home/pm/jver.php on line 4
I've added several lines to my .profile script specifying CLASSPATH, PATH and LD_LIBRARY_PATH making sure they match the corresponding lines in the php.ini and never and joy.
I'm beginning to think I have some fundemental problems with the JDK/Java setup on my machine:
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Classic VM (build 1.3.1-b24, green threads, nojit)
Might be worrying that ld libjava.so gives me the following result:
ld: warning: cannot find entry symbol _start; not setting start address
libjava.so: undefined reference to jdk_sem_post'
libjava.so: undefined reference tojdk_waitpid'
/usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so: undefined reference to jdk_pthread_sigmask'
libjava.so: undefined reference tofork1'
libjava.so: undefined reference to jdk_sem_wait'
libjava.so: undefined reference tojdk_sem_init'
and ldd libjava.so gives me:
libjvm.so => /usr/java/jdk1.3.1/jre/lib/i386/classic/libjvm.so (0x40029000)
libverify.so => /usr/java/jdk1.3.1/jre/lib/i386/libverify.so (0x400bc000)
libnsl.so.1 => /lib/libnsl.so.1 (0x400cf000)
libdl.so.2 => /lib/libdl.so.2 (0x400e5000)
libc.so.6 => /lib/libc.so.6 (0x400ea000)
libm.so.6 => /lib/libm.so.6 (0x401df000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
I followed a suggestion from one posting and added the path to libjava.so (/usr/java/jdk/jre/lib/i386) to my /etc/ld.so.conf file and ran ldconfig.
I always stop and start Apache after every change and get very similar error messages..
Hope someone can help, I've already spent far far too much time doing this!
Many thanks