Skip Headers
Oracle® HTTP Server Administrator's Guide
10g Release 2 (10.2)

Part Number B14190-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

7 Understanding Modules

This chapter describes the modules (mods) included in Oracle HTTP Server. The modules extend the basic functionality of the Web server, and support integration between Oracle HTTP Server and other Oracle Database components.

Documentation from the Apache Software Foundation is referenced when applicable.

Note:

Readers using this guide in PDF or hard copy formats will be unable to access third-party documentation, which Oracle provides in HTML format only. To access the third-party documentation referenced in this guide, use the HTML version of this guide and click the hyperlinks.

7.1 List of Modules

Table 7-1 lists all the Oracle HTTP Server modules discussed in this chapter.

7.2 mod_access

Controls access to the server based on characteristics of a request, such as hostname or IP address.

See Also:

Module mod_access in the Apache Server documentation.

7.3 mod_actions

Enables execution of CGI scripts based on file type or request method.

See Also:

Module mod_actions in the Apache Server documentation.

7.4 mod_alias

Enables manipulation of URLs in processing requests. It provides mapping between URLs and file system paths, and URL redirection capabilities.

See Also:

Module mod_alias in the Apache Server documentation.

7.5 mod_asis

Enables sending files that contain their own HTTP headers.

See Also:

Module mod_asis in the Apache Server documentation.

7.6 mod_auth

Enables user authentication with files based user lists.

See Also:

Module mod_auth in the Apache Server documentation.

7.7 mod_auth_anon

Enables anonymous user access to protected areas (similar to anonymous FTP, where the email addresses can be logged).

See Also:

Module mod_auth_anon in the Apache Server documentation.

7.8 mod_auth_dbm

Uses DBM files to provide user authentication.

See Also:

Module mod_auth_dbm in the Apache Server documentation.

7.9 mod_autoindex

Generates directory indexes automatically.

See Also:

Module mod_autoindex in the Apache Server documentation.

7.10 mod_cern_meta

Emulates CERN (Conseil Europeen pour le Recherche Nucleaire) HTTPD metafile semantics. Metafiles are additional HTTP headers that can be produced for each file the server accesses, in addition to the typical set.

See Also:

Module mod_cern_meta in the Apache Server documentation.

7.11 mod_certheaders

Allows reverse proxies that terminate SSL connections in front of Oracle HTTP Server, such as OracleAS Web Cache, to transfer information regarding SSL connection, such as SSL client certificate information, to Oracle HTTP Server, and applications running behind Oracle HTTP Server. This information is transferred from the reverse proxy to Oracle HTTP Server using HTTP headers. The information is transferred from the headers to the standard CGI environment variable, which mod_ossl or mod_ssl populates if the SSL connection is terminated by Oracle HTTP Server. It is an Oracle module.

It also allows certain requests to be treated as HTTPS requests even though they are received through HTTP. This is done using the SimulateHttps and AddCertHeader directives.

SimulateHttps takes the container it is contained within, such as <VirtualHost>, <Location>, and so on, and treats all requests received for this container as if they were received through HTTPS, regardless of the real protocol that the request was received through.

AddCertHeader is specifically for use with OracleAS Web Cache. For OracleAS Web Cache, it adds a special header that indicates to Oracle HTTP Server which requests OracleAS Web Cache received through HTTPS. mod_certheaders triggers Oracle HTTP Server to only treat those cases where OracleAS Web Cache received the request as HTTPS as if Oracle HTTP Server received it through HTTPS.

Perform the following steps to configure mod_certheaders:

  1. Configure Oracle HTTP Server to load mod_certheaders. To do this, add a LoadModule directive to httpd.conf file:

    • UNIX: LoadModule certheaders_module libexec/mod_certheaders.so

    • Windows: LoadModule certheaders_module modules/ApacheModuleCertHeaders.dll

  2. Specify which headers should be translated to CGI environment variables. This can be achieved by using the AddCertHeader directive. This directive takes a single argument, which is the CGI environment variable that should be populated from a HTTP header on incoming requests. For example, to populate the SSL_CLIENT_CERT CGI environment variable, add the following line to httpd.conf:

    AddCertHeader SSL_CLIENT_CERT
    
    

    The AddCertHeader directive can be a global setting if it is placed in the base virtual server section of httpd.conf. It can be specific to a single virtual host by placing it within a virtual host container, or it can be specific to a set of URIs by placing it within a <Directory> or <Location> container directive within httpd.conf. The combination of these directives are additive, so that for a given URI, all directives that are specific to that URI will be added to any that are specific to that request's virtual host, which will be added to any that is defined for that base virtual host.

    Table 7-2 lists all the supported CGI environment variables with their corresponding HTTP header names.

    Table 7-2 CGI Environment Variables with Corresponding Header Names

    CGI Variable Header Name CGI Variable Header Name
    SSL_PROTOCOL SSL-Protocol SSL_SESSION_ID SSL-Session_Id
    SSL_CIPHER SSL-Cipher SSL_CIPHER_EXPORT SSL-Cipher-Export
    SSL_CIPHER_ALGKEYSIZE SSL-Cipher-Algkeysize SSL_VERSION_LIBRARY SSL-Version-Library
    SSL_CLIENT_CERT SSL-Client-Cert SSL_VERSION_INTERFACE SSL-Version-Interface
    SSL_CLIENT_CERT_CHAIN_n SSL-Client-Cert-Chain-n SSL_CIPHER_USEKEYSIZE SSL-Cipher-Usekeysize
    SSL_CLIENT_VERIFY SSL-Client-Verify SSL_SERVER_CERT SSL-Server-Cert
    SSL_CLIENT_M_VERSION SSL-Client-M-Version SSL_SERVER_M_VERSION SSL-Server-M-Version
    SSL_CLIENT_M_SERIAL SSL-Client-M-Serial SSL_SERVER_M_SERIAL SSL-Server-M-Serial
    SSL_CLIENT_V_START SSL-Client-V-Start SSL_SERVER_V_END SSL-Server-V-End
    SSL_CLIENT_V_END SSL-Client-V-End SSL_SERVER_V_END SSL-Server-V-End
    SSL_CLIENT_S_DN SSL-Client-S-DN SSL_SERVER_S_DN SSL-Server-S-DN
    SSL_CLIENT_S_DN_C SSL-Client-S-DN-C SSL_SERVER_S_DN_C SSL-Server-S-DN-C
    SSL_CLIENT_S_DN_ST SSL-Client-S-DN-ST SSL_SERVER_S_DN_ST SSL-Server-S-DN-ST
    SSL_CLIENT_S_DN_L SSL-Client-S-DN-L SSL_SERVER_S_DN_L SSL-Server-S-DN-L
    SSL_CLIENT_S_DN_O SSL-Client-S-DN-O SSL_SERVER_S_DN_O SSL-Server-S-DN-O
    SSL_CLIENT_S_DN_OU SSL-Client-S-DN-OU SSL_SERVER_S_DN_OU SSL-Server-S-DN-OU
    SSL_CLIENT_S_DN_CN SSL-Client-S-DN-CN SSL_SERVER_S_DN_CN SSL-Server-S-DN-CN
    SSL_CLIENT_S_DN_T SSL-Client-S-DN-T SSL_SERVER_S_DN_T SSL-Server-S-DN-T
    SSL_CLIENT_S_DN_I SSL-Client-S-DN-I SSL_SERVER_S_DN_I SSL-Server-S-DN-I
    SSL_CLIENT_S_DN_G SSL-Client-S-DN-G SSL_SERVER_S_DN_G SSL-Server-S-DN-G
    SSL_CLIENT_S_DN_S SSL-Client-S-DN-S SSL_SERVER_S_DN_S SSL-Server-S-DN-S
    SSL_CLIENT_S_DN_D SSL-Client-S-DN-D SSL_SERVER_S_DN_D SSL-Server-S-DN-D
    SSL_CLIENT_S_DN_UID SSL-Client-S-DN-Uid SSL_SERVER_S_DN_UID SSL-Server-S-DN-Uid
    SSL_CLIENT_S_DN_Email SSL-Client-S-DN-Email SSL_SERVER_S_DN_Email SSL-Server-S-DN-Email
    SSL_CLIENT_I_DN SSL-Client-I-DN SSL_SERVER_I_DN SSL-Server-I-DN
    SSL_CLIENT_I_DN_C SSL-Client-I-DN-C SSL_SERVER_I_DN_C SSL-Server-I-DN-C
    SSL_CLIENT_I_DN_ST SSL-Client-I-DN-ST SSL_SERVER_I_DN_ST SSL-Server-I-DN-ST
    SSL_CLIENT_I_DN_L SSL-Client-I-DN-L SSL_SERVER_I_DN_L SSL-Server-I-DN-L
    SSL_CLIENT_I_DN_O SSL-Client-I-DN-O SSL_SERVER_I_DN_O SSL-Server-I-DN-O
    SSL_CLIENT_I_DN_OU SSL-Client-I-DN-OU SSL_SERVER_I_DN_OU SSL-Server-I-DN-OU
    SSL_CLIENT_I_DN_CN SSL-Client-I-DN-CN SSL_SERVER_I_DN_CN SSL-Server-I-DN-CN
    SSL_CLIENT_I_DN_T SSL-Client-I-DN-T SSL_SERVER_I_DN_T SSL-Server-I-DN-T
    SSL_CLIENT_I_DN_I SSL-Client-I-DN-I SSL_SERVER_I_DN_I SSL-Server-I-DN-I
    SSL_CLIENT_I_DN_G SSL-Client-I-DN-G SSL_SERVER_I_DN_G SSL-Server-I-DN-G
    SSL_CLIENT_I_DN_S SSL-Client-I-DN-S SSL_SERVER_I_DN_S SSL-Server-I-DN-S
    SSL_CLIENT_I_DN_D SSL-Client-I-DN-D SSL_SERVER_I_DN_D SSL-Server-I-DN-D
    SSL_CLIENT_I_DN_UID SSL-Client-I-DN-Uid SSL_SERVER_I_DN_UID SSL-Server-I-DN-Uid
    SSL_CLIENT_I_DN_Email SSL-Client-I-DN-Email SSL_SERVER_I_DN_Email SSL-Server-I-DN-Email
    SSL_CLIENT_A_SIG SSL-Client-A-Sig SSL_SERVER_A_SIG SSL-Server-A-Sig
    SSL_CLIENT_A_KEY SSL-Client-A-Key SSL_SERVER_A_KEY SSL-Server-A-Key

  3. mod_certheaders can be used to instruct Oracle HTTP Server to treat certain requests as if they were received through HTTPS even though they were received through HTTP. This is useful when Oracle HTTP Server is front-ended by a reverse proxy or load balancer, which acts as a termination point for SSL requests, and forwards the requests to Oracle HTTP Server through HTTPS.

    If OracleAS Web Cache is being used as the load balancer, it sends an HTTP header that identifies all requests it received through HTTPS. This means that mod_certheaders automatically detects which requests should be treated as HTTPS requests by simply looking for this header. To enable this, add the following directive to httpd.conf:

    AddCertHeader HTTPS
    
    

    This affects all URLs processed by Oracle HTTP Server.

    For other load balancers, mod_certheaders must be explicitly configured to determine which requests should be treated as HTTPS requests. To do this, use the following directive:

    SimulateHttps on
    
    

    SimulateHttps can be embedded within a virtual host, such as:

    <VirtualHost localhost:7777>
        SimulateHttps on
        .
        .
        .
    </VirtualHost>
    
    

    This tells mod_certheaders to treat every request handled by this virtual host as HTTPS, or the directive can be placed within a <LocationMatch>, <Directory>, or <DirectoryMatch> directive container such as:

    <Location /foo/>
        SimulateHttps on
    </Location>
    
    

    This limits it to URLs starting with /foo/.

7.12 mod_cgi

Enables the server to run CGI scripts.

See Also:

Module mod_cgi in the Apache Server documentation.

7.13 mod_define

Enables the Define directive, which defines a variable that can be expanded on any configuration line. The Define directive has the status Extension, which means that it is not compiled into the server by default.

This module requires Extended API (EAPI). Oracle HTTP Server always has EAPI-enabled.

This module is available on UNIX systems only.

7.14 mod_digest

Uses an older version of the MD5 Digest Authentication specification than that used in mod_auth_digest to provide user authentication. mod_digest probably only works with older browsers.

See Also:

Module mod_digest in the Apache Server documentation.

7.15 mod_dir

Enables the server to perform slash (/) redirects. Directories must contain a trailing slash. If a request for a URL without a trailing slash is received, mod_dir redirects the request to the same URL followed by a trailing slash. For example:

http://myserver/documents/mydirectory

is redirected to

http://myserver/documents/mydirectory/

See Also:

Module mod_dir in the Apache Server documentation.

7.16 mod_dms

Enables you to monitor performance of site components with Oracle's Dynamic Monitoring Service (DMS). It is an Oracle module.

7.17 mod_env

Enables you to control the environment for CGI scripts and SSI (Server Side Includes) pages by passing, setting, and unsetting environment variables.

ModifyEnv appends or prepends a value to an existing ENV variable's value, and passes it into the Oracle HTTP Server environment. The following is the usage:

Let $FOO = "foo":

ModifyEnv FOO "bar" modifies the value of $FOO from "foo" to "foo:bar"

ModifyEnv FOO "+bar" modifies the value of $FOO from "foo" to "bar:foo"

Let $FOO be undefined:

Modify Foo "bar" sets the value of $FOO to "bar"

See Also:

Module mod_env in the Apache Server documentation.

7.18 mod_example

Provides examples and guidance on how to write modules using the Apache API. When implemented, it demonstrates module callbacks triggered by the server.

See Also:

Module mod_example in the Apache Server documentation.

7.19 mod_expires

Enables the server to generate Expires HTTP headers, which provide information to the client about document validity. Documents are served from the source if, based on the expiration criteria, the cached copy has expired.

See Also:

Module mod_expires in the Apache Server documentation.

7.20 mod_fastcgi

Supports the FastCGI protocol, which enables you to maintain a pool of running servers for CGI applications, thereby eliminating start-up and initialization overhead.

7.21 mod_headers

Enables you to merge, replace, or remove HTTP response headers.

See Also:

Module mod_headers in the Apache Server documentation.

7.22 mod_imap

Enables server-side image map processing.

See Also:

Module mod_imap in the Apache Server documentation.

7.23 mod_include

Provides a filter that processes documents for SSI (Server Side Includes) directives.

See Also:

Module mod_include in the Apache Server documentation.

7.24 mod_info

Summarizes the entire server configuration, including all installed modules and directive settings.

See Also:

Module mod_info in the Apache Server documentation.

7.25 mod_log_agent

Enables logging of client user agents. It is deprecated; you should use mod_log_config instead of mod_log_agent.

7.26 mod_log_config

Provides configurable, customizable logging of server activities. You can choose the log format, and select or exclude individual requests for logging, based on characteristics of the requests.

See Also:

Module mod_log_config in the Apache Server documentation.

7.27 mod_log_referer

Enables logging of documents that reference documents on the server. It is deprecated; you should use mod_log_config instead of mod_log_referer.

7.28 mod_mime

Enables the server to determine the type of a file from its filename, and associate files with handlers for processing.

See Also:

Module mod_mime in the Apache Server documentation.

7.29 mod_mime_magic

Enables the server to determine the MIME type of a file by examining a few bytes of its content. It is used in cases when mod_mime cannot determine a file type. Make sure that mod_mime appears before mod_mime_magic in the configuration file, so that mod_mime processes the files first.

See Also:

Module mod_mime_magic in the Apache Server documentation.

7.30 mod_mmap_static

Maps a list of files into memory, useful for frequently requested files that are not changed often.

See Also:

Module mod_mmap_static in the Apache Server documentation.

7.31 mod_negotiation

Enables the server for content negotiation (selection of documents based on the client's capabilities).

See Also:

Module mod_negotiation in the Apache Server documentation.

7.32 mod_onsint

Provides integration support with Oracle Notification Service (ONS) and Oracle Process Manager and Notification Server (OPMN). It is an Oracle module.

7.32.1 Benefits of mod_onsint

mod_onsint provides the following functionality:

  • Provides a subscription mechanism for ONS notifications within Oracle HTTP Server. This is particularly important on UNIX where Oracle HTTP Server employs a multi-process architecture. In such an architecture, it is not feasible to have an ONS subscriber in each process since there are up to 8192 processes that comprise a single Oracle HTTP Server instance. Instead, mod_onsint provides a single process that receives notification for all modules within an Oracle HTTP Server instance.

  • Publishes PROC_READY ONS notifications so that other components such as OPMN and OC4J are notified that the listener is up and ready. It also provides information such as DMS metrics and information about how the listener can be contacted. These notifications are sent periodically by mod_onsint as long as the Oracle HTTP Server instance is running.

  • Provides functionality that allows Oracle HTTP Server to terminate as a single unit if the parent process fails. The parent process is responsible for starting and stopping all of the child processes for an Oracle HTTP Server instance. The failure of the parent process without first shutting down the child processes leaves Oracle HTTP Server in an inconsistent state that can only be fixed by manually killing all of the orphaned child processes. Until this is done, a new Oracle HTTP Server instance cannot be started since the orphaned child processes still occupy the ports Oracle HTTP Server wants to use. mod_onsint provides a monitor of the parent process. If it detects that the parent process has died, it kills all of the remaining child processes. When combined with OPMN, this provides restartability for Oracle HTTP Server in the case of a parent process failure. mod_onsint ensures that all of the Oracle HTTP Server child processes die, leaving the ports open for a new Oracle HTTP Server instance. OPMN ensures that a new instance is started once the failure of the original instance is detected.

7.32.2 Implementation Differences on UNIX and Windows

Due to the difference in architecture of Oracle HTTP Server on UNIX and Windows, the implementation of mod_onsint varies slightly on these platforms.

On UNIX, mod_onsint spawns a process at module initialization time. This process is responsible for watching the parent process as well as sending and receiving ONS messages. Callback functions from other modules interested in ONS notifications are made in this process. For this information to be shared with other Oracle HTTP Server child processes, the use of an interprocess communication method such as a memory mapped file must be used. If a failure of a parent process is detected on UNIX, a signal is sent to all the other child processes, causing them to shut down.

On Windows, Oracle HTTP Server consists of only two processes, the parent and a multi-threaded child that handles all of the HTTP requests. In this model, mod_onsint runs as a thread within the child process. This thread watches the parent process as well as sending and receiving ONS messages. Callback functions from other modules interested in ONS notifications are made in the child process. If a failure of the parent process is detected, the mod_onsint terminates the child process, effectively shutting down Oracle HTTP Server.

There is an optional directive called OpmnHostPort that can be configured for mod_onsint. This directive enables you to specify a hostname and port that OPMN should use for pinging the Oracle HTTP Server instance that mod_onsint is running in. If OpmnHostPort is not specified, mod_onsint chooses an HTTP port automatically. In certain circumstances, you may want to choose a specific HTTP port and hostname that OPMN should use to ping the listener with.

OpmnHostPort takes a single argument which is a host:port string that specifies the values to pass to OPMN. For example, the following line would specify that OPMN should use the localhost interface and port 7778 to ping this listener:

OpmnHostPort localhost: 7778

This directive must be in the global section of the httpd.conf file. It cannot be embedded into any virtual host of location container. After installation, an OpmnHostPort directive is located in dms.conf. It points OPMN to the Oracle HTTP Server "diagnostic port", which is a special localhost only virtual host. It does not log internal diagnostic requests such as OPMN pings and DMS metric requests from Application Server Control Console.

7.33 mod_ossl

Enables strong cryptography for Oracle HTTP Server. This Oracle module is plug-in to Oracle HTTP Server that enables the server to use SSL. It is very similar to the OpenSSL module, mod_ssl. However, in contrast to the OpenSSL module, mod_ossl is based on the Oracle implementation of SSL, which supports SSL, version 3, and is based on Certicom and RSA Security technology.

7.34 mod_perl

Embeds the Perl interpreter into the Oracle HTTP Server. This eliminates start-up overhead and enables you to write modules in Perl. Oracle Database 10g uses Perl version 5.6.1.

See Also:

mod_perl Guide

7.34.1 Database Usage Notes

This section provides information for mod_perl users working with databases. It explains how to test a local database connection and set character forms.

7.34.1.1 Using Perl to Access the Database

The following section contains information about using Perl to access the database. Perl scripts access databases using the DBI/DBD driver for Oracle. The DBI/DBD driver is part of Oracle Database. It calls Oracle Callable Interface (OCI) to access the databases.

DBI must be enabled in httpd.conf for DBI to function. To do this, perform the following steps:

  1. Edit httpd.conf using a text editor.

  2. Search for "PerlModule Apache::DBI".

  3. Uncomment the line "PerlModule Apache::DBI".

  4. Restart Oracle HTTP Server using the following command:

    ORACLE_HOME/opmn/bin> opmnctl [verbose] restartproc ias-component=HTTP_Server
    
    

Files must be copied to ORACLE_HOME/Apache/Apache/cgi-bin

Example 7-1 Using Perl to Access the Database

#!<ORACLE_HOME>/perl/bin/perl -w 
  use DBI; 
  my $dataSource = "host=<hostname.domain>;sid=<orclsid>;port=1521"; 
  my $userName = "scott"; 
  my $password = "tiger"; 
  my $dbhandle = DBI->connect("dbi:Oracle:$dataSource", $userName, $password) 
    or die "Can't connect to the Oracle Database: $DBI::errstr\n"; 
  print "Content-type: text/plain\n\n"; 
  print "Database connection successful.\n"; 
  ### Now disconnect from the database 
  $dbhandle->disconnect 
    or warn "Database disconnect failed; $DBI::errstr\n"; 
  exit;

You can access the DBI scripts from the following locations:

http://<hostname.domain>:<port>/cgi-bin/<scriptname>
http://<hostname.domain>:<port>/perl/<scriptname>

If the script specifies "use Apache::DBI" instead of "use DBI", then it will only be able to run from http://<hostname.domain>:<port>/perl/<scriptname>.

7.34.1.2 Testing Database Connection

The following is a sample Perl script for testing the database connection of a local seed database. To use the script to test another database connection, you must replace scott/tiger with the user name and password for the target database.

Example 7-2 Sample Perl Script For Testing Connection for Local Seed Database

##### Perl script start ###### 
use DBI;
print "Content-type: text/plain\n\n"; 
$dbh = DBI->connect("dbi:Oracle:", "scott/tiger", "") || die $DBI::errstr;   $stmt = $dbh->prepare("select * from emp order by empno")|| die $DBI::errstr; 
$rc = $stmt->execute() || die $DBI::errstr; 
while (($empno, $name) = $stmt->fetchrow()) { print "$empno $name\n"; } 
warn $DBI::errstr if $DBI::err; 
die "fetch error: " . $DBI::errstr if $DBI::err; 
$stmt->finish() || die "can't close cursor"; 
$dbh->disconnect() || die "cant't log off Oracle"; 
##### Perl script End ###### 

7.34.1.3 Using SQL NCHAR Datatypes

SQL NCHAR datatypes have been refined since Oracle9i, and are now called reliable Unicode datatypes. SQL NCHAR datatypes such as NCHAR, NVARCHAR2 and NCLOB allow you to store any Unicode characters regardless of the database character set. The character set for those datatypes is specified by the national character set, which is either AL16UTF-16 or UTF8.

See Also:

Oracle Database 10g documentation for more about SQL NCHAR datatypes.

This release of DBD::Oracle supports SQL NCHAR datatypes and provides driver extension functions to specify the character form for data binding. The following script shows an example to access SQL NCHAR data:

Example 7-3 Sample Script to Access SQLNCHAR Data

# declare to use the constants for character forms
use DBD::Oracle qw(:ora_forms);
# connect to the database and get the database handle
$dbh = DBI->connect( ... );
# prepare the statement and get the statement handle
$sth = $dbh->prepare( 'SELECT * FROM TABLE_N WHERE NCOL1 = :nchar1' );
# bind the parameter of a NCHAR type
$sth->bind_param( ':nchar1', $param_1 );
# set the character form to NCHAR
$sth->func( { ':nchar1' => ORA_NCHAR } , 'set_form' );
$sth->execute;

As shown in Example 7-3, the set_form function is provided as a private function that you can invoke with the standard DBI func() method. It takes an anonymous hash that specifies which placeholder should be associated with which character form. The valid values of character form are either ORA_IMPLICIT or ORA_NCHAR. Setting the character form to ORA_IMPLICIT causes the application's bound data to be converted to the database character set, and ORA_NCHAR to the national character set. The default form is ORA_IMPLICIT.

Another function is provided to specify the default character set form as follows:

# specify the default form to be NCHAR
$dbh->func( ORA_NCHAR, 'set_default_form' );

After this call is made, the form of all parameters is ORA_NCHAR, unless otherwise specified with set_form calls. Note that unlike the set_form function, this is a function on the database handle, so every statement from the database handle with its default form specified has the form of your choice by default.

7.34.1.3.1 set_form

This function sets the character form for parameter(s). Valid forms are either ORA_IMPLICIT (default) or ORA_NCHAR. The constants are available as: ora_forms in DBD::Oracle.

Example 7-4 Sample for set_form

# a declaration example for the constants ORA_IMPLICIT and ORA_NCHAR
use DBD::Oracle qw(:ora_forms);
# set the character form for the placeholder :nchar1 to NCHAR
$sth->func( { ':nchar1' => ORA_NCHAR } , 'set_form' );
# set the character form using the positional index
$sth->func( { 2 => ORA_NCHAR } , 'set_form' );
# set the character form for multiple placeholders at once
$sth->func( { 1 => ORA_NCHAR, 2 => ORA_NCHAR } , 'set_form' );
7.34.1.3.2 set_default_form

This function sets the default character form for a database handle.

Example 7-5 Default Character Form for a Database Handle

$dbh->func( ORA_NCHAR , 'set_default_form' );

7.35 mod_php

PHP (recursive acronym for "PHP: Hypertext Preprocessor") is an open source, widely-used, general-purpose, client-side scripting language, that is embedded in standard HTML. It is used to generate dynamic HTML pages. On Oracle HTTP Server, PHP support is provided through mod_php and has Oracle database support enabled. It uses PHP version 4.3.9.

Note:

phpinfo() prints out very sensitive information about the current state of PHP and Oracle HTTP Server intervals. Users new to PHP, or those who are unaware of phpinfo() should not inadvertantly leave a PHP script called phpinfo() publically accessible.

phpinfo() is used heavily for debugging. There is a good chance that such a debug script could be left in the open by mistake once debugging is finished.

See Also:

7.36 mod_plsql

Connects Oracle HTTP Server to an Oracle database, enabling you to create Web applications using Oracle stored procedures. It is an Oracle module.

In order to access a Web-enabled PL/SQL application, configure a PL/SQL Database Access Descriptor (DAD) for mod_plsql. A DAD is a set of values that specifies how mod_plsql connects to a database server to fulfill an HTTP request. Besides the connect details, a DAD contains important configuration parameters for various operations in the database and for mod_plsql in general. Any Web-enabled PL/SQL application which makes use of the PL/SQL Web ToolKit needs to create a DAD to invoke the application.

7.36.1 Creating a DAD

Perform the following steps to create a DAD:

  1. Edit the DAD configuration file ORACLE_HOME/Apache/modplsql/conf/dads.conf.

  2. Add a DAD where the DAD has the following format:

    1. The Oracle HTTP Server <Location> directive which defines a virtual path used to access the PL/SQL Web Application. This directive begins enclosing a group of directives that apply to the named Location.

      For example, the directive <Location /myapp> defines a virtual path called "/myapp" that will be used to invoke a PL/SQL Web Application through a URL like http://host:port/myapp/.

      Note:

      Older versions of mod_plsql were always mounted on a virtual path with a prefix of '/pls'. This restriction is removed in newer versions but might still be a restriction imposed by some of the older PL/SQL applications.
    2. The Oracle HTTP Server "SetHandler" directive which directs Oracle HTTP Server to enable mod_plsql to handle the request for the virtual path defined by the named Location

      SetHandler pls_handler
      
      
    3. Additional Oracle HTTP Server directives that are allowed in the context of a <Location> directive. Typically, the following directives are used:

      Order deny,allow
      Allow from all
      AllowOverride None
      
      
    4. One or more mod_plsql specific directives. For example:

      PlsqlDatabaseUsername        scott
      PlsqlDatabasePassword        tiger
      PlsqlDatabaseConnectString   orcl
      PlsqlAuthenticationMode      Basic
      
      
    5. An Oracle HTTP Server </Location> directive which closes the group of directives for the named Location, and defines a single DAD.

  3. Save the edits.

  4. Obfuscate the DAD password by running the "dadTool.pl" script located in ORACLE_HOME/Apache/modplsql/conf.

    See Also:

    "PlsqlDatabasePassword" for instructions on performing the obfuscation.
  5. Restart Oracle HTTP Server using the following command:

    ORACLE_HOME/opmn/bin> opmnctl [verbose] restartproc ias-component=HTTP_Server
    
    

You can create additional DADs by defining other uniquely named Locations in dads.conf.

7.36.2 Configuration Files

mod_plsql configuration parameters reside in the following three configuration files:

7.36.2.1 plsql.conf

This file contains the LoadModule directive to load mod_plsql into Oracle HTTP Server, any global settings for mod_plsql, and include directives for dads.conf and cache.conf. This file is included by the Oracle HTTP Server configuration file ORACLE_HOME/Apache/Apache/conf/oracle_apache.conf on UNIX or ORACLE_HOME\Apache\Apache\conf\oracle_apache.conf on Windows, which itself gets included in the primary Oracle HTTP Server configuration file httpd.conf.

7.36.2.2 dads.conf

This file contains the configuration parameters for the PL/SQL database access descriptor (DAD). A DAD is a set of values that specifies how mod_plsql connects to a database server to fulfill a HTTP request.

7.36.2.3 cache.conf

This file contains the configuration settings for the file system caching functionality implemented in mod_plsql. This configuration file is relevant only if PL/SQL applications use the OWA_CACHE package to cache dynamically generated content in the file system.

See Also:

Oracle Application Server mod_plsql User's Guide for details on caching functionality in mod_plsql.

7.36.3 Configuration Parameters

Table 7-3 contains a list of mod_plsql configuration parameters. They are discussed in detail in later sections.

While specifying a value for a configuration parameter, follow Oracle HTTP Server conventions for specifying values. For instance, if a value has white spaces in it, enclose the value with double quotes. For example: PlsqlNLSLanguage "TRADITIONAL CHINESE_TAIWAN.UTF8"

Multi-line directives enable you to specify same directive multiple times in a DAD.

7.36.3.1 plsql.conf

This file contains the LoadModule directive to load mod_plsql into the Oracle HTTP Server, global settings for mod_plsql, and include directives for dads.conf and cache.conf.

Note:

Refer to plsql.README located in ORACLE_HOME/Apache/modplsql/conf for detailed description of plsql.conf.

The following section discusses the parameters that can be specified in plsql.conf:

PlsqlDMSEnable

Enables Dynamic Monitoring Service (DMS) for mod_plsql.

Category Value
Syntax PlsqlDMSEnable On/Off
Default On
Example PlsqlDMSEnable On

PlsqlLogEnable

Enables debug level logging for mod_plsql.

Debug level logging is meant to be used for debugging purposes only. When logging is enabled, log files are generated at:

  • UNIX: ORACLE_HOME/Apache/modplsql/logs

  • Windows: ORACLE_HOME\Apache\modplsql\logs

as configured by PlsqlLogDirectory. This parameter should be set to "Off" unless recommended by Oracle support to debug problems with mod_plsql.

To view more details about the internal processing of mod_plsql, set this directive to "On". This causes mod_plsql to start logging for every request that is processed. The log files are generated as specified by the PlsqlLogDirectory directive.

Category Value
Syntax PlsqlLogEnable On/Off
Default Off
Example PlsqlLogEnable Off

PlsqlLogDirectory

Specifies the directory where debug level logs are written out.

Set the directory name of the location where log files should be generated when logging is enabled. To avoid possible confusion about the location of this directory, an absolute path is recommended.

On UNIX, this directory must have write permissions by the owner of the child httpd processes.

Category Value
Syntax PlsqlLogDirectory directory
Default None
Example PlsqlLogDirectory ORACLE_HOME/Apache/modplsql/logs

PlsqlIdleSessionCleanupInterval

Specifies the time (in minutes) in which the idle database sessions should be closed and cleaned by mod_plsql.

This directive is used in conjunction with connection pooling of database connections and sessions in mod_plsql. When a session is not used for the specified amount of time, it is closed, and freed. This is done so that unused sessions can be cleaned, and the memory is freed on the database side.

Setting this time to a low number helps in faster cleanup of unused database sessions. Be aware that if this number is too low, then this may adversely affect the performance benefits of connection pooling in mod_plsql.

If the number of open database sessions is not a concern, you can increase the value of this parameter for best performance. In such a case, if the site is accessed frequently enough that the idle session cleanup interval is never reached for a session, then the DAD configuration parameter PlsqlMaxRequestsPerSession can be modified so that it is guaranteed that a pooled database session gets recycled on a regular basis.

For most installations, the default parameter value should suffice.

Category Value
Syntax PlsqlIdleSessionCleanupInterval number
Default 15 (minutes)
Example PlsqlIdleSessionCleanupInterval 15

7.36.3.2 dads.conf

This file contains the configuration parameters for the PL/SQL Database Access Descriptor (DAD).

DAD Parameters

This section describes all the DAD level parameters that can be specified in the dads.conf file. Besides these directives, you can also specify additional Oracle HTTP Server directives that can be specified in the context of a <Location> directive, such as:

Order deny,allow
AllowOverride None

The following parameters are discussed in detail in the subsequent sections:

PlsqlAfterProcedure

Specifies the procedure to be invoked after calling the requested procedure. This enables you to put a hook point after the requested procedure is called. This is useful in doing SQL*Traces/SQL Profiles while debugging a problem with the requested procedure. This is also useful when you want to ensure that a specific call be made after running every procedure.

Category Value
Syntax PlsqlAfterProcedure string
Default None
Example PlsqlAfterProcedure portal.mypkg.myafterproc

  • For all purposes, except for debugging, this parameter should be omitted. You could use this parameter to stop SQL Trace/SQL Profiling.

  • In older versions of the product, this parameter was called after_proc.

PlsqlAlwaysDescribeProcedure

Specifies whether mod_plsql should describe a procedure before trying to execute it. If this is set to "On", then mod_plsql will always describe a procedure before invoking it. Otherwise, mod_plsql will only describe a procedure when its internal heuristics have interpreted a parameter type incorrectly.

Category Value
Syntax PlsqlAlwaysDescribeProcedure On/Off
Default Off
Example PlsqlAlwaysDescribeProcedure Off

  • For all purposes, except for debugging, you should leave this parameter set to "Off".

  • In older versions of the product, this parameter was called always_desc.

PlsqlAuthenticationMode

Specifies the authentication mode to use for allow access through this DAD.

Category Value
Syntax PlsqlAuthenticationMode Basic/SingleSignOn/GlobalOwa/CustomOwa/PerPackageOwa
Default Basic
Example PlsqlAuthenticationMode Basic

  • Most customer applications use Basic Authentication. Custom Authentication modes (GlobalOwa, CustomOwa, PerPackageOwa) are used by very few PL/SQL applications. The SingleSignOn mode is supported only for Oracle Application Server releases, and is used by Oracle Application Server Portal and Oracle Application Server Single Sign-On.

  • If the DAD is not using the Basic authentication, then you must include a valid username/password in the DAD configuration. For the Basic mode, if you wish to perform dynamic authentication, the DAD username/password parameters must be omitted.

  • In older versions of the product, this configuration parameter was derived from a combination of enablesso and custom_auth.

    • enablesso = Yes translates to PlsqlAuthenticationMode SingleSignOn

    • custom_auth = Global translates to PlsqlAuthenticationMode GlobalOwa

    • custom_auth = Custom translates to PlsqlAuthenticationMode CustomOwa

    • custom_auth = PerPackage translates to PlsqlAuthenticationMode PerPackageOwa

    All other combinations translate to Basic.

    See Also:

    "Securing Application Database Access through mod_plsql" chapter in the Oracle Application Server mod_plsql User's Guide for more information regarding different authentication modes.

PlsqlBeforeProcedure

Specifies the procedure to be invoked before calling the requested procedure. This enables you to put a hook point before the requested procedure is called. This is useful in doing SQL*Traces/SQL Profiles while debugging a problem with the requested procedure. This is also useful when you want to ensure that a specific call be made before running every procedure.

Category Value
Syntax PlsqlBeforeProcedure string
Default None
Example PlsqlBeforeProcedure portal.mypkg.mybeforeproc

  • For all purposes, except for debugging purposes, this parameter should be omitted. You can use this parameter to start SQL Trace/SQL Profiling.

  • In older versions of the product, this parameter was called before_proc.

PlsqlBindBucketLengths

Specifies the rounding size to use while binding the number of elements in a collection bind. While executing PL/SQL statements, the Oracle database maintains a cache of PL/SQL statements in the shared SQL area, and attempts to reuse the cached statement if the same statement is executed again. Oracle's matching criteria requires that the statement texts be identical, and that the bind variable data types match. Unfortunately, the type match for strings is sensitive to the exact byte size specified, and for collection bindings is also sensitive to the number of elements in the collection. Since mod_plsql binds statements dynamically, the odds of hitting the shared cache are low, and it may fill up with near-duplicates and lead to contention for the latch on the shared area. This parameter reduces that effect by bucketing bind lengths to the nearest level.

All numbers specified should be in ascending order. After the last specified size, subsequent bucket sizes will be assumed to be twice the last one.

Category Value
Syntax PlsqlBindBucketLengths number multiline
Default 4,20,100,400
Example PlsqlBindBucketLengths 4

PlsqlBindBucketLengths 25

PlsqlBindBucketLengths 125


  • This parameter is relevant only if you are using procedures with array parameters, and passing varying number of parameters to the procedure.

  • The default should be sufficient for most PL/SQL applications.

  • To see if this parameter needs to be changed, check the number of versions of a SQL statement in the SQL area.

  • Consider using flexible parameter passing to reduce the problem.

  • In older versions of the product, this parameter was called bind_bucket_lengths.

PlsqlBindBucketWidths

Specifies the rounding size to use while binding the number of elements in a collection bind. While executing PL/SQL statements, the Oracle database maintains a cache of PL/SQL statements in the shared SQL area, and attempts to reuse the cached statement if the same statement is executed again. Oracle's matching criteria requires that the statement texts be identical, and that the bind variable data types match. Unfortunately, the type match for strings is sensitive to the exact byte size specified, and for collection bindings is also sensitive to the number of elements in the collection. Since mod_plsql binds statements dynamically, the odds of hitting the shared cache are low, and it may fill up with near-duplicates and lead to contention for the latch on the shared area. This parameter reduces that effect by bucketing bind widths to the nearest level.

All numbers specified should be in ascending order. After the last specified size, subsequent bucket sizes will be assumed to be twice the last one.

The last bucket width must be equal to or less than 4000. This is due to the restriction imposed by OCI where array bind widths cannot be greater than 4000.

Category Value
Syntax PlsqlBindBucketWidths number multiline
Default 32,128,1450,2048,4000
Example PlsqlBindBucketWidths 40

PlsqlBindBucketWidths 400

PlsqlBindBucketWidths 2000


  • This parameter is relevant only of you are using procedures with array parameters, and passing varying number of parameters to the procedure.

  • The default should be sufficient for most PL/SQL applications.

  • To see if this parameter needs to be changed, check the number of versions of a SQL statement in the SQL area.

  • Consider using flexible parameter passing to reduce the problem.

  • In older versions of the product, this parameter was called bind_bucket_widths.

PlsqlCGIEnvironmentList

Specifies overrides and/or additions of CGI environment variables to the default set of environment variables passed down to a PL/SQL procedure. This is a multi-line directive of name-value pairs to be added, overridden or removed. You can only specify one environment variable for each directive.

You can add CGI environment variables from the Oracle HTTP Server environment by specifying the variable name. To remove a CGI environment variable, set it equal to nothing. To add your own name-value pair, use the syntax myname=myvalue.

Category Value
Syntax PlsqlCGIEnvironmentList string multiline
Default None
Example
  • To add a new environment variable from the Oracle HTTP Server environment:

    PlsqlCGIEnvironmentList DOCUMENT_ROOT

  • To remove an environment variable:

    PlsqlCGIEnvironmentList MYENVAR2=

  • To override from the Oracle HTTP Server environment:

    PlsqlCGIEnvironmentList REQUEST_PROTOCOL=HTTPS

  • To add your own environment variable:

    PlsqlCGIEnvironmentList MY_VARNAME=MY_VALUE


  • Environment variables added here are available in the PL/SQL application through the function owa_util.get_cgi_env.

  • In older versions of the product, this parameter was called cgi_env_list.

PlsqlCompatibilityMode

Specifies the compatibility mode for running mod_plsql. This parameter is supported only for Oracle Application Server releases, and is used when you are using mod_plsql with an older version of Oracle Application Server Portal. In such situations, if you are running mod_plsql against a pre-9.0.2 version of Oracle Application Server Portal, this should be set to 1.

Category Value
Syntax PlsqlCompatibilityMode BitFlag
Default 0
Example PlsqlCompatibilityMode 1

This parameter enables an old bug in mod_plsql in which mod_plsql incorrectly converted the plus symbol (+) to space characters for document downloads. Enabling the first bit in this flag will make it impossible to download documents that have a plus symbol (+) in the document name.

PlsqlConnectionTimeout

Specifies the timeout in milliseconds for testing a connection pooled in mod_plsql.

When PlsqlConnectionValidation is set to "Automatic" or "AlwaysValidate", mod_plsql will attempt to test pooled database connections. This parameter specifies the maximum time mod_plsql should wait for the test request to complete before it assumes that the connection is not usable.

Category Value
Syntax PlsqlConnectionTimeout 5000
Default 10000
Example PlsqlConnectionTimeout 5000

PlsqlConnectionValidation

Specifies the mechanism mod_plsql should use to detect terminated connections in its connection pool.

For performance reasons, mod_plsql pools database connections. If a database instance goes down, and mod_plsql was maintaining a pool of connections to the instance, then each pooled database connection results in an error when it is next used to service a request. This can be a concern in high availability configurations like RAC where even if one node goes down, other nodes servicing the database might have been able to service the request successfully. mod_plsql provides for a mechanism whereby it can self-correct after it detects a failure that could be caused by a database node going down. This mechanism to self-correct is controlled by the parameter PlsqlConnectionValidation.

The following are the valid values for PlsqlConnectionValidation:

  • Automatic: mod_plsql tests all pooled database connections which were created prior to the detection of a failure that could mean an instance failure.

  • ThrowAwayOnFailure: mod_plsql throws away all pooled database connections which were created prior to the detection of a failure that could mean an instance failure.

  • AlwaysValidate: mod_plsql always tests all pooled database connections which were created prior to issuing a request. Since this option has an associated performance overhead for each request, this should be used with caution.

  • NeverValidate: mod_plsql never pings any pooled database connection. This option always for older behavior in mod_plsql.

Category Value
Syntax PlsqlConnectionValidation Automatic/ThrowAwayOnFailure/AlwaysValidate/NeverValidate
Default Automatic
Example PlsqlConnectionValidation ThrowAwayOnFailure

When mod_plsql encounters one of the following errors, it assumes that the database might have been down.

  • 00443, 00000, "background process did not start"

  • 00444, 00000, "background process failed while starting"

  • 00445, 00000, "background process did not start after x seconds"

  • 00447, 00000, "fatal error in background processes"

  • 00448, 00000, "normal completion of background process"

  • 00449, 00000, "background process unexpectedly terminated with error"

  • 00470, 00000, "LGWR process terminated with error"

  • 00471, 00000, "DBWR process terminated with error"

  • 00472, 00000, "PMON process terminated with error"

  • 00473, 00000, "ARCH process terminated with error"

  • 00474, 00000, "SMON process terminated with error"

  • 00475, 00000, "TRWR process terminated with error"

  • 00476, 00000, "RECO process terminated with error"

  • 00480, 00000, "LCK* process terminated with error"

  • 00481, 00000, "LMON process terminated with error"

  • 00482, 00000, "LMD* process terminated with error"

  • 00484, 00000, "LMS* process terminated with error"

  • 00485, 00000, "DIAG process terminated with error"

  • 01014, 00000, "ORACLE shutdown in progress"

  • 01033, 00000, "ORACLE initialization or shutdown in progress"

  • 01034, 00000, "ORACLE not available"

  • 01041, 00000, "internal error. hostdef extension doesn't exist"

  • 01077, 00000, "background process initialization failure"

  • 01089, 00000, "immediate shutdown in progress- no operations permitted"

  • 01090, 00000, "shutdown in progress- connection is not permitted"

  • 01091, 00000, "failure during startup force"

  • 01092, 00000, "ORACLE instance terminated. Disconnection forced"

  • 03106, 00000, "fatal two-task communication protocol error"

  • 03113, 00000, "end-of-file on communication channel"

  • 03114, 00000, "not connected to ORACLE"

  • 12570, 00000, "TNS: packet writer failure"

  • 12571, 00000, "TNS: packet writer failure"

PlsqlDatabaseConnectString

Specifies the connection to an Oracle database.

Category Value
Syntax PlsqlDatabaseConnectString

stringServiceNameFormat/SIDFormat/TNSFormat/NetServiceNameFormat, where string can be one of the following based on the second argument:

  • ServiceNameFormat: HOST:PORT:SERVICE_NAME format where HOST is the hostname running the database, PORT is the port number the TNS listener is listening on, SERVICE_NAME is the database service name.

  • SIDFormat: HOST:PORT:SID format where HOST is the hostname running the database, PORT is the port number the TNS listener is listening on, SID is the database SID.

  • TNSFormat: A valid TNS alias which resolves using Net8 utilities like tnsping and SQL*Plus.

  • NetServiceNameFormat: A valid net service name which resolves to a connect descriptor. A connect descriptor is a specially formatted description of the destination for a network connection. A connect descriptor contains destination service and network route information.

If the format argument is not specified, then mod_plsql assumes that "string" is either in the HOST:PORT:SID format, or resolvable by Net8. The differentiation between the two is made by the presence of the colon in the specified string.

It is recommended that newer DADs do not use the SIDFormat syntax. This exists only for backward compatibility reasons. Use the new two argument format for newly created DADs.

Default None
Example
  • PlsqlDatabaseConnectString myhost.com:1521:myhost.iasdb.inst ServiceNameFormat
  • PlsqlDatabaseConnectString myhost.com:1521:iasdb SIDFormat

  • PlsqlDatabaseConnectString myhost_tns TNSFormat

  • PlsqlDatabaseConnectString cn=oracle,cn=iasdb NetServiceNameFormat

  • PlsqlDatabaseConnectString (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=myhost.com)(Port= 1521))(CONNECT_DATA=(SID=iasdb))) TNSFormat

  • PlsqlDatabaseConnectString myhost_tns

  • PlsqlDatabaseConnectString myhost.com:1521:iasdb


  • If the database is running in the same Oracle home, or the environment variable "TWO_TASK" is set, this parameter need not be specified.

  • If the database is running in a separate Oracle home, then this parameter is mandatory.

  • If you have problems connecting to the database:

    • Check the username and password information in the DAD.

    • Make sure that you run "tnsping <string>" and execute commands such as:

      sqlplus DADUsername/DADPassword@<string> 
      
      
    • Ensure that TNS_ADMIN is configured properly.

    • Verify that the HOST:PORT:SERVICE_NAME format makes the connection go through.

    • Ensure that the TNS listener and database are up and running.

    • Ensure that you can ping the host from this machine.

  • From a mod_plsql perspective, TNSFormat and NetServiceNameFormat are synonymous and denote connect descriptors that are resolved by Net. The TNSFormat is provided as a convenience so that end-users use this to signify that the name resolution happens through the local tnsnames.ora. For situations where the resolution is through an LDAP lookup as configured in sqlnet.ora, it is recommended that the format specifier of NetServiceNameFormat be used.

    If your database supports high availability, for example, RAC database, it is highly recommended that you use the NetServiceNameFormat such that the resolution for the net service name is through LDAP. This enables you to add or remove RAC nodes accessible through mod_plsql by changing Oracle Internet Directory with the new/deleted node information. In such situations, hard-coding database listener HOST:PORT information in dads.conf or in the local tnsnames.ora is not recommended.

  • In older versions of the product, this configuration parameter was called connect_string.

PlsqlDatabasePassword

Specifies the password to use to log in to the database.

Category Value
Syntax PlsqlDatabasePassword string
Default None
Example PlsqlDatabasePassword tiger

After making manual configuration changes to DAD passwords, it is recommended that the DAD passwords are obfuscated by running the "dadTool.pl" script located in ORACLE_HOME/Apache/modplsql/conf.

The following are the steps to obfuscate DAD passwords:

  1. If necessary, switch user to the Oracle software owner user, typically oracle using the following command:

    $su - oracle
    
    
  2. Set the ORACLE_HOME environment variable to specify the path to the Oracle home directory for the current release and set the PATH environment variable to include the directory containing the Perl executable and the location of the dadTool.pl script.

    On Bourne, Bash, or Korn Shell:

    ORACLE_HOME=new_ORACLE_HOME_path;export ORACLE_HOME
    PATH=ORACLE_HOME/Apache/modplsql/conf:ORACLE_HOME/perl/bin:PATH;export PATH
    
    

    On C or tcsh Shell:

    setenv ORACLE_HOME new_ORACLE_HOME_PATH
    setenv PAT