*
The moose likes Tomcat and the fly likes Tomcat and PHP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat and PHP" Watch "Tomcat and PHP" New topic
Author

Tomcat and PHP

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
A client would like to run some PHP on my Tomcat server - I see from the www.php.net site that you can run PHP as a CGI process, and Tomcat 5 has a CGI servlet.

Has anybody tried this? Any better way to run PHP from Tomcat?
Bill
Scott Dunbar
Ranch Hand

Joined: Sep 23, 2004
Posts: 245
Bill,
I'm not sure of your configuration but I do this by having Apache httpd sitting in front of Tomcat. With mod_php installed on the httpd side you don't have to enable CGI in Tomcat.

Just a thought.


<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
That configuration with Apache as a front end is very popular, but I don't want to get involved with configuring Apache. Tomcat by itself does everything I need and is sooooo much simpler.
Bill
Guy Allard
Ranch Hand

Joined: Nov 24, 2000
Posts: 776
Well, this has an example for PHP (v4) and Tomcat (V4). Requires PHP build.

Hope it is of some worth.

Tomact And Php

Guy
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12756
    
    5
Thanks Guy, that looks promising. Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Tomcat and PHP
 
Similar Threads
using php with apache
TOMCAT/APACHE integration
where can I get php_java.jar
php as a servlet
PHP/CGI how to make it work under Resin standalone?