note 31294 deleted from ref.java by aidan
| From: | aidan@php.net | Date: | Wed, 01 Sep 2004 00:09:32 +0000 |
| Subject: | note 31294 deleted from ref.java by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75806@lists.php.net to get a copy of this message | ||
Note Submitter: kemccarthy_00 at yahoo dot com
----
Installing J2sdk and php --with-java on a Linux RedHat 8 machine was easy but figuring out how to
configure the php.ini was the hard part; each place we looked (docs,m boards,here) had a different
configuration.
Distilling everything we've seen and using trial and error we found the following to work.
Since we have several Apache 1.3.27 servers running with PHP 4.3.1 on the machine as a DSO on each,
we added:
export LD_LIBRARY_PATH=
/usr/java/j2sdkversion/jre/lib/i386:
/usr/java/j2sdkversion/jre/lib/i386/server
in the apachectl script each specific to the servers we wanted to integrate.
Our /etc/init.d/apache script starts and stops all the servers and we want to be able to start/stop
one or another separately as well.
In the php.ini file we added
[Java]
java.class.path=/usr/local/lib/php/php_java.jar
java.home=/usr/java
extension_dir=/usr/local/lib/php/extensions/no-debug-non-zts-20020429
extension=java.so
The library and library path is found from the LD_LIBRARY_PATH env var; indeed being explicit about
them in the php.ini causes calls to new Java() to fail.