Configure Tomcat to run PHP scripts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kodaliece@gmail.com

    Configure Tomcat to run PHP scripts

    Hello Everyone,

    I am trying to configure Tomcat5.5 to run PHP5.2.5 scripts on linux
    machine. I got some information from http://wiki.apache.org/tomcat/UsingPhp
    as how to do this. First, It says to apply patch to configuration file
    and then apply a patch to sapi/servlet/servlet.java. But I am stuck at
    the first step it self. In the first step it says to apply a patch.
    But I could not get which file I've to modigy and where. I firmly
    bellieve that this is because the article talks about PHP version 4
    and Tomcat version >= 4 and I am using a higher version of PHP. I said
    this because I couldn't find servlet/servlet.java under the folder
    sapi. Please correct me if I am doing anything wrong here.

    Can anyone give me the compatibility matrix of PHP versions and Tomcat
    versions or atleast the highet compatible version of PHP with Tomcat
    5.5.

    Also, please give me a detailed procedure about configuring Tomcat5.5
    to run with PHP5.2.5 on linux machine. I am new to this technology.
    So, please give a detailed procedure.

    Thanks in advance,
    Mohan
  • Jerry Stuckle

    #2
    Re: Configure Tomcat to run PHP scripts

    kodaliece@gmail .com wrote:
    Hello Everyone,
    >
    I am trying to configure Tomcat5.5 to run PHP5.2.5 scripts on linux
    machine. I got some information from http://wiki.apache.org/tomcat/UsingPhp
    as how to do this. First, It says to apply patch to configuration file
    and then apply a patch to sapi/servlet/servlet.java. But I am stuck at
    the first step it self. In the first step it says to apply a patch.
    But I could not get which file I've to modigy and where. I firmly
    bellieve that this is because the article talks about PHP version 4
    and Tomcat version >= 4 and I am using a higher version of PHP. I said
    this because I couldn't find servlet/servlet.java under the folder
    sapi. Please correct me if I am doing anything wrong here.
    >
    Can anyone give me the compatibility matrix of PHP versions and Tomcat
    versions or atleast the highet compatible version of PHP with Tomcat
    5.5.
    >
    Also, please give me a detailed procedure about configuring Tomcat5.5
    to run with PHP5.2.5 on linux machine. I am new to this technology.
    So, please give a detailed procedure.
    >
    Thanks in advance,
    Mohan
    >
    Mohan,

    You will have to build PHP from the source code. For this you will need
    the gcc compiler plus development libraries for other products you might
    want to use, i.e. mysql, gd, etc.

    If you've never built something from scratch before, you probably have a
    lot of downloading to do.

    The file hasn't changed. It is still configure, and is available with
    the source code download. Lines may have changed, however, so you may
    need to do some looking through the file to determine exactly where the
    patch goes, and modify it accordingly.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • kodaliece@gmail.com

      #3
      Re: Configure Tomcat to run PHP scripts

      Hi Jerry,

      So, you mean to say that PHP 5.2.5 scripts can be run on Tomcat5.5. In
      that case what about the second path to java file (sapi/servlet/
      servlet.java). I could not find this path at all.

      can you please give me some more information on this?

      Thanks
      Mohan


      On Feb 12, 10:21 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      kodali...@gmail .com wrote:
      Hello Everyone,
      >
      I am trying to configure Tomcat5.5 to run PHP5.2.5 scripts on linux
      machine. I got some information fromhttp://wiki.apache.org/tomcat/UsingPhp
      as how to do this. First, It says to apply patch to configuration file
      and then apply a patch to sapi/servlet/servlet.java. But I am stuck at
      the first step it self. In the first step it says to apply a patch.
      But I could not get which file I've to modigy and where. I firmly
      bellieve that this is because the article talks about PHP version 4
      and Tomcat version >= 4 and I am using a higher version of PHP. I said
      this because I couldn't find servlet/servlet.java under the folder
      sapi. Please correct me if I am doing anything wrong here.
      >
      Can anyone give me the compatibility matrix of PHP versions and Tomcat
      versions or atleast the highet compatible version of PHP with Tomcat
      5.5.
      >
      Also, please give me a detailed procedure about configuring Tomcat5.5
      to run with PHP5.2.5 on linux machine. I am new to this technology.
      So, please give a detailed procedure.
      >
      Thanks in advance,
      Mohan
      >
      Mohan,
      >
      You will have to build PHP from the source code.  For this you will need
      the gcc compiler plus development libraries for other products you might
      want to use, i.e. mysql, gd, etc.
      >
      If you've never built something from scratch before, you probably have a
      lot of downloading to do.
      >
      The file hasn't changed.  It is still configure, and is available with
      the source code download.  Lines may have changed, however, so you may
      need to do some looking through the file to determine exactly where the
      patch goes, and modify it accordingly.
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstuck...@attgl obal.net
      =============== ===- Hide quoted text -
      >
      - Show quoted text -

      Comment

      • Jerry Stuckle

        #4
        Re: Configure Tomcat to run PHP scripts

        kodaliece@gmail .com wrote:
        On Feb 12, 10:21 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
        >kodali...@gmai l.com wrote:
        >>Hello Everyone,
        >>I am trying to configure Tomcat5.5 to run PHP5.2.5 scripts on linux
        >>machine. I got some information fromhttp://wiki.apache.org/tomcat/UsingPhp
        >>as how to do this. First, It says to apply patch to configuration file
        >>and then apply a patch to sapi/servlet/servlet.java. But I am stuck at
        >>the first step it self. In the first step it says to apply a patch.
        >>But I could not get which file I've to modigy and where. I firmly
        >>bellieve that this is because the article talks about PHP version 4
        >>and Tomcat version >= 4 and I am using a higher version of PHP. I said
        >>this because I couldn't find servlet/servlet.java under the folder
        >>sapi. Please correct me if I am doing anything wrong here.
        >>Can anyone give me the compatibility matrix of PHP versions and Tomcat
        >>versions or atleast the highet compatible version of PHP with Tomcat
        >>5.5.
        >>Also, please give me a detailed procedure about configuring Tomcat5.5
        >>to run with PHP5.2.5 on linux machine. I am new to this technology.
        >>So, please give a detailed procedure.
        >>Thanks in advance,
        >>Mohan
        >Mohan,
        >>
        >You will have to build PHP from the source code. For this you will need
        >the gcc compiler plus development libraries for other products you might
        >want to use, i.e. mysql, gd, etc.
        >>
        >If you've never built something from scratch before, you probably have a
        >lot of downloading to do.
        >>
        >The file hasn't changed. It is still configure, and is available with
        >the source code download. Lines may have changed, however, so you may
        >need to do some looking through the file to determine exactly where the
        >patch goes, and modify it accordingly.
        >>
        >--
        >============== ====
        >Remove the "x" from my email address
        >Jerry Stuckle
        >JDS Computer Training Corp.
        >jstuck...@attg lobal.net
        >============== ====- Hide quoted text -
        >>
        >- Show quoted text -
        >
        >
        Hi Jerry,
        >
        So, you mean to say that PHP 5.2.5 scripts can be run on Tomcat5.5. In
        that case what about the second path to java file (sapi/servlet/
        servlet.java). I could not find this path at all.
        >
        can you please give me some more information on this?
        >
        Thanks
        Mohan
        >
        >
        (Top posting fixed)

        I've never tried it, but from the page you referenced, it looks like it can.

        And it looks like you need to find where your servlet.java file is and
        reference it.

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        Working...