ID: 15702 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Java related Operating System: Red Hat Linux 7.1 PHP Version: 4.2.3 New Comment:
As you suggested above changing the extension=php_java.so without creating a symbolic link doesn't even load the extension. So I tried it by creating a symbolic link to /wwwroot/php/lib/php/extensions/no-debug-zts-20020429/java.so as /wwwroot/php/lib/php/extensions/no-debug-zts-20020429/php_java.so and used the following setting in php.ini: [Java] extension_dir = /wwwroot/php/lib/php/extensions/no-debug-zts-20020429 java.class.path = /wwwroot/php/lib/php/php_java.jar extension=php_java.so ;java.home = /usr/java/j2sdk1.4.0 ;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so ;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so java.library.path = /wwwroot/php/lib/php/extensions/no-debug-zts-20020429 PHP loaded the java extension but it still displayed: Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /wwwroot/htdocs/jver.php on line 4 I don't know what it isn't able to find php_java.jar or php_java.so? PHP is able to find java.so thats why it loads the extension. I also want to know what is the purpose of java.library.path? What should be specified here? Does it work for you or others who use Sun jdk 1.4? If yes then please try to update the README file in ext/java directory with settings which use Jdk 1.3 or 1.4 and which work on your own systems? Because not many these days use jdk 1.2.2. I must mention that java extension on windows works without any problem even when using jdk1.4. Previous Comments: ------------------------------------------------------------------------ [2002-11-05 19:09:17] [EMAIL PROTECTED] I believe the current answer to this is to make a link to the library like so: $extensiondir$/java.so to $extensiondir$/libphp_java.so You can find more about this in Bug #19327 Does this solve the problem? I know it's a hack at the moment, but the other bug details some of the issues with possible solutions. ------------------------------------------------------------------------ [2002-11-05 18:24:13] [EMAIL PROTECTED] Just wanted to change email so that I recevie the notification whenever this page is updated. ------------------------------------------------------------------------ [2002-11-02 17:42:26] [EMAIL PROTECTED] I used php 4.2.3 this time with apache 2.0.43 Apache ------ ./configure --prefix=/wwwroot --enable-so php ---- /configure --prefix=/wwwroot/php --with-apxs2=/wwwroot/bin/apxs --with-java --with-mysql --with-config-file-path=/wwwroot/php export LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client php.ini Setting --------------- [Java] java.class.path = /wwwroot/php/lib/php/php_java.jar extension=java.so java.home = /usr/java/j2sdk1.4.0 java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/libjava.so ;java.library = /usr/java/j2sdk1.4.0/jre/lib/i386/client/libjvm.so ;java.library.path = /usr/java/j2sdk1.4.0/jre/lib/i386/client Apache Start ------------ $ export LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client $ /wwwroot/bin/apachectl start Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /wwwroot/htdocs/jver.php on line 4 Then I changed java setting in php.ini like this: [Java] java.class.path = /wwwroot/php/lib/php/php_java.jar extension=java.so java.library.path = /wwwroot/php/lib/php But same error was displayed. Fatal error: java.lang.UnsatisfiedLinkError: no php_java in java.library.path in /wwwroot/htdocs/jver.php on line 4 I also want to know what has to be specified in java.library.path? In php.ini I also tried to use java.library.path=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client But it was unable to find other java libraries and this error was displayed: Fatal error: Unable to load Java Library /usr/java/j2sdk1.4.0/./jre/lib/i386/libjava.so, error: libverify.so: cannot load shared object file: No such file or directory in /wwwroot/htdocs/jver.php on line 4 So I had to mannual export LD_LIBRARY_PATH as above and then it displayed the unsatisfied link error. ------------------------------------------------------------------------ [2002-10-31 01:00:04] [EMAIL PROTECTED] No feedback was provided for this bug for over 2 weeks, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2002-10-15 22:38:59] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip And use MINIMUM amount of configure options when you test it. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/15702 -- Edit this bug report at http://bugs.php.net/?id=15702&edit=1