[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: PHP on TOMCAT

EricJava do-not-reply at jboss.com
Tue Nov 18 20:55:53 EST 2008


"EricJava" wrote : You can run PHP without even needing to use any of the PHP binaries.  Check out http://www.caucho.com/resin-3.0/quercus/ 

And I just now tried it out in Tomcat 6.0.18, and it was super-simple.

1. Download Resin.  I grabbed Resin 3.1.8.

2. Unzip it

3. Grab two JARS from the resin/lib file: quercus.jar and resin-util.jar.  Put them in WEB-INF/lib of your app

4. Put in a servlet mapping:

    <servlet>
  |       <servlet-name>quercus</servlet-name>
  |       <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
  |     </servlet>
  | 
  |     <servlet-mapping>
  |         <servlet-name>quercus</servlet-name>
  |         <url-pattern>*.php</url-pattern>
  |     </servlet-mapping>
  | 

5. Create a simple test file:

<?php
  | 
  | echo "Hello world!"
  | 
  | for($i = 1; $i < 10; $i++)
  |   echo " $i ";
  | 
  | ?>
  | 

6. View it in your browser.  It works.

I'm now testing out pgAdmin

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190298#4190298

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190298



More information about the jboss-user mailing list