Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • ./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME
  • A jarfile and dynamic library are produced: sapi/servlet/phpsrvlt.jar

...

  • and libs/libphp4.so.

Copy jar to your webapp's or tomcat's common class repository:

...

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

...

  • Create a file named test.php in the docBase directory of your webapp.
  • In that file, simply put:
    +++
    <?php phpinfo(); ?>
    +++
  • Point your browser at the file by navigating to
    http://localhost:8080/test.php

...

Patch for PHP configure Script

Wiki Markup
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\]):

<html>
<pre>
— configure.org 2004-04-07 11:20:24.000000000 +0200
+++ configure 2004-04-07 11:22:50.000000000 +0200
if test "$withval" = "yes"; then
SERVLET_CLASSPATH=.
else
+ if test -f $withval/common/lib/servlet-api.jar; then
+ SERVLET_CLASSPATH=$withval/common/lib/servlet-api.jar
+ fi
+
if test -f $withval/lib/servlet.jar; then
SERVLET_CLASSPATH=$withval/lib/servlet.jar
fi
++++
</pre>
</html>