note 39567 added to ref.java
| From: | georgedaswani at hotmail dot com | Date: | Mon, 02 Feb 2004 19:39:48 +0000 |
| Subject: | note 39567 added to ref.java | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64561@lists.php.net to get a copy of this message | ||
I was able to compile java support in no problem and got it working sun jdk 1.4.2_03 (linux)
make sure JAVA_HOME is set
make sure LD_LIBRARY_PATH has
$JAVA_HOME/jre/lib/i386
on php.ini
[Java]
java.home = "/opt/j2sdk1.4.2_03"
java.class.path = "/opt/php/lib/php/php_java.jar:/opt/php/java-packages"
java.library.path = "/opt/php/lib/php/extensions/no-debug-zts-20020429"
extension_dir= "/opt/php/lib/php/extensions/no-debug-zts-20020429"
extension = java.so
It's import to note that APACHE 2 needs to be compiled using "PREFORK" instead of a
thread based else the java stuff will work for a minute, then stop working with the following error
"PHP Fatal error: Unable to create Java Virtual Machine"
Seems that the extension is not thread safe.
----
Manual Page -- http://www.php.net/manual/en/ref.java.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39567
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39567&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39567&report=yes
Search -- http://master.php.net/manage/user-notes.php