Oracle GlassFish Server 3.0.1 Scripting Framework Guide

Chapter 5 PHP

PHP is a popular scripting language that is used mainly for generating dynamic web pages. The PHP interpreter takes PHP code as input and produces web pages as output. It can be used in standalone mode, but is typically deployed on a server.

Enabling PHP on OracleGlassFishTM Server

To enable PHP, deploy the Quercus PHP interpreter to the GlassFish Server as a web module.

ProcedureTo Deploy the Quercus PHP Interpreter to the GlassFish Server

  1. Download the Quercus PHP interpreter from http://quercus.caucho.com/.

  2. Deploy the downloaded WAR file to the GlassFish Server.

  3. To verify that your PHP engine is working, enter the following URL in your browser:


    http://localhost:8080/quercus-4.0.1/

    This is the default PHP script that is available in the Quercus interpreter.

  4. Move your PHP application to a subdirectory of the Quercus directory.

    The Quercus application directory is located at domain-dir/applications/quercus-4.0.1/. For example:

    as-install/domain-dir/applications/quercus-4.0.1/myapp/

  5. To verify your PHP application is working, access your application from a browser.

    For example, enter the following URL in your browser:


    http://localhost:8080/quercus-4.0.1/myapp/
See Also

For more PHP information, documentation, and examples, see the Quercus PHP interpreter.