What we are doing is running apache with php-fpm on one server and tomcat 6
with PHP/Java bridge on another server. It is working great and without any
The only thing you have to do is to define the constant JAVA_HOSTS on the
PHP script side and point it to your java server:
After defining the constant include the Java.inc script and it should work
as expected. (Dont forget to open the needed ports on the java server
firewall - be sure that the java bridge is not exposed to the internet but
only to the php server. Check the security considerations on pjb readme:
Hi, I have successfully installed PHP/Java Bridge on a Ubuntu 12.04 64 bit
> server with Tomcat and php-cgi; all examples are running OK.
> I would like though now to run PHP code on a separate Ubuntu 12.04 64 bit
> LAMP server, accessing Java classes on the Tomcat server.
> Can anyone help, thank you very much:
> - Is this possible?
> - Do I have to modify the Java.inc include file (and/or the JavaProxy.php
> file) ?
> - Does the Java.inc (and/or the JavaProxy.php file) file have to be on the
> LAMP or on the Tomcat server?
> - Do I have to open any port on the Tomcat server?
> - Do I still have to run PHP as a CGI service?
> Ruggero Domenichini (rujero)
USA: 619-994-3431 / MEX: 646-1246609