From: <php...@li...> - 2009-03-27 09:01:32
|
Hi, The bridge cannot "autostart". Basically you write or include() PHP code to connect to a Java back end and then use the provided VM bridge protocol to invoke java and/or php code. If you want to manage a java back end from PHP, use PHP exec() and java("java.lang.System")->exit(), please see this example for details: http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=startJava.php Please remove all php "java.so" and "php_java.dll" you can find and then follow the install instructions on http://php-java-bridge.sourceforge.net/pjb/installation.php Regards, Jost Boekemeier Mrz 27, 2009 7:48 vorm. schrieb am < php...@li...>: Hi all, We've been having trouble getting the java bridge to autostart. In the apache logs, I get --- PHP Warning: php_mod_java(105) system error: Could not execute backend: JAVA_HOME=/usr/java/j2sdk1.4.2_19 LD_LIBRARY_PATH=/usr/lib64/php/modules:/usr/lib64/php/modules:/usr/java/jdk1.6.0_12/jre/lib/amd64 /usr/lib64/php/modules/RunJavaBridge /usr/java/j2sdk1.4.2_19/bin/java -Djava.library.path=/usr/lib64/php/modules -Djava.class.path=/usr/lib64/php/modules/JavaBridge.jar -Djava.awt.headless=true -Dphp.java.bridge.base=/usr/lib64/php/modules php.java.bridge.Standalone INET_LOCAL:0 4 /var/log/php-java-bridge.log : Permission denied in Unknown on line 0 ---- However, if I run, --- /usr/lib64/php/modules/RunJavaBridge /usr/java/j2sdk1.4.2_19/bin/java -Djava.library.path=/usr/lib64/php/modules -Djava.class.path=/usr/lib64/php/modules/JavaBridge.jar -Djava.awt.headless=true -Dphp.java.bridge.base=/usr/lib64/php/modules php.java.bridge.Standalone INET_LOCAL:0 4 /var/log/php-java-bridge.log --- directly in the command line, I am able to start the bridge without any errors. We don't need to have the extra overhead of running tomcat for what we need here, so can someone help me fix this issue? This is CentOS 5.1, I'll give the relevant phpinfo output here: PHP Version 5.2.6, apache 2.2.3 java java support Enabled java bridge 5.2.2.4 java.java_home/usr/java/j2sdk1.4.2_19java.java/usr/java/j2sdk1.4.2_19/bin/javajava.log_file/var/log/php-java-bridge.logjava.log_level4java.security_policyOffjava commandJAVA_HOME=/usr/java/j2sdk1.4.2_19 LD_LIBRARY_PATH=/usr/lib64/php/modules:/usr/java/jdk1.6.0_12/jre/lib/amd64 /usr/java/j2sdk1.4.2_19/bin/java -Djava.library.path=/usr/lib64/php/modules -Djava.class.path=/usr/lib64/php/modules/JavaBridge.jar -Djava.awt.headless=true -Dphp.java.bridge.base=/usr/lib64/php/modules php.java.bridge.Standalone INET_LOCAL:0 4 /var/log/php-java-bridge.log java server localhost java status not running If needed, I can share the phpinfo page url. btw, what should the LD_LIBRARY_PATH be? and how can I make that be remembered across reboots for the bridge. my java.ini contents: --- extension = java.so [java] java.java_home = /usr/java/j2sdk1.4.2_19 java.java = /usr/java/j2sdk1.4.2_19/bin/java java.log_level = 4 java.log_file = /var/log/php-java-bridge.log --- Thangaraj Isha Foundation -- www.ishafoundation.org www.projectgreenhands.org www.bootcd.us www.ecobuddy.in ------------------------------------------------------------------------------ _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |