I have a PHP website www.mysite.com and I want to use the PHP/Java bridge . I've installed tomcat on my computer and it works on localhost. But when I try to use it on my PHP server, this is the error I get:
Fatal error: Uncaught Could not connect to the JEE server 127.0.0.1:8080. Please start it. Or define('JAVA_HOSTS',9267); define('JAVA_SERVLET',false); before including 'Java.inc' and try again.
Now, I am not too surprised: my computer is not supposed to serve as a JEE server for the live application. But being very unfamiliar with Java, I am not sure what steps to take to fix this error: how can I get a JEE server? Is it just getting a java host like I would get a PHP host? And which parts of the bridge need to be on the PHP server and which on the JEE server?
This appears to be what I need to define where the JEE server is - but I am not sure what the terms really mean in the Java world.
define("JAVA_HOSTS", "127.0.0.1:8080");
define("JAVA_SERVLET", "/JavaBridge/servlet.phpjavabridge");
Thanks!
On that lib it is installed a Java EE server to the same machine as the PHP, but in diff port. Java server default port it is 8080. I think the PHP just makes a TCP/IP communication from port 80 to 8080. On the given example the same machine is used for both servers, this architecture should support installations on diff machines, but need to make proper configurations and of course it will be a lot slower the bridge, but it wil work.
based on what you need: forget the PHP java bridge for now.
As I remember the AppEngine can schedule a POST to your PHP, in case of taking to long the parsing. I did with a cron job? -can't remember, but I did a connection to outside, however AppEngine hosting is different from PHP, isn't just an FTP upload file, but there are tutorials how to do it from Eclipse.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.