setting up php with Apache Tomcat/4.1.27 ???
Results 1 to 3 of 3

Thread: setting up php with Apache Tomcat/4.1.27 ???

  1. #1
    Junior Member
    Join Date
    Dec 2003

    Question setting up php with Apache Tomcat/4.1.27 ???


    i currently running "Apache Tomcat/4.1.27" , which i use for development of JSP pages.

    What im trying to get some advice on, how could i set up my computer, so that i run a "php" pages.

    What would i have to change? include? etc....

    I am also running mysql.


  2. #2
    Senior Member
    Join Date
    Dec 2003
    Cleveland Ohio
    I did this with a Win2k box earlier this year.

    You'll need a flavor of Apache. If you want to live on the edge, go with v2.x. If you prefer stable, go with v1.3.x.

    - Install Apache.
    - Install PHP
    - Make sure Apache is listening on a different port then Tomcat
    - Make sure Apache dishes web pages
    - Make sure Apache dishes PHP pages

    There's an Apache/Tomcat/Jakarta connector you'll need to install. I sadly don't have the links, but the info in the last sentence should get you started on google or on Tomcat's web site. For Win2k, the install wasn't too bad - BUT READ THE DIRECTIONS. This part can be the trickiest.

    What you end up doing is setting up Apache to intercept all web traffic. Apache has a list (which you'll provide it) of Java/Tomcat URLs and home directories. Apache will check the inbound request and if there's a match, will pass the request off to Tomcat. Tomcat then pipes everything through Apache - which is kinda cool. I've got Tomcat on 8080 (I think) and it Apache on port 80. To get to a Tomcat app, I'd normally have to do http://[tomcat]:8080/[app dir]. But because Apache is in the mix, you'll be able to just do: http://[server]/[app dir] and your Java app will come up (assuming you have everything working). This is getting fancy, but the integration will be seamless.

    The PHP will strictly be driven by Apache. And the Java strictly driven by Tomcat. The two languages won't be able to talk directly to each other unless you get creative (they can share databases - I've got MySQL on this box and both talk regularly to the databases).

    If the connector approach is for you, plan ahead. Read up on all the docs you can find. Ask questions. Be patient. Experiment with the config if it doesn't work at first. And set aside some time - you may find you'll need either a couple hours or a few days to make this all work.

  3. #3
    Junior Member
    Join Date
    Dec 2003
    Ok, thanks

    So what i can gather from you is that apache and tomcat are two seperate processes/programs?

    I current have apache/tomcat running on port 8080

    so i run stuff from http://localhost:8080/

    and have each folder defined in a "web.xml" file as a servlet


    So how would i define this as im moving from java servlets to PHP? or do i have both running along each other, e.g. being able to run both JSP and PHP scripts?

    Thanks for your time

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts