Ir al contenido principal

PHP On Tomcat

Fue tomado de http://fabien.duminy.ifrance.com/blog/archives/2007/08/entry_14.html

tomcat and php

Here are the steps to run php in tomcat :

  1. Download tomcat and unzip the archive where you want (=> TOMCAT_DIR)
  2. Create the following directories : TOMCAT_DIR/webapps/testPHP
  3. If necessary, create directory TOMCAT_DIR/common/lib (it seems, at least with tomcat 6, that the directory is no more created)
  4. Edit the file TOMCAT_DIR/conf/catalina.properties and modify the line for property shared.loader :
    shared.loader=${catalina.home}/common/classes,${catalina.home}/common/lib/*.jar
  5. Edit the file TOMCAT_DIR/conf/web.xml and add the lines mentionned below (see 'lines to add to web.xml of your tomcat installation')
  6. To download quercus ( a php 5 engine written in pure java), you must in fact download resin because quercus can't be downloaded separately
  7. Unzip the archive to RESIN_DIR
  8. Copy the 2 files RESIN_DIR/lib/resin-util.jar and RESIN_DIR/lib/quercus.jar to the directory TOMCAT_DIR/common/lib (see step 3)
  9. Now, in the directory TOMCAT_DIR/webapps/testPHP, create a file named test.php with the following content :
  10. start tomcat (TOMCAT_DIR/bin/startup.sh) if you have not already done
  11. Enter the following url in your web browser : http://localhost:8080/testPHP/test.php
  12. You should get a screen like the following (values may vary) :
------------ expected result screen ---------------------------------

Quercus

PHP Version => 5.2.0
System => Linux 2.6.20-16-generic amd64
Build Date => 20070628T2777
Configure Command => n/a
Server API => CGI
Virtual Directory Support => disabled
Configuration File (php.ini) Path => WEB-INF/php.ini
PHP API => 20031224
PHP Extension => 20041030
Debug Build => no
Thread Safety => enabled
Registered PHP Streams => php, file, http, https

PHP Variables

............
----------------------------------------------------------------
------------ lines to add to web.xml of your tomcat installation ---------
quercus
com.caucho.quercus.servlet.QuercusServlet
text/html
quercus
*.php
----------------------------------------------------------------
And Voila, you have a running php engine in your tomcat webserver :-)

Comentarios

Publicar un comentario

Debes estar registrado en el blog para poder enviar tus comentarios.

Entradas populares de este blog

Seguridad de Servicios de Internet Information Server 6.0

Seguridad de Servicios de Internet Information Server 6.0 En esta página Introducción Antes de comenzar Reducción del ámbito de ataque en el servidor Web Configuración de cuentas Configuración de seguridad para archivos y directorios Seguridad en sitios Web y directorios virtuales Configuración del nivel de sockets seguro (Secure Sockets Layer, SSL) en el servidor Web Introducción Los servidores Web son objetivo frecuente de distintos tipos de ataques de seguridad. Algunos de estos ataques son lo suficientemente graves como para causar daños importantes en factores como activos empresariales, productividad o relaciones con el cliente; todos ellos son inoportunos y resultan frustrantes. La seguridad de los servidores Web es fundamental para el éxito de su empresa. En este documento se analiza cómo comenzar el proceso de seguridad de un servidor Web que ejecuta Servicios de Internet Information Server (IIS) 6.0 con el sistema operativo Microsoft...

Vulnerabilidad en Bluetooth -- BIAS

Será el fin de TCP con la llegada de HTTP/3

La  IETF (Internet Engineering Task Force)  ha  publicado  información sobre lo que será el nuevo protocolo de transferencia de hypertexto que tanto usamos a diario, cuando accedemos a sitios web. HTTP/3 ya no usará TCP nunca más. En su lugar se ejecutará sobre el protocolo QUIC. El protocolo QUIC fue elaborado conceptualmente por Google en 2012 y tiene como objetivo mejorar tanto la seguridad como el rendimiento ofrecido por  TCP - Transmission Control Protocol , sobre todo lo segundo. ¿Qué es Quic y sus diferencias con TCP?   Quick UDP Internet Connections, es un protocolo de capa de transporte que se basa en el multiplexado de conexiones UDP. De hecho, QUIC utiliza esta combinación: TCP + TLS + SDPY sobre UDP Esto lo hace con varias mejoras respecto a la actual implementación de TCP. La IETF ha estado desde 2016 trabajando a fondo con una versión global del protocolo alumbra do por Google, y finalmente ha sido este año cuando ha decidido incluirlo en la ...