Java Extension: Unable to Load Java Library

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

quelle
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Aug 20, 2002 11:57 am

Java Extension: Unable to Load Java Library

Postby quelle » Tue Feb 25, 2003 12:17 pm

I am having troubles getting the Java extension for PHP to work.. I keep getting the following error:

Fatal error: Unable to load Java Library /usr/local/linux-blackdown-jdk1.4.1/jre/lib/i386/server/libjvm.so, error: Shared object "libnsl.so.1" not found in /usr/local/apache/htdocs/java.php on line 3


My setup:
- FreeBSD 5
- Apache 2.0.44
- PHP 4.3.0 (DSO in Apache)
- Blackdown JDK 1.4.1 (installed via FreeBSD Ports collection)

And here is the Java section in my php.ini file:
[JAVA]
java.home = /usr/local/linux-blackdown-jdk1.4.1
java.class.path="/usr/local/php/lib/php/php_java.jar"
java.library.path=/usr/local/php/lib/php/extensions/no-debug-non-zts-20020429
java.library=/usr/local/linux-blackdown-jdk1.4.1/jre/lib/i386/server/libjvm.so
extension=libphp_java.so


Java works fine on its own (ie. via command-line), but I can't seem to get it going with PHP. I am pretty sure that it has something to do with my php.ini settings....

Any help would be greatly appreciated.

Thanks!

User avatar
WiZARD
Moderator
Moderator
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol
Contact:

Re: Java Extension: Unable to Load Java Library

Postby WiZARD » Wed Feb 26, 2003 12:57 am

Are you sure what it's correct?
[JAVA]
java.home = /usr/local/linux-blackdown-jdk1.4.1
java.class.path="/usr/local/php/lib/php/php_java.jar"
java.library.path=/usr/local/php/lib/php/extensions/no-debug-non-zts-20020429
java.library=/usr/local/linux-blackdown-jdk1.4.1/jre/lib/i386/server/libjvm.so
extension=libphp_java.so

quelle
New php-forum User
New php-forum User
Posts: 8
Joined: Tue Aug 20, 2002 11:57 am

Postby quelle » Wed Feb 26, 2003 8:41 am

No I am not sure that my php.ini is correct.. in fact I'm pretty sure that it is what's causing the problem :?

Oh yeah, the file that it can't find (libnsl.so.1) is located in /usr/compat/linux/lib/

Ideas?


Return to “PHP Installation”

Who is online

Users browsing this forum: No registered users and 1 guest