srcdir = @srcdir@
VPATH = @srcdir@
-LTLIBRARY_NAME = libsapi.la
+LTLIBRARY_SHARED_NAME = libphpsrvlt.la
LTLIBRARY_SOURCES = servlet.c java.c
LTLIBRARY_DEPENDENCIES = phpsrvlt.jar
phpsrvlt.jar : servlet.java ../../ext/java/reflect.java
@test -e net || mkdir net
@test -e net/php || mkdir net/php
+ @echo library=phpsrvlt>net/php/reflect.properties
+ @echo library=phpsrvlt>net/php/servlet.properties
@cp servlet.java net/php
@cp ../../ext/java/reflect.java net/php
javac net/php/reflect.java
- @echo library=php4>net/php/reflect.properties
- @echo library=php4>net/php/servlet.properties
@test ! -f reflect.class || mv reflect.class net/php # bug in KJC javac
javac -classpath .:@SERVLET_CLASSPATH@:@JAVA_CLASSPATH@ net/php/servlet.java
@test ! -f servlet.class || mv servlet.class net/php # bug in KJC javac
- zip -q0 phpsrvlt.jar net/php/*.class net/php/*.properties
+ $(JAVA_JAR) phpsrvlt.jar net/php/*.class net/php/*.properties
@rm net/php/servlet.* net/php/reflect.*
@rmdir net/php
@rmdir net
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.
+ 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.
+ 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.
+ 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.
+ 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.
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
+ 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
+ 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
+ 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