php-src/sapi/servlet
Zeev Suraski e9dcdb8f97 @- Improved ISAPI module - it should no longer be necessary to set PHP as
@  an ISAPI filter, only as an ISAPI extension, unless you wish to perform
@  authentication using PHP.  This didn't yet get enough testing, but it
@  should work (Zeev)
- Fixed auth_user/auth_password memory leak (I didn't have time to test it under
  Apache, feedback welcome!)
2000-02-15 23:31:10 +00:00
..
config.m4 add installation 2000-01-30 00:42:26 +00:00
Makefile.in PHP can install and run as a servlet again on Unix. 2000-01-30 20:48:33 +00:00
README First steps towards restoring sapi/servlet on Unix. 2000-01-29 13:22:47 +00:00
servlet.c @- Improved ISAPI module - it should no longer be necessary to set PHP as 2000-02-15 23:31:10 +00:00
servlet.dsp on WIN32, PHP_WIN32 and ZEND_WIN32 need to be defined 2000-02-11 23:50:01 +00:00
servlet.java PHP can install and run as a servlet again on Unix. 2000-01-30 20:48:33 +00:00
web.xml Initial alpha-level of sapi/servlet. See README for details. 1999-11-29 15:36:25 +00:00

What is PHP4 sapi/servlet?

   PHP4 sapi/servlet builds upon the mechanism defined by ext/java to enable
   the entire PHP processor to be run as a servlet.  The primary advanatage
   of this from a PHP perspective is that web servers which support servlets
   typically take great care in pooling and reusing JVMs.

   Notes:

     1) While this code is intended to be able to run on any servlet engine,
        it has only been tested on Apache's Jakarta/tomcat to date.  Bug
        reports, success stories and/or patches required to get this code
        to run on other engines would be appreciated.

     2) This code clean compiles on Win32 and Linux, and is able to process
        phpinfo() commands.  Most of the code is in place, but very little
        testing has been done on even such basic things as cookies and
        sessions.  Treat this code as early alpha at this point.

     3) Until overload resolution is addressed in php/java, much of the
        javax.servlet interfaces can not be directly called.  For example,
        don't try to get the output stream from $response, and expect to
        be able to use println.  For now, use PHP's "echo" instead.

     4) PHP has a habit of changing the working directory.  Sapi/servlet will
        eventually change it back, but while PHP is running the servlet engine
        may not be able to load any classes from the CLASSPATH which are
        specified using a relative directory syntax, or find the work directory
        used for administration and JSP compilation tasks.

Build and execution instructions:

  Most of the configuration hassles associated with ext/java are associated
  with starting the JVM, and as such do not apply to sapi/servlet.  In
  particular, no updates to php.ini are required on any operating system.

  Unix:
    Build:
      ./configure --with-servlet --with-java
    Execute:
      add phpsrvlet.jar to CLASSPATH
      add directory containing libphp4.so to LD_LIBRARY_PATH
      merge/overwrite build/tomcat/examples/WEB-INF/web.xml from sapi/servlet

  Win32:
    Build:
      add jdsk (or d:\build\tomcat\classes) to CLASSPATH
      build sapi\servlet\servlet.dsp
    Execute:
      add phpsrvlet.jar to CLASSPATH
      add directory containing php4ts.dll and phpsrvlt.dll to PATH
      merge/overwrite build\tomcat\examples\WEB-INF\web.xml from sapi\servlet