note 31294 added to ref.java

From: Date: Wed, 16 Apr 2003 16:10:15 +0000
Subject: note 31294 added to ref.java
Groups: php.notes 
Request: Send a blank email to php-notes+get-46695@lists.php.net to get a copy of this message
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. -- http://www.php.net/manual/en/ref.java.php http://master.php.net/manage/user-notes.php?action=edit+31294 http://master.php.net/manage/user-notes.php?action=delete+31294 http://master.php.net/manage/user-notes.php?action=reject+31294

« previous php.notes (#46695) next »