tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "d~l" <ahl1jw...@sneakemail.com>
Subject Configuring Tomcat 5.0.27 to run PHP 5.0.1 scripts
Date Wed, 15 Sep 2004 13:07:14 GMT

I may be in a minority here .. very sparse information found so far on this  ..

I would like to configure Tomcat 5.0.27 to run PHP 5.0.1 scripts on Tomcat server (in 
addition to PHP running on Apache server).

I do understand that PHP usually runs on Apache server (I have that combination 
working already).  I need a "hybrid" configuration.
______________________________________________

My configuration:-

Two servers running on same Windows XP Pro platform (localhost testing mode) ..

*   Apache 2 running PHP 5.0.1  (port 88)
*   Tomcat  5.0.27 running some webapps (port 8080)

Also, Apache server is connected to Tomcat server via mod_jk2 connector

but I also require PHP 5.0.1 scripts to run on Tomcat  5.0.27..

.. for PHP (Apache) <-------> PHP (Tomcat) inter-server communications.

______________________________________________

Searching around I found this single reference:-

http://wiki.apache.org/jakarta-tomcat/Tomcat/UsingPhp

note: on that site I read this ..

    ________________________

    3. Patch for PHP configure Script
    This is a patch for PHP's configure script to account for the servlet jar name 
    change (from servlet.jar in Servlet Spec 2.3 and previous [tomcat 4 and 
    previous] to servlet-api.jar in Servlet Spec 2.4 and above [tomcat 5 and 
    later]):
    ________________________

I do have servlet-api.jar in my Tomcat 5.0.27 configuration .. \common\lib\

Does this mean I need to compile PHP 5.0.1 from source (I have used the PHP 
binary installer, not a build)?

I have in c:\Tomcat5\common\lib\

    phpsrvlt.jar    (copied from PHP)
    servlet-api.jar
______________________________________________

Here is what I have setup so far in Tomcat 5.0.27 .. 

(1) copied  phpsrvlt.jar from c:\php\ext\     into    c:\Tomcat5\common\lib\ 

(2) enabled php_java.dll extension (from this link  .. http://uk2.php.net/java/  ) 
	not sure if I really need this .. but enabled it anyway

    extension=php_java.dll 

(3) in C:\Tomcat5\conf\web.xml .. 

    <mime-mapping> 
            <extension>php</extension> 
            <mime-type>application/x-httpd-php</mime-type> 
     </mime-mapping> 

     <welcome-file-list> 
            <welcome-file>index.php</welcome-file> 
     <welcome-file-list> 


But note ... no PHP 5.0.1 servlet mapping has yet been created in Tomcat web.xml. 

Is there a PHP 5.0.1 servlet mapping definition somewhere? 

______________________________________________

Summary:-

Is there a configuration guide anywhere for configuring PHP 5.0.1 to run on Tomcat 
5.0.27 ... showing php.ini settings, and other settings in Tomcat?

______________________________________________

Thanks

d~l


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message