Before you start
This tutorial is for you if you're a PHP developer who would like to start using Apache Geronimo as your application server, or if you're an application developer who would like to start developing PHP applications on your Java 2 Platform, Enterprise Edition (J2EE)-certified Geronimo application server. This tutorial is also for you if you'd like to build PHP and JSP applications that can be used together by sharing sessions. A simple IQ test application is used in this tutorial to test standard PHP functionality and the capability for PHP and Java applications to share sessions via the PHP Java Bridge.
PHP is a popular scripting language, much like the natively supported JSP in Geronimo. However, by default, Geronimo doesn't support PHP. This tutorial details, step by step, how to run PHP applications in Apache Geronimo. The application you build is a simple IQ system for your company, Smart IQ Inc., where a user answers questions and gets a fictional IQ score at the end. This application tests the standard scripting capabilities of PHP while sharing sessions with Java language (JSP), used in conjunction with Tomcat, Geronimo, and the PHP Java Bridge.
The following tools are needed to follow along with this tutorial:
- Java code -- Geronimo requires Java language (Version 1.4.2_08 or later, but before 1.5). Download Java code from Sun Microsystems.
- Apache Geronimo -- After you download Java code, download Apache Geronimo, Version 1.0 from Apache. Select the Geronimo 1.0 with Tomcat distribution in either the .zip (Microsoft® Windows® or Linux®) or the .tar.gz (Linux) format from the Binaries section.
- PHP Java Bridge -- This tutorial uses the PHP Java Bridge, Version 3.0.6. The PHP Java Bridge is comprised of two downloads. The first is the PHP Java Bridge binary itself, which contains the necessary Java extension. Download the php-java-bridge binary for either Windows or Linux/Solaris. The second download is the J2EE .war file that you need to deploy full PHP functionality on Geronimo (version 5.0 is the latest supported for Windows; version 5.1 is the latest supported for Linux/Solaris). Download the J2EE .war file.