tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: PHP from Tomcat , some news from JFC :)
Date Wed, 07 Apr 2004 15:26:36 GMT
Nice :-)

Did you try it ? I'm curious, could you run a quick helo world benchmark 
( helo.jsp / help.php ) ?

The big question is the level of integration - i.e. if you can call java
objects from php or use some of the nice PHP features from java.


Costin

Henri Gomez wrote:
> Hi to all,
> 
> Mladen discussed about using PHP from Tomcat.
> 
> Jean-Frederic Clere make some tests during his vacation
> and send me the following mail to be forwarded to the list :
> 
> ....
> 
> Good news, tomcat+php it's easy, php allready have support for.
> I make a simple try and here's the resulting 'readme' :
> ++++
> Using php in Tomcat5: Easy a servlet is available in php (I have tried with
> php-4.3.5)
> 
> configure the php with:
> ./configure --with-servlet=$TOMCAT_HOME --with-java=$JAVA_HOME
> a jarfile and dynamic library are produced:
> - sapi/servlet/phpsrvlt.jar
> - libs/libphp4.so
> 
> Copy jarfile and arrange web.xml:
> cp $PHP_HOME/sapi/servlet/phpsrvlt.jar $TOMCAT_HOME/common/lib
> copy the $PHP_HOME/sapi/servlet/web.xml servlet and servlet-mapping in the
> $TOMCAT_HOME/conf/web.xml
> 
> Start the Tomcat:
> LD_LIBRARY_PATH=$PHP_HOME/libs
> export LD_LIBRARY_PATH
> $TOMCAT_HOME/bin/catalina.sh start
> 
> Try it:
> Create a file named ./webapps/ROOT/test.php containing:
> +++
> <?php phpinfo(); ?>
> +++
> Call it:
> http://localhost:8080/test.php
> 
> Patch for the configure of php:
> 
> --- 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
> ++++


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message