ID: 15702 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Feedback Bug Type: Java related Operating System: Red Hat Linux 7.1 PHP Version: 4.2.3 New Comment:
http://bugs.php.net/bug.php?id=15702&edit=2 is not accepting my password. I don't know why so I am posting this as comment I think above you meant from java.so to libphp_java.so. Yes I did create a symbolic link libphp_java.so to java.so. It again resulted inSegmentation fault. Here is the gdb output. # export LD_LIBRARY_PATH=/usr/java/j2sdk1.4.0/jre/lib/i386:/usr/java/j2sdk1.4.0/jre/lib/i386/client # gdb /wwwroot/bin/httpd GNU gdb 5.0rh-5 Red Hat Linux 7.1 Copyright 2001 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux"... (gdb) run -X Starting program: /wwwroot/bin/httpd -X [New Thread 1024 (LWP 852)] [New Thread 2049 (LWP 857)] Delayed SIGSTOP caught for LWP 857. [New Thread 1026 (LWP 858)] Delayed SIGSTOP caught for LWP 858. [New Thread 2051 (LWP 859)] Delayed SIGSTOP caught for LWP 859. [New Thread 3076 (LWP 860)] Delayed SIGSTOP caught for LWP 860. [New Thread 4101 (LWP 861)] [New Thread 5126 (LWP 862)] Delayed SIGSTOP caught for LWP 862. [New Thread 6151 (LWP 863)] Delayed SIGSTOP caught for LWP 863. [New Thread 7176 (LWP 864)] Delayed SIGSTOP caught for LWP 864. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 7176 (LWP 864)] __pthread_mutex_lock (mutex=0x89110898) at mutex.c:99 99 mutex.c: No such file or directory. in mutex.c (gdb) Previous Comments: ------------------------------------------------------------------------ [2002-11-28 07:08:06] [EMAIL PROTECTED] first. you have to make a symlink from to libphp_java.so not php_java.so... second. sablotron < 0.97 and jdk >= 1.3 does not work together. Sablotron 0.97 is not out yet, but there is an RC1 in their CVS (didn't find a link to download it), which should solve the problem.. chregu ------------------------------------------------------------------------ [2002-11-11 09:41:56] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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