Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Run PHP applications in Apache Geronimo

The PHP Java Bridge provides full support

Tyler Anderson (tyleranderson5@yahoo.com), Freelance Writer, Stexar Corp.
Tyler Anderson formerly worked for DPMG.com, an SEO company, for whom he wrote proprietary SEO software. He graduated with a degree in computer science from Brigham Young University in 2004 and has just graduated with a Master of Science degree in Computer Engineering in December 2005, also from Brigham Young University. He is currently an engineer for Stexar Corp., based in Beaverton, Oregon. You can reach Tyler at tyleranderson5@yahoo.com.

Summary:  PHP has been a popular scripting language for some time. However, with the growing buzz over Java™ technology and Apache Geronimo, a J2EE-certified application server, many experienced developers shy away from using PHP with Geronimo, because only JavaServer Pages (JSP) is supported out of the box. The PHP Java Bridge solves this problem by providing full support for PHP on Geronimo and for sharing sessions across both PHP and JSP scripts.

Date:  07 Feb 2006
Level:  Intermediate PDF:  A4 and Letter (569 KB | 25 pages)Get Adobe® Reader®

Activity:  10654 views
Comments:  

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.

About this tutorial

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.

Prerequisites

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.

1 of 11 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Java technology
ArticleID=102950
TutorialTitle=Run PHP applications in Apache Geronimo
publish-date=02072006
author1-email=tyleranderson5@yahoo.com
author1-email-cc=troy@backstopmedia.com