From owner-freebsd-questions Fri Jun 14 13:59:50 2002 Delivered-To: freebsd-questions@freebsd.org Received: from attila.stevens-tech.edu (attila.stevens-tech.edu [155.246.14.11]) by hub.freebsd.org (Postfix) with ESMTP id A8CC337B40E for ; Fri, 14 Jun 2002 13:59:45 -0700 (PDT) Received: from levindustries.com (jlevine-1.u05.stevens-tech.edu [155.246.211.36]) by attila.stevens-tech.edu (SGI-8.9.3/8.9.3/7) with ESMTP id QAA06653 for ; Fri, 14 Jun 2002 16:56:56 -0400 (EDT) Message-ID: <3D0A585D.1CEF6042@levindustries.com> Date: Fri, 14 Jun 2002 16:55:57 -0400 From: Josh Levine X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: PHP+Java+Apache Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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