note 32742 deleted from ref.java by aidan
| From: | aidan@php.net | Date: | Wed, 01 Sep 2004 00:08:56 +0000 |
| Subject: | note 32742 deleted from ref.java by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75804@lists.php.net to get a copy of this message | ||
Note Submitter:
----
I had a hard time (like most people here... ;) ) to find the right settings in php.ini. None of the
solutions presented above worked for me. I installed PHP 4.3.2 as a DSO for Apache 1.3.27 under
RedHat 9. I use the JDK from Sun (Version 1.4) and installed it under /usr/local/j2sdk1.4.0_01
One of the earlier postings (the one by fernando) gave me the crucial hint. While
"java.library" has to point at
"/usr/local/j2sdk1.4.0_01/jre/lib/i386/libjava.so" (as usual), the
"java.library.path" must point at the directory where you've put your php-extensions!
(in my case: "/usr/local/lib/php/extensions/no-debug-non-zts-20020429"). Summing up, my
php.ini looks like this:
java.class.path = /usr/local/lib/php/php_java.jar
java.home = /usr/local/j2sdk1.4.0_01
java.library = /usr/local/j2sdk1.4.0_01/jre/lib/i386/libjava.so
java.library.path = /usr/local/lib/php/extensions/no-debug-non-zts-20020429
Don't forget to set LD_LIBRARY_PATH correctly. I added, like already metioned above, the
following line to my startup script (/usr/local/apache/bin/apachectl):
export LD_LIBRARY_PATH=:/usr/local/j2sdk1.4.0_01/jre/lib/i386:
/usr/local/j2sdk1.4.0_01/jre/lib/i386/server
--------------
Note the following hints for troubleshooting:
- if you haven't set your LD_LIBRARY_PATH, you'll be reported that the file
"libverify.so" can't be found. (This file is in
"/usr/local/j2sdk1.4.0_01/jre/lib/i386")
- if your "java.library.path" in php.ini doesn't point at your php extensions
directory (but eg. at your jre directory), the JRE will complain about the following:
"UnsatisfiedLinkError". That means, that your corresponding php extension
("java.so" or "libphp_java.so") can't be detected! Have another look at the
note posted by gturner.
Done so, it works fine. I hope this might be useful for someone reading this never-ending story ;)