PHP Installation
Extract the source code to PHP in a work directory
Patch if needed (that is, patch if building PHP to run with Tomcat version 5 or later)
Run configure, then make in the top directory of the PHP sources:
./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME
make
A jar file and dynamic library are produced from the make: sapi/servlet/phpsrvlt.jar and libs/libphp4.so.
Copy the jar file to your web application's class repository, or, alternately, to Tomcat's common class repository (as is shown here):
Partager