Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    4

    Default Php Tomcat Issue.....

    Hi,

    I have integrated the apache with tomcat successfully and all my jsp files are now working fine on port 80 but not php files.

    In my httpd.conf I have given like this

    <IfModule mod_jk.c>
    JkMount /* ajp13
    </IfModule>

    But: Apache then does not serve PHP anymore (they get routed to Tomcat).
    When I try to access any php files,it comes with a download box.But the same file is working fine outside the tomcat.

    Our application uses both java and php.How can I make my php files work with tomcat.

    Regards,

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    4

    Default Got solution..

    Hi,

    I found the solution.

    1. Recompile Php with

    ./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME


    2. A jar file and dynamic library are produced from the make (sapi/servlet/phpsrvlt.jar and libs/libphp4.so)

    Copy the jar file to your web application's class repository, or, alternately, to Tomcat's common class repository.

    cp $PHP_HOME/sapi/servlet/phpsrvlt.jar $TOMCAT_HOME/common/lib

    3.Declare PHP servlet and servlet-mapping in the web applications web.xml file, or in Tomcat's shared web.xml

    Copy from $PHP_HOME/sapi/servlet/web.xml the servlet and servlet-mapping and paste into the file $TOMCAT_HOME/conf/web.xml.

    4. Modify your LD_LIBRARY_PATH to include the dynamic library produced

    LD_LIBRARY_PATH=$PHP_HOME/libs
    export LD_LIBRARY_PATH

    This fixed the issue for me .

    Thanks & Regards,

Similar Threads & Tags
Similar threads

  1. Issue with Tomcat
    By nitaish in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-15-2009, 10:20 AM
  2. tomcat issue in easyapache
    By gopihere in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 09-29-2008, 08:41 AM
  3. Tomcat jsp issue
    By Menta2K in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 02-22-2008, 04:37 PM
  4. Tomcat issue
    By sujai in forum New User Questions
    Replies: 2
    Last Post: 11-19-2004, 06:21 AM
  5. tomcat install issue
    By wadearnold in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 11-10-2004, 11:05 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube