Date: Fri, 14 Jun 2002 16:55:57 -0400 From: Josh Levine <joshl@levindustries.com> To: freebsd-questions@freebsd.org Subject: PHP+Java+Apache Message-ID: <3D0A585D.1CEF6042@levindustries.com>
next in thread | raw e-mail | index | archive | help
Hi - I'm having some problems getting Java support in PHP under Apache on FreeBSD 4.6-RELEASE, and was wondering if anyone has any ideas. Here's what I've done so far: I installed the FreeBSD JDK13 port and then re-compiled PHP with Java support. When I tried running a script with Java, Apache returned: Fatal error: Unable to create Java Virtual Machine in /usr/home/research/htdocs/java.php on line 3 and put this in the error log: Cannot open "/usr/local/jdk1.3.1/jre/lib/i386/native_threads/libhpi.so" Based on a few Google searches, I re-compiled JDK13 WITH_NATIVE_THREADS and Apache started logging this error message: /usr/local/jdk1.3.1/jre/lib/i386/native_threads/libhpi.so: Undefined symbol "pthread_mutex_init" so, based on more Google searches I tried re-compiling Apache with this in my environment: LDFLAGS="-lpthread" I got an error in the make, so I tried: -pthread and -lc_r and that seemed to work. Now Apache is logging this in the error log: Can't load library "/usr/local/jdk1.3.1/jre/lib/i386/libjava.so", because Shared object "libverify.so" not found # locate libverify.so /usr/local/jdk1.3.1/jre/lib/i386/libverify.so I have this in my php.ini file: [Java] java.class.path = /usr/local/lib/php/php_java.jar:/usr/local/jdk1.3.1/jre/lib/rtjar.zip java.home = /usr/local/jdk1.3.1 java.library = /usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm.so java.library.path = /usr/local/jdk1.3.1/jre/lib/i386/classic:/usr/local/jdk1.3.1/jre/lib/i386 extension=java.so and I've tried adding this to my apachectl script: export LD_LIBRARY_PATH=/usr/local/jdk1.3.1/jre/lib/i386 Any other suggestions? Is there a better list for me to ask this question on? Thanks in advance, Josh Levine To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D0A585D.1CEF6042>