Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need to install Java on the same server on which PHP is already installed and hosting website. I need Java on the same server as I need to validate my XML file for Schematron business rule validation, will it create any problem if I install Java on same server?

share|improve this question

migrated from stackoverflow.com Jul 23 '12 at 9:51

This question came from our site for professional and enthusiast programmers.

3 Answers 3

You have to allocate different listening ports, By default for all servers listening port is set to 80. You will need to assign other listening port to one of the server either php server or java server.

share|improve this answer
    
A common solution is to have the front web server (which presumably runs PHP as well) proxy through to the Java server. –  Thilo Jul 23 '12 at 5:30
    
Installing Java and running a Java-based web server are two very different things. –  Keith Randall Jul 23 '12 at 5:33
    
@KeithRandall Agree but my point was about web servers. There may be conflict if both servers are trying to listen same port. –  Rupesh Patel Jul 23 '12 at 5:39
    
@Thilo 's solution would be better. You should post in brief. –  Rupesh Patel Jul 23 '12 at 5:40

No problem at all. PHP and Java will not interfere as long as you have disk space to hold them both.

share|improve this answer

yes you can do that. We had done this for one of our products. You need to be careful about the HTTP(s) ports though if you are going to use java in the web context. If you just have a php website and that's going to use/invoke your java process, then no problems at all.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.