Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running PHP on tomcat

Status
Not open for further replies.

riches85

Programmer
Nov 13, 2002
59
US
I was wondering if anyone knew of what needs to be done to get php to run on tomcat. I have looked online for hours and have found very sparse documentation and nothing that has been to helpful. If anyone has any ideas or could steer me in the right direction it would be greatly appreciated. Thank you
 
I have the same question as riches. Did you find your solution, riches, or does anyone else know? I'm trying to get a "gallery" program to run on my Tomcat server but it must have PHP installed. Do I have to use Apache and install the mod_jk connector?

RJ

************
RudeJohn
************
 
hey guys.

Sorry I don't have a solution per say but I do have some insight.

PHP doesn't run on tomcat. However you can run tomcat on apache as well as php and others. It's a bit harder to configure tomcat to work with apache but if you make it work then php can also work on your port 80 server.

I've never done it myself and to be honest with you I don't think very many have either. But if you feel up to the challenge :


You could do as I do right now. I use one on port 80 (apache) with php installed and tomcat on port 8080. In a live site I wouldn't see a big use for both PHP and JSP to work on the same server (though I could be wrong).

I hope this helps.

Gary Haran
********************************
 
The easy way to do this is (if we are talking Unix platform) to install apache, php and use the ajp connector to talk between apache and tomcat.

|--------------|
| HTTPD |
|APACHE port:80|
| php |------> php via http to client
|\\\\\\\\\\\\\\|
|AJP connector |
|to tomcat 8180| |
|--------------|
| <-------- client calls to tomcat passed from apache to tomcat and back via port apache:80 to client
|
|----------------|
| AJP |
|TOMCAT port:8180|
|----------------|

When I have a little time I'll pop down a faq for you

Sorry about the asci art it looked good in the compose window :¬) not so good now but time has run out ....
Good luck,
Laurie.
 
Right... I've done the Tomcat connector before, but I did it between IIS and Tomcat (so I could run ASPs and JSPs on the same site without passing between ports). The bad thing about passing between ports is that you lose session variables.

I don't think it will be too much trouble to configure the Apache-Tomcat connector (mod_jk), but Jakarta hasn't released a binary for Redhat 9.0 yet, so I'll have to compile it myself. :)

~RJ

************
RudeJohn
************
 
AJP has sticky, so that should retain your sessions?

Laurie.
 
Had it done last week. Finally, had it working, with the help of these two links..

this link will help you find all the components you need.
But, the step-by-step did not work for me..


This link helped me with the step-by-step configuration process.



Libaax
Hakuna Matata....;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top