Oracle HTTP Server Administration Guide Release 2 (9.0.2) Part Number A92173-02 |
|
This chapter describes the modules (mods) included in the Oracle HTTP Server. Documentation from the Apache Software Foundation is referenced when applicable.
This module 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 |
This module is available for UNIX systems only.
This module enables execution of CGI scripts based on file type or request method.
See Also:
Module mod_actions in the Apache Server documentation |
This module enables manipulation of URLs in processing requests. It provides mapping between URLs and filesystem paths, and URL redirection capabilities.
See Also:
Module mod_alias in the Apache Server documentation |
This module enables sending files that contain their own HTTP headers.
This module is not supported by Oracle.
This module enables user authentication with text files.
See Also:
Module mod_auth in the Apache Server documentation |
This module 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 |
This module uses Berkeley DB files to provide user authentication.
This module is disabled in the Oracle HTTP Server and is not supported by Oracle.
This module uses DBM files to provide user authentication.
This module is not supported by Oracle.
This module uses MD5 Digest Authentication to provide user authentication.
This module is not supported by Oracle.
This module generates directory indexes automatically.
See Also:
Module mod_autoindex in the Apache Server documentation |
This module 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.
This module is not supported by Oracle.
This module enables the server to run CGI scripts.
See Also:
Module mod_cgi in the Apache Server documentation |
A demonstration of CGI capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.
This module 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 the Extended API (EAPI).
This module is available for UNIX systems only.
This module 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 |
This module enables the server to perform "trailing 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 |
This module enables you to monitor performance of site components with Oracle's Dynamic Monitoring Service.
This module enables you to control the environment for CGI scripts and SSI (Server Side Include) pages by passing, setting, and unsetting environment variables.
See Also:
Module mod_env in the Apache Server documentation |
This module provides examples and guidance on how to write modules using the Apache API. When implemented, it demonstrates module callbacks triggered by the server.
This module is not supported by Oracle.
This module 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 |
This third-party module supports the fastcgi protocol, which enables you to maintain a pool of running servers for CGI applications (thereby eliminating start-up and initialization overhead).
A demonstration of FastCGI capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.
See Also:
Module mod_fastcgi in the Apache Server documentation |
This module enables you to merge, replace, or remove HTTP response headers.
See Also:
Module mod_headers in the Apache Server documentation |
This module enables server-side image map processing.
This module is not supported by Oracle.
This module provides a filter that processes documents for SSI (Server Side Include) directives.
See Also:
Module mod_include in the Apache Server documentation |
This module summarizes the entire server configuration, including all installed modules and directive settings.
See Also:
Module mod_info in the Apache Server documentation |
This module is available on the Windows platform only. It enables serving of Internet Server extensions (such as.dll modules).
This module is not supported by Oracle.
This module connects the Oracle HTTP Server to the JServ servlet engine. It converts HTTP requests to servlet requests, returning HTTP responses to the client.
mod_jserv is disabled by default in the Oracle HTTP Server distribution; it is included for legacy support only. The instructions below explain how to enable it with mod_oprocmgr, in manual mode, or in automatic mode. Use the instructions for the mode that serves your needs. A working knowledge of JServ and Oracle HTTP Server directives is assumed.
This section explains how to enable the Oracle default mode for JServ. Use this mode if you want process management and load balancing capabilities for multiple JVMs. The ApJServManual directive has a new mode, 'auto', that enables using JServ with the Oracle module mod_oprocmgr. The file jserv.conf
file contains LoadModule directives for mod_jserv and mod_oprocmgr.
Follow these steps to enable JServ with mod_oprocmgr:
jserv.conf
file in:
ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(UNIX)
#include "/ORACLE_HOME/Apache/Jserv/etc/jserv.conf"
ORACLE_HOME
\Apache\Apache\conf\httpd.conf
(Windows)
#include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(Windows)
ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
(Windows)
ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\zone.properties
(Windows)
This section explains how to enable JServ in automatic mode. Use this mode if you need only one JVM. In this mode, the ApJServManual directive is set to 'off' and the mod_jserv module launches and monitors the JVM. If the Oracle HTTP Server is restarted or stopped, mod_jserv restarts or stops the JVM.
Follow these steps to enable JServ in automatic mode:
ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(UNIX)
#include "/ ORACLE_HOME/Apache/Jserv/etc/jserv.conf"
ORACLE_HOME
\Apache\Apache\conf\httpd.conf
(Windows)
#include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(Windows)
ApJServManual off
jserv.conf
.
ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
(Windows)
to the same value as that specified in the ApJServDefaultPort directive.
ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\zone.properties
(Windows)
This section explains how to enable JServ in manual mode. Use this mode if you need to run multiple JVMs. In this mode, the ApJServManual directive is set to 'on' and you have to stop and start the JVM manually. To monitor the JVM, you must use an external monitoring facility.
Follow these steps to enable JServ in manual mode:
ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(UNIX)
#include "/ ORACLE_HOME/Apache/Jserv/etc/jserv.conf"
ORACLE_HOME
\Apache\Apache\conf\httpd.conf
(Windows)
#include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(Windows)
ApJServManual on
jserv.conf
.
ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
(Windows)
ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\zone.properties
(Windows)
wrapper.bin.parameters
and wrapper.classpath
in the jserv.properties
file).
This section explains how to use mod_rewrite to enable some applications to execute on JServ, and others on OC4J.
Perform the following configuration steps to enable JServ and Oracle9iAS Containers for J2EE (OC4J) to coexist. This is important if you have the Portal and Wireless installation type, because of the Portal dependency on OC4J.
/application1/file1.jsp
to execute on JServ, and
/application2/file2.jsp
to execute on OC4J.
You must rewrite the URL for application1.
ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(UNIX)
ORACLE_HOME
\Apache\Apache\conf\httpd.conf
(Windows)
and ensure that the following directives are present and active (uncommented):
LoadModule rewrite_module libexec/mod_rewrite.so AddModule mod_rewrite.c RewriteEngine on
ORACLE_HOME
/Apache/jsp/conf/ojsp.conf
(UNIX)
ORACLE_HOME
\Apache\jsp\conf\ojsp.conf
(Windows)
to add these directives:
RewriteRule /application1/(.*)/(.*)·jsp$ /application1/$1/$2.jsp1 ApJServAction .jsp1 /servlets/oracle.jsp.JspServlet
ApJServAction .jsp /servlets/oracle.jsp.JspServlet
ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(Windows)
and mount /servlets to the JVM that will service the JSP requests. Use the ApJServMount or ApJServGroupMount directive (depending on how the JServ processes are started).
mod_jserv's mapping for JSP applications does not provide for specifying application paths, such as:
ApJServAction /path/.jsp ...
However, you can configure different JSP applications to run on different JVMs under mod_jserv. The configuration steps below show how to use mod_rewrite to change the extension of ' JSP pages associated with a JSP application at request time (where *.jsp1
files belong to application1
, and *.jsp2
files belong to application2
). Each .jsp
extension has its own ApJServAction
handler, so that multiple JVMs can be used to run different JSP applications.
Follow the instructions below, substituting application names, directories, page extensions, and hostnames as applicable to your system:
httpd.conf:
LoadModule rewrite_module libexec/mod_rewrite.so AddModule mod_rewrite.c RewriteEngine on
ojsp.conf
:
RewriteRule /app1/(.*)/(.*)·jsp$ /app1/$1/$2.jsp1 RewriteRule /app2/(.*)/(.*)·jsp$ /app2/$1/$2.jsp2 ApJServAction .jsp1 /servlets1/oracle.jsp.JspServlet ApJServAction .jsp2 /servlets2/oracle.jsp.JspServlet
jserv.conf
:
ApJServMount /servlets1 ajpv12://hostname:8008/root ApJServMount /servlets2 ajpv12://hostname:8009/root
This module enables logging of client user agents. It is deprecated; you should use mod_log_config instead of mod_log_agent.
This module is not supported by Oracle.
This module 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 |
This module enables logging of documents that reference documents on the server. It is deprecated; you should use mod_log_config instead of mod_log_referer.
See Also:
Module mod_log_referer in the Apache Server documentation |
This module 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 |
This module 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 |
This module maps a list of files into memory, useful for frequently requested files that are not changed often.
This module is not supported by Oracle.
This module 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 |
This Oracle module routes requests from the Oracle HTTP Server to Oracle9iAS Containers for J2EE (OC4J), providing the ajp13 protocol for communication with the servlet engine.
mod_oc4j is enabled by default. During installation, the oc4j_deploy_tool.jar adds mount points to mod_oc4j.conf for applications deployed into OC4J instances. Requests that come in for specific mount points in mod_oc4j are routed to the OC4J instance for that mount point.
OC4J instances are started and managed by Oracle Process Management and Notification (OPMN). OPMN is briefly described in Chapter 1, "Overview" in the section "Starting, Stopping, and Restarting the Oracle HTTP Server". See the Oracle9i Application Server Administrator's Guide for detailed information on OPMN.
Be aware of the following security considerations when using mod_oc4j:
All relevant directives in httpd.conf
and mod_oc4j.conf
are described below. Sample configurations are also provided.
The mod_oc4j directives are maintained in their own file, mod_oc4j.conf
. The mod_oc4j.conf
file is included by default into the httpd.conf
file, using the directive below:
include "ORACLE_HOME/Apache/Apache/conf/mod_oc4j.conf"
where ORACLE_HOME is the path to the Oracle home in which the HTTP Server resides.
The directives you use to configure mod_oc4j are described below.
This directive loads the mod_oc4j module. It is included in the default configuration file, so you
This directive tells mod_oc4j to route requests containing a particular path to a destination. A destination can be a single OC4J process or a set of OC4J instances.
This directive copies mount points from the base server.
This directive specifies the size of the OC4J connection cache.
This directive governs passing SSL environment variables.
This directive tells mod_oc4j to pass some environment variables from the Oracle HTTP Server to OC4J.
This section provides some sample configurations for mod_oc4j.
Level 1 is the simplest configuration. Two examples of Level 1 configurations are given below.
This configuration mounts all requests starting with the URI /servlet/ to the default instance of OC4J processes. Because a instance of OC4J processes is handled by OPMN and the default instance must be the same as OPMN's default OC4J instance, this configuration requires that mod_oc4j must be used with OPMN.
This configuration performs the same work as the configuration in Example A, using a Location container instead of the Oc4jMount directive.
This configuration mounts all requests starting with the URI /servlet/ or /j2ee/ and all JSP pages to the default OC4J instance of OC4J processes. This configuration requires that mod_oc4j must be used with OPMN.
This configuration mounts:
Oc4JMount /applicationA/* oc4j_instance_A Oc4JMount /applicationB/* oc4j_instance_B Oc4JMount /j2ee/* Oc4JMount /*.jsp oc4j_instance_A
This Oracle module provides process management and load balancing services to JServ processes. It is provided for legacy users of JServ. JServ is disabled by default in the Oracle HTTP Server configuration. Oracle Corporation recommends using OC4J and mod_oc4j (which are enabled by default).
This section explains how to configure mod_oprocmgr. Terms used in this section to describe the module and its functions are defined below:
A module that starts, stops, and detects death of processes (starting new processes to replace them), and provides load balancing services to the processes. mod_oprocmgr gets the topology management information via HTTP requests from JServ, and does its job based on this information.
A set of processes across which request traffic is distributed.
A JVM instance that runs a servlet engine, such as JServ.
mod_oprocmgr provides infrastructure capabilities, such as automatic starting of processes, death detection and restart, and load balancing. These capabilities are enabled by a new mode, auto, for the ApJServManual directive.
Based on the configuration information provided by mod_jserv, mod_oprocmgr starts the specified number of JServ processes, managing them for the life of the servers.
mod_oprocmgr enhances the functionality and administration of JServ in several ways:
With `ApJServManual off', only one JServ engine can be started and managed automatically. Additional servlet engines have to be manually started, monitored and stopped.
With `ApJServManual auto', any number of JServ engines can be started automatically. The process manager will continually monitor the health of these processes and kill and restart them, if necessary. You can still start JServ processes manually, if you need to.
Configuring multiple JServ processes with `ApJServManual on'/`ApJServManual off' is more complicated and error prone. For example, a 10 process "balance" configuration requires 32 directives and 10 jserv.properties files.
Configuring multiple JServ processes with the new `auto' mode requires much less effort. For example, a 10 process "balance" configuration requires only 3 directives.
If you are already familiar with the configuration directives for mod_jserv, the configuration process for mod_oprocmgr is straightforward. The configuration files are listed below.
To use mod_oprocmgr, ensure that the directives below are included in the file:
ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(UNIX)
ORACLE_HOME\Apache\Apache\conf\httpd.conf
(Windows)
<IfModule mod_oprocmgr.c> ProcNode my-sun.us.oracle.com 7777 <IfDefine SSL> ProcNode my-sun.us.oracle.com 80 </IfDefine> <Location /oprocmgr-service> SetHandler oprocmgr-service </Location> </IfModule>
In addition, you must specify at least one non-SSL port. For a secure website (that is, one that only accepts SSL connections), you must provide an extra non- SSL port. To do this, add the directives shown below, substituting port and address values:
Listen <port> <VirtualHost _default_:port> SSLEngine Off <Location /> order deny, allow deny from all allow from <IP address 1 of local node> allow from <IP address 2 of local node> allow from <IP address 3 of local node> </Location> </VirtualHost>
In the LoadModule section, ensure that mod_oprocmgr is loaded after mod_osso. The call back function of mod_oprocmgr in the 'check usrid' stage must be invoked before that of mod_osso.
In the file:
ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(UNIX)
ORACLE_HOME
\Apache\Jserv\etc\jserv.properties
(Windows)
you specify the ports to which JServ will bind, as shown in the example below.
port=8007
If no ports are specified, the JServ processes will choose their ports. If you want the JServ processes to choose their ports, enter the port directive as shown below. If you eliminate the directive entirely, an error will occur.
port=
You can specify multiple ports, and separate the values with commas as shown in the example below. Note that a range of ports (9000-9010) is a valid value.
port=8007,9000-9010,8010
To use mod_oprocmgr with mod_jserv, you must change the directives as indicated below in the JServ configuration file:
ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(UNIX)
ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(Windows)
This directive accepts a new mode, auto, which invokes the new infrastructure functionality (in which mod_oprocmgr manages processes). The syntax is:
ApJServManual auto
You can set the mode to on or off to use the standard JServ functionality.
This directive defines groups for the process manager to manage for mod_jserv. If you have worked with mod_jserv, you will note that this directive replaces the ApJServBalance, ApJServHost, ApJServRoute and ApJServShmFile directives.
All JServ processes to be managed must belong to a group, and each group has its own ApJServGroup directive. If you only have one JServ process, you must define a group with just that process in it. The processes in a group are identical except for their listening ports, so requests directed to the group are distributed evenly among the processes.
The ApJServGroup directive takes four arguments: groupname, number of processes, node weight, and properties file. In the example below, the groupname is mygroup, the number of processes is 1, the node weight is 1, and the full path of the properties file used to start the JServ processes is
ORACLE_HOME/Apache/JServ/etc/jserv.properties ApJServGroup mygroup 1 1 /private2/up_1022/Apache/Jserv/etc/jserv.properties
This directive defines a mount point and maps it to a process group and zone. In the example below, the mount point is /servlets, the group is mygroup, and the zone is root. Note that the balance protocol is in use for routing, as in the standard JServ configuration.
ApJServGroupMount /servlets balance://mygroup/root
Place this directive after the ApJServGroup directive in the configuration file.
This directive specifies the secret key that JServ needs to authenticate clients. It can be disabled, as shown below:
ApJServGroupSecretKey disabled
When activated, the directive takes one or two arguments. In the example below, with group and filename arguments, the filename mysecretkey applies to the group mygroup.
ApJServGroupSecretKey mygroup /usr/local/apache/jserv/mysecretkey
You can supply only the filename argument, as shown below. No group is named, so the secret key filename applies to all groups.
ApJServGroupSecretKey /usr/local/apache/jserv/mysecretkey
You cannot combine directives using the one-argument syntax with directives using the two-argument syntax. If you use the two-argument syntax, the default for groups without a group-specific secret key is 'disabled'.
Place this directive after the ApJServGroup directive in the configuration file.
mod_oradav is the Oracle module (an OCI application written in C) that is an extended implementation of mod_dav, and is integrated with the Oracle HTTP Server. mod_oradav can read and write to local files or to an Oracle database. The Oracle database must have an OraDAV driver (a stored procedure package) that mod_oradav calls to map WebDAV activity to database activity. Essentially, mod_oradav enables WebDAV clients to connect to an Oracle database, read and write content, and query and lock documents in various schemas.
You can configure mod_oradav to an Oracle database using standard Oracle HTTP Server directives. mod_oradav can immediately leverage other module code (such as mime_magic) in order to perform content management tasks. Most OraDAV processing activity involves streaming content to and from a content provider; and mod_oradav uses OCI streaming logic directly within the Oracle HTTP Server.
To configure mod_oradav, you enter parameters within a Location directive in httpd.conf. The Location directive specifies the DAV-enabled URL. The DAV
keyword is followed by a single value: On,
which tells mod_dav is to use the local file system for content.
The following example specifies that the directory myfiles
under the Web server documents directory (htdocs
by default) is to be DAV-enabled, along with all directories under myfiles
in the hierarchy. (Note that there must not be any symlinks defined on myfiles
or any of its subdirectories.)
<Location /myfiles> DAV On </Location>
For information about using mod_oradav to access database schemas for access by third-party tools (such as Adobe GoLive and Macromedia Dreamweaver) and Oracle interMedia, see the OraDAV information available on the Oracle Technology Network at
This Oracle module enables strong cryptography for the HTTP Server.
This Oracle module enables single-sign on for the Oracle HTTP Server. mod_osso examines incoming requests and determines whether the resource requested is protected, and if so, retrieves the HTTP Server cookie for the user.
To operate an SSO server in SSL mode, you must specify one or both of these parameters in the mod_osso.conf
file:
nonssl_sso_port=port nonssl_sso_host=alternative sso server name
The port parameter is needed to facilitate internal communication between an Oracle HTTP Server and an SSL-enabled SSO server. At installation time, the SSORegistrar tool sets the nonssl_sso_port
parameter as follows:
nonssl_sso_port=5000
Add the following to the httpd.conf
file to expose the Basic Authentication URL to mod_osso:
#Use the following configuration to protect SSO Server URLs: # SSO Server Login URL <IfDefine SSL> <Location /pls/orasso/orasso.wwsso_app_admin.ls_login> SSLRequireSSL </Location> </IfDefine> # Change password URL <IfDefine SSL> <Location /pls/orasso/orasso.wwsso_app_user.mgr.change_password> SSLRequireSSL </Location> </IfDefine> # External Application Login URL <IfDefine SSL> <Location /pls/orasso/orasso.wwsso_app_user.mgr.change_password> SSLRequireSSL </Location>
This module embeds the Perl interpreter into the Oracle HTTP Server. This eliminates start-up overhead and enables you to write modules in Perl.
A demonstration of Perl capabilities is available from the Oracle9iAS Welcome page. Click the Demonstrations tab, then the J2EE and Web Cache link.
This section provides information for mod_perl users working with databases. It explains how to test a local database connection and set character forms.
Below 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.
##### 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 ######
SQL NCHAR datatypes have been refined in 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 the Oracle9i 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:
# 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 above, 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 will have the form of your choice by default.
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.
Examples:
# 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' );
This function sets the default character form for a database handle.
Example:
$dbh->func( ORA_NCHAR , 'set_default_form' );
This Oracle module connects the Oracle HTTP Server to mod_plsql, enabling you to create Web applications using Oracle stored procedures. This section contains the following topics:
Configuring mod_plsql For Use With WebDB 2.x
The mod_plsql configuration files are related in a "configuration tree", which is implemented as shown below.
The primary Oracle HTTP Server configuration file
ORACLE_HOME/Apache/Apache/conf/httpd.conf
contains an include directive for:
ORACLE_HOME/Apache/Apache/conf/oracle_apache.conf
oracle_apache.conf
contains an include directive for:
ORACLE_HOME/Apache/modplsql/conf/plsql.conf
plsql.conf
contains an include directive for:
ORACLE_HOME/Apache/modplsql/conf/dads.conf ORACLE_HOME/Apache/modplsql/conf/cache.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. An example is shown below.
############################################################################### # mod_plsql Configuration File # ############################################################################### # #In a default install, this file gets included as per the following tree # httpd.conf (under $ORACLE_HOME/Apache/Apache/conf) # | # |--> oracle_apache.conf (under $ORACLE_HOME/Apache/Apache/conf) # | # | # |--> plsql.conf (under $ORACLE_HOME/Apache/modplsql/conf) # | # |-----> dads.conf (under $ORACLE_HOME/Apache/modplsql/conf) # |-----> cache.conf (under $ORACLE_HOME/Apache/modplsql/conf) # # Tell Apache to load the Modplsql module LoadModule plsql_module %ORACLE_HOME%/Apache/modplsql/bin/modplsql.%SO_EXT% # Load in the setting only if plsql_module is loaded <IfModule mod_plsql.c> # Global Settings Section # This section contains modplsql directives that applies to all DADs. # Log mode of modplsql. # To view more details about the internal processing of modplsql, please set # this directive to 'On'. This will cause modplsql to start logging for every # request that is processed. The log files will be generated specified by # the PlsqlLogDirectory directive (defined below). # # Logging is meant to be used for debugging purposes only. When logging is # enabled, there will be a lot of log files generated under # $ORACLE_HOME/Apache/modplsql/logs (or as configured by the directive # PlsqlLogDirectory). This parameter should be set to 'Off' unless recommended # by Oracle support to debug problems with mod_plsql. # # Syntax: PlsqlLogEnable [Off/On] # Default: Off PlsqlLogEnable Off # Log directory of modplsql. # Set the directory name of the place 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. In other words, if Apache is running as user nobody, # then this directory must have its permissions set so that user nobody can # write to it. # # Syntax: PlsqlLogDirectory [directory] # Default: [none] PlsqlLogDirectory %ORACLE_HOME%/Apache/modplsql/logs # DMS logging of modplsql. # This turns on/off the DMS logging for modplsql. Usually, this is turned on # in order to monitor modplsql. # # If you do not plan to monitor the performance of your site using the OEM # Tool, then turning this parameter off will give you a small benefit in # performance. # # Syntax: PlsqlDMSEnable [On/Off] # Default: On # PlsqlDMSEnable On # Cache Settings Section # Load in the cache settings by including it here include %ORACLE_HOME%/Apache/modplsql/conf/cache.conf # Data Access Descriptors Settings Section # Load in the DADs settings by including it here include %ORACLE_HOME%/Apache/modplsql/conf/dads.conf </IfModule>
This file contains the configuration parameters for the PL/SQL Database Access Descriptor (DAD).
A DAD is a set of values that specify how mod_plsql connects to a database server to fulfill an HTTP request. Besides the connection 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 OWA Web ToolKit must create a DAD to invoke the application.
Some typical PL/SQL applications that require DADs are:
A DAD has the format shown below. It uses the Oracle HTTP Server <Location>
container directive to mount virtual paths to a particular DAD.
<Location /pls/orasso> SetHandler pls_handler Order deny,allow ... </Location>
The <Location>
container specifies the virtual path (the DAD path, which in the example above is /pls/orasso
) for the Oracle HTTP Server. The directives in the container specify how requests routed to that location are to be processed. This is a mandatory parameter for a DAD.
For most PL/SQL applications, the DAD path can be any string.
For example:
/myapp /plsqlapp /cartx/owa
For Oracle Portal, all DADs must be prefixed with '/pls'. For example:
/pls/portal /pls/portal309 /pls/portal306
The SetHandler directive tells the Oracle HTTP Server to forward the request to mod_plsql to handle. This is a mandatory parameter for a DAD.
Below is an example of a typical PLSQL application DAD:
<Location /pls/plsqlapp> SetHandler pls_handler Order deny,allow AllowOverride None PlsqlDatabaseUsername scott PlsqlDatabasePassword tiger PlsqlDatabaseConnectString host:port:sid PlsqlDefaultPage scott.home PlsqlDocumentTablename scott.wwdoc_document PlsqlDocumentPath docs PlsqlDocumentProcedure scott.wwdoc_process.process_download PlsqlAuthenticationMode Basic </Location>
This section describes all the Database Access Descriptor (DAD) level parameters that can be specified in the dads.conf
file. The following directives are Oracle HTTP Server supported directives. You can use any directives typically used in <Location>
containers, such as:
Order deny,allow AllowOverride None
Specifies the username to use to log in to the database.
Syntax:
PlsqlDatabaseUsername string
Default: None.
Example:
PlsqlDatabaseUsername scott
Notes:
PlsqlAuthenticationMode
to Basic
and uses dynamic authentication.
SingleSignOn
authentication, this parameter is the name of the schema owner.
username
.
Specifies the password to use to log in to the database.
Syntax:
PlsqlDatabasePassword string
Default: None.
Example:
PlsqlDatabasePassword tiger
Notes:
password
.
Specifies the connection to a remote database.
Syntax:
PlsqlDatabaseConnectString string
where string can be one of the following:
Default: None.
Example:
PlsqlDatabaseConnectString orcl.us.oracle.com
or
PlsqlDatabaseConnectString myhost.us.oracle.com:1521:ORCL #
Notes:
TWO_TASK
is set (called LOCAL
on Windows NT), this parameter is unnecessary.
sqlplus DADUsername/DADPassword@string
connect_string
.
Specifies the authentication mode to use for allow access through this DAD.
Syntax:
PlsqlAuthenticationMode Basic/SingleSignOn/GlobalOwa/CustomOwa/PerPackageOwa
Default: Basic
Example:
PlsqlAuthenticationMode Basic
Notes:
SingleSignOn
.
Basic
.
GlobalOwa
mode.
GlobalOwa
, CustomOwa
, PerPackageOwa
) are used by very few PL/SQL applications.
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, you can omit this parameter.
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
Basic
.
Specifies the cookie name for the Oracle Portal session.
Syntax:
PlsqlSessionCookieName string
Default: DAD name
Example:
PlsqlSessionCookieName portal
Notes:
SingleSignOn
authentication, this parameter can be omitted. In most other cases, the session cookie name should be omitted (and this parameter automatically defaults to the DAD name).
sncookiename
.
Specifies how package and session state should be cleaned up at the end of each mod_plsql request.
Setting this parameter to StatelessWithResetPackageState
causes mod_plsql to call dbms_session.reset_package_state
at the end of each mod_plsql request.
Setting this parameter to StatelessWithPreservePackageState
causes mod_plsql to call htp.init
at the end of each mod_plsql request. This cleans up the state of session variables in the OWA Web ToolKit. The PL/SQL application is responsible for cleaning up its own session state. Failure to do so will cause erratic behavior, in which a request will start recognizing or manipulating state modified in previous requests.
Setting this parameter to StatelessWithFastResetPackageState
causes mod_plsql to call dbms_session.modify_package_state(dbms_session.reinitialize)
at the end of each mod_plsql request. This API is a lot faster than the mode of StatelessWithResetPackageState
and avoids some latch contention issues, but exists only in database versions 8.1.7.2 and above. This mode uses up slightly more memory than the default mode. Check the status of bug 2096244 before using this mode.
Syntax:
PlsqlSessionStateManagement StatelessWithResetPackageState/StatelessWithFastResetPackageState/StatelessWithP reservePackageState
Default: StatelessWithResetPackageState
Example:
PlsqlSessionStateManagement StatelessWithResetPackageState
Notes:
StatelessWithPreservePackageState
mode is only used with older releases of Oracle applications, in which Oracle9iAS Portal is not used.
stateful
.
stateful=no
or stateful=STATELESS_RESET
corresponds to PlsqlSessionStateManagement StatelessWithResetPackageState
stateful=STATELESS_FAST_RESET
corresponds to PlsqlSessionStateManagement StatelessWithFastResetPackageState
stateful=STATELESS_PRESERVE
corresponds to PlsqlSessionStateManagement StatelessWithPreservePackageState
Specifies the maximum number of requests a pooled database connection should service before it is closed and re-opened.
Syntax:
PlsqlMaxRequestsPerSession number
Default: 1000
Example:
PlsqlMaxRequestsPerSession 1000
Notes:
reuse
. Instead of taking a value of Yes/No
, the new parameter allows for finer control over the connection pool reuse in mod_plsql.
Specifies the default procedure to call if none is specified in the URL.
Syntax:
PlsqlDefaultPage string
Default: None.
Example:
PlsqlDefaultPage myschema.mypackage.home
Notes:
Specifies the table in the database to which all documents will be uploaded.
Syntax:
PlsqlDocumentTablename string
Default: None.
Example:
PlsqlDocumentTablename myschema.document_table
For Portal:
PlsqlDocumentTablename portal.wwdoc_document
For WebDB:
PlsqlDocumentTablename webdb.wwv_document
Notes:
document_table
.
Specifies the access path to download a document. This is a virtual path that initiates document download from the document table. For example, if this parameter is set to docs
, then the following URLs will start the document downloading process for URLs of the format:
/pls/dad/docs /pls/plsqlapp/docs
Syntax:
PlsqlDocumentPath string
Default: docs
Example:
PlsqlDocumentPath docs
Notes:
document_path
.
Specifies the procedure to call when a document download is initiated. This procedure is called to process the download.
Syntax:
PlsqlDocumentProcedure string
Default: None.
Example:
PlsqlDocumentProcedure portal.wwdoc_process.process_download
Notes:
document_proc
.
Specifies the extensions to be uploaded as LONGRAW data type (as opposed to using the default BLOB data type). The default can be overridden by specifying multiline directives of file extensions for field. A value of '*' in this field will cause all documents to be uploaded as LONGRAW.
Syntax:
PlsqlUploadAsLongRaw string multiline
Default: None.
Example:
PlsqlUploadAsLongRaw jpg PlsqlUploadAsLongRaw gif
For WebDB:
PlsqlUploadAsLongRaw *
Notes:
upload_as_log_raw
.
Specifies a virtual path alias to map to a procedure call. This is application specific; for example, Oracle Portal sets this to url
which means that all URLs of type /pls/myapp/url/*
are handled as special URLs and directed to a specific procedure as configured by PlsqlPathAliasProcedure.
Syntax:
PlsqlPathAlias string
Default: None.
Example:
PlsqlPathAlias url
Notes:
pathalias
.
Specifies the procedure to call when the virtual path in the URL matches the path alias as configured by PlsqlPathAlias
.
Syntax:
PlsqlPathAliasProcedure string
Default: None.
Example:
PlsqlPathAliasProcedure portal.wwpth_api_alias.process_download
Notes:
pathaliasproc
.
Specifies a pattern for excluding certain procedures, packages, or schema names from being directly executed from a browser. This is a multi-line directive in which each pattern occupies one line. The pattern is case-insensitive and can accept simple wildcards such as *, ? and [a-z]. The default patterns excluded from direct URL access are: sys.*
, dbms_*
, utl_*
, owa_*
, owa.*
, htp.*
, htf.*
.
Setting this directive to #NONE#
will disable all protection. This is not recommended for a live site, however, it is sometimes used for debugging purposes.
If this parameter is overridden, the defaults are no longer in effect. In that case, you must explicitly add the default list to the list of excluded patterns.
Syntax:
PlsqlExclusionList string multiline/#NONE#
Default:
sys.*
dbms_*
utl_*
owa_*
owa.*
htp.*
htf.*
Example:
PlsqlExclusionList sys.* PlsqlExclusionList dbms_* PlsqlExclusionList utl_* PlsqlExclusionList owa_* PlsqlExclusionList owa.* PlsqlExclusionList htp.* PlsqlExclusionList htf.* PlsqlExclusionList myschema.private.*
will exclude access to URLs containing: sys.*
, dbms_*
, utl_*
, owa_*
, owa.*
, htp.*
, htf.*
, myschema.private.*
However,
PlsqlExclusionList myschema.private.*
will only exclude access to URLs containing myschema.private.*. The system defaults will no longer be protected (this is normally done for backward compatibility only).
Notes:
exclusion_list
.
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 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
Syntax:
PlsqlCGIEnvironmentList string multiline
Default: None.
Example:
To add and/or override:
PlsqlCGIEnvironmentList MYENVAR1=myvalue
To remove:
PlsqlCGIEnvironmentList MYENVAR2=
To add and/or override from the Oracle HTTP Server environment:
PlsqlCGIEnvironmentList DOCUMENT_ROOT
Notes:
owa_util.get_cgi_env
.
cgi_env_list
.
Specifies the compatibility mode for running mod_plsql. If you are running mod_plsql against an pre-9.0.2 version of mod_plsql, you must set this value to 1.
Syntax:
PlsqlCompatibilityMode BitFlag
Default: 0
Example:
PlsqlCompatibilityMode 1
Notes:
+
) 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.
Specifies the NLS_LANG variable for this DAD. This parameter overrides the NLS_LANG environment variable. When this parameter is set, the PL/SQL Gateway uses the specified NLS_LANG to connect to the database. Once connected, an alter session command is issued to switch to the specified language and territory.
Syntax: PlsqlNLSLanguage string
Default: None.
Example:
PlsqlNLSLanguage America_American.UTF8
Notes:
PlsqlTransferMode
set to CHAR
which means that the character set in PlsqlNLSLanguage
needs to match the character set of the database. In one special case, where the database and mod_plsql are both using fixed-size character sets, and the character set width matches, the character set can be different. The response character set is always the mod_plsql character set.
If PlsqlTransferMode
is set to RAW
, then this parameter can be ignored.
nls_lang
.
Specifies the number of rows of content to fetch from the database for each trip (using either owa_util.get_page
or owa_util.get_page_raw
). For large generated pages, setting this parameter higher can decrease the number of trips to the database to get the content. However, mod_plsql memory usage will increase.
For Japanese, Chinese or multi-byte character set languages, setting this parameter to 256 will yield better performance.
Syntax:
PlsqlFetchBufferSize number
Default: 128
Example:
PlsqlFetchBufferSize 256
Notes:
get_page
or get_page_raw
fetching fewer bytes per row (calculations in the OWA Web ToolKit are character-based and in the case of multi-byte characters, OWA packages assume a worst-case character byte size and do not attempt to pack each row to its maximum).
response_array_size
.
Specifies the Error Reporting Mode for mod_plsql errors. This parameter accepts the following values:
ApacheStyle
: This is the default mode. In this mode, mod_plsql indicates to Oracle HTTP Server the HTTP error that was encountered. The Oracle HTTP Server then generates the error page. This can be used with the Oracle HTTP Server ErrorDocument
directive to produce customized error messages.
ModplsqlStyle
: mod_plsql generates the error pages, usually a short message indicating the PL/SQL error that was encountered and PL/SQL exception stack, if any. For example:
scott.foo PROCEDURE NOT FOUND
DebugStyle
: This mode provides more details than ModplsqlStyle
. mod_plsql provides more details about the URL, parameters and also produces server configuration information. This mode is for debugging purposes only. Do not use this in a production system, since displaying internal server variables could be a security risk.
Syntax: PlsqlErrorStyle ApacheStyle/ModplsqlStyle/DebugStyle
Default: ApacheStyle
Example:
PlsqlErrorStyle ModplsqlStyle
Notes:
Specifies the transfer mode for data from the database back to mod_plsql. Most applications use the default value of CHAR
.
Syntax:
PlsqlTransferMode CHAR/RAW
Default: CHAR
Example:
PlsqlTransferMode CHAR
Notes:
CHAR
mode is useless, since it will always convert the response data from the database character set to the mod_plsql character set.
RAW
transfer mode was not supported.
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. This is an internal parameter and can be removed without notice.
Syntax:
PlsqlBeforeProcedure string
Default: None.
Example:
PlsqlBeforeProcedure portal.mypkg.mybeforeproc
Notes:
before_proc
.
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. This is an internal parameter and can be removed without notice.
Syntax:
PlsqlAfterProcedure string
Default: None.
Example:
PlsqlAfterProcedure portal.mypkg.myafterproc
Notes:
after_proc
.
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.
Syntax:
PlsqlBindBucketLengths number multiline
Default: 4,20,100,400
Example:
PlsqlBindBucketLengths 4 PlsqlBindBucketLengths 25 PlsqlBindBucketLengths 125
Notes:
bind_bucket_lengths
.
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.
Syntax:
PlsqlBindBucketWidths number multiline
Default:
32,128,1450,2048,4000
Example:
PlsqlBindBucketWidths 40 PlsqlBindBucketWidths 400 PlsqlBindBucketWidths 2000
Notes:
bind_bucket_widths
.
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.
Syntax:
PlsqlAlwaysDescribeProcedure On/Off
Default: Off
Example:
PlsqlAlwaysDescribeProcedure Off
Notes:
always_desc
.
Time after which idle sessions are closed and cleaned up. 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, that session will be closed and freed. This is so that unused sessions can be cleaned up and memory be freed on the database side.
Syntax:
PlsqlIdleSessionCleanupInterval number
Default: 15 minutes
Example:
PlsqlIdleSessionCleanupInterval 10
Notes:
This section contains some examples of DADs used in Oracle9iAS applications.
<Location /pls/portal> SetHandler pls_handler Order deny,allow AllowOverride None PlsqlDatabaseUsername portal PlsqlDatabasePassword portal PlsqlDatabaseConnectString host:port:sid PlsqlDefaultPage portal.home PlsqlDocumentTablename portal.wwdoc_document PlsqlDocumentPath docs PlsqlDocumentProcedure portal.wwdoc_process.process_download PlsqlAuthenticationMode SingleSignOn PlsqlPathAlias url PlsqlPathAliasProcedure portal.wwpth_api_alias.process_download PlsqlSessionCookieName portal </Location>
<Location /pls/orasso> SetHandler pls_handler Order deny,allow AllowOverride None PlsqlDatabaseUsername orasso PlsqlDatabasePassword orasso PlsqlDatabaseConnectString host:port:sid PlsqlDefaultPage orasso.home PlsqlDocumentTablename orasso.wwdoc_document PlsqlDocumentPath docs PlsqlDocumentProcedure orasso.wwdoc_process.process_download PlsqlAuthenticationMode SingleSignOn PlsqlPathAlias url PlsqlPathAliasProcedure orasso.wwpth_api_alias.process_download PlsqlSessionCookieName orasso </Location>
<Location /pls/portal30> SetHandler pls_handler Order deny,allow AllowOverride None PlsqlDatabaseUsername portal30 PlsqlDatabasePassword portal30 PlsqlDatabaseConnectString host:port:sid PlsqlDefaultPage portal30.home PlsqlDocumentTablename portal30.wwdoc_document PlsqlDocumentPath docs PlsqlDocumentProcedure portal30.wwdoc_process.process_download PlsqlAuthenticationMode SingleSignOn PlsqlPathAlias url PlsqlPathAliasProcedure portal30.wwpth_api_alias.process_download PlsqlSessionCookieName portal30 PlsqlCompatibilityMode 1 </Location>
<Location /pls/webdb> SetHandler pls_handler Order deny,allow AllowOverride None PlsqlDatabaseConnectString host:port:sid PlsqlDefaultPage webdb.home PlsqlDocumentTablename webdb.wwv_document PlsqlDocumentPath docs PlsqlUploadAsLongRaw * PlsqlDocumentProcedure webdb.wwv_document.process_download </Location>
This file contains the cache settings for mod_plsql. An example is shown below.
############################################################################### # Modplsql Caching Configuration File # ############################################################################### # Note: this file should be appended or included into your plsql.conf # This file specifies the charateristics of the modplsql caching system. There # are two types of caching being used : # - PLSQL Cache # PLSQL Caching is used to cache dynamically generated contents that don't # change often. Applications using the OWA_CACHE package, such as Oracle # Portal, use this feature to improve performance and take some load off # the database. # # - Session Cookie Cache # Session Cookie Caching is used to cache the cookie value generated by a # Single Sign On server for a particular session. By enabling this feature, # a roundtrip to the database to obtain a user's credentials is avoided, # thereby, improving performance. Only applications that use the Single Sign # On will benefit from this feature. # Turn caching on or off. # For maximum performance, turn on caching. Please note that only applications # that support PLSQL caching, such as Oracle Portal, will benefit from this # feature. # # The only time caching should be turn off is during debugging and caching # is the suspect of the problem. Otherwise, in a production environment, it # should always be turned on. # # If you are absolutely sure that your application does not make use of # Oracle Portal or the Oracle Login Server and does not in any way make use of # the OWA_CACHE packages in the OWA ToolKit, then you could choose to disable # caching # # Syntax: PlsqlCacheEnable [On/Off] # Default: Off PlsqlCacheEnable On # Set directory to write the cache files. # This directive specifies where to put the cached contents. # # For PLSQL cache, all cache files will be created under a directory called # "plsql" relative to specified caching directory. # # For Session Cookie cache, all cache files will be created under a directory # called "session" relative to specified caching directory. # # This directory must exists or Apache will not start. # # On Unix, this directory must have write permissions by the owner of the # child httpd processes. In other words, if Apache is running as user nobody, # then this directory must have its permissions set so that user nobody can # write to it. # # Syntax: PlsqlCacheDirectory [directory] # Default: [none] PlsqlCacheDirectory %ORACLE_HOME%/Apache/modplsql/cache # Set the total size of the cache. # This setting limits the amount of space the cache is allowed to use. Both # PLSQL cache and Session Cookie cache shares this cache space. Please # note that this setting is not a hard limit. It might exceed the limit # temporarily during normal processing. This is normal behavior. # # This parameter takes bytes as the value. Therefore : # 1 Megabyte = 1048576 bytes # 10 Megabyte = 10485760 bytes # # Syntax: PlsqlCacheTotalSize [number] # Default: 20971520 (20 Megabyte) PlsqlCacheTotalSize 20971520 # Set the size of the space used by the cache after cleanup has been performed. # # Cleanup happens whenever cleanup starts and the total size of the cache is # exceeded. This directive allows you to specifies the total size of the # cache to maintain after the cleanup has been performed. This ensures that # a large of the cache is still around after cleanup. # # This directive is useful in fine tuning the cleanup algorithm. Since cleanup # takes quite some time to complete, this directive allows you to tune it to # your environment. If it is set to a high number, cleanup will finish faster # and takes less CPU cycles, but it will happen more frequently because it # didn't thoroughly clean the cache in each run. If it is set to a low number, # cleanup will run longer, but it will happen less frequently because it # did thoroughly clean the cache in each run. Therefore, depending on how a # system uses the cache system, this setting can be tweaked to best match it.\ # # In general, setting this directive to about 50-70% of the total cache size # will be sufficient. For example: # # PlsqlCacheTotalSize 1000000 # PlsqlCacheCleanupSize 600000 # # This parameter takes bytes as the value. # # Syntax: PlsqlCacheCleanupSize [number] # Default: 10485760 (10 Megabyte) PlsqlCacheCleanupSize 10485760 # Set the amount of time (in minutes) in which the cleanup should start. # # This directive allows you to control when cleanup actually happens. This # interval is amount of time passed after the previous cleanup session. In # general, if you are low on disk space, set this number to a small amount # of time will help free up used disk space. However, you have have lots of # disk space, setting this to a high number will ensure better cache hits. # # Syntax: PlsqlCacheCleanupInterval [number] # Default: 1440 (24 hours) PlsqlCacheCleanupInterval 720 # Set the maximum size a cache file can be. # # This directive is to prevent the case in which one file can fill up the # entire cache. In general, setting this directive to about 1-10% of the # total cache size will be sufficient. # # Syntax: PlsqlCacheMaxSize [number] # Default: 1048576 (1 Megabyte) PlsqlCacheMaxSize 1048576
Although WebDB 2.x is not certified with Oracle9iAS Release 2 (9.0.2), there are no known issues that would prevent you from using WebDB 2.x with mod_plsql. Follow these steps to configure mod_plsql to run with WebDB 2.x instances:
dads.conf
for the WebDB 2.x schema:
PlsqlAuthenticationMode Basic PlsqlDocumentTablename schema.wwv_document PlsqlUploadAsLongRaw **
ORACLE_HOME/Apache/modplsql/owa/wwvdocs.sql
and ORACLE_HOME/Apache/modplsql/owa/wwvdocb.plb
.
This enables WebDB document upload/download capability for 2.x websites.
This module provides proxy capability for FTP, CONNECT (for SSL), HTTP/0.9 and HTTP/1.0.
See Also:
Module mod_proxy in the Apache Server documentation |
This module provides an engine for rewriting URLs.
See Also:
Module mod_rewrite in the Apache Server documentation |
This module enables you to set environment variables based on characteristics of a request.
See Also:
Module mod_setenvif in the Apache Server documentation |
This module loads executable code and modules into the server at start-up time.
See Also:
Module mod_so in the Apache Server documentation |
This module attempts to correct misspelled or miscapitalized URLs.
See Also:
Module mod_speling in the Apache Server documentation |
This module displays an HTML page of server activity and performance.
See Also:
Module mod_status in the Apache Server documentation |
This module creates a unique id for each request.
See Also:
Module mod_unique_id in the Apache Server documentation |
This module is available for UNIX systems only.
This module maps requests to user-specific directories.
See Also:
Module mod_userdir in the Apache Server documentation |
This module tracks user activity by creating a clickstream log.
See Also:
Module mod_usertrack in the Apache Server documentation |
This module enables dynamically configured mass virtual hosting.
See Also:
Module mod_vhost_alias in the Apache Server documentation |
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|