mod_plsql is an oracle module for Apache. Let’s do it from A to Z.

I install HTTP server. In 10g, it is located on the companion cd and requires a separate oracle home.

I copy my tnsnames.ora in COMPANIONHOME/network/admin

Then, I configure COMPANIONHOME/Apache/modplsql/conf/dads.conf

<Location /helloworld>
  SetHandler pls_handler
  PlsqlDatabaseUsername         scott
  PlsqlDatabasePassword         tiger
  PlsqlDatabaseConnectString    LSC01

I create my procedure
create or replace procedure helloworld is begin htp.bold('hello world'); end;

I start my Apache server
$ORACLE_HOME/opmn/bin/opmnctl startproc ias-component=HTTP_Server

I open my browser
firefox http://localhost:7780/helloworld/scott.helloworld

So easy!

8 Replies to “mod_plsql”

  1. Hi Laurent,

    Nice simple example BUT what about security. I always advise people to disable the HTTP servers shipped with Oracle unless there is a pressing business need to use them. If they are needed then many more steps are needed to ensure that they are hardened.

    Any web based service enabled on a database server is potentially another target for an attacker.



  2. Pete, this was part of a platform migration (AIX->Solaris), where the “security” is not in the discussion today. But I prefer not to have any service except SSH running on my db server.

  3. As of 10gR2, mod_plsql is part of the built-in webserver. DAD configuration is done with the dbms_epg package. So you don’t even need an applicationserver anymore ;-).
    The built-in webserver is part of Oracle XMLDB and is subject to that security implementation.

  4. Hello, I have some problem with mod_plsql, I want to be able to make a Hello World application with OHS from Oracle Application Server 10g Release 3 but it don’t have in it’s browser enterprise manager a PL/SQL, DAD, etc references…
    What can I do?
    I’m on Windows Pro with SP 2

Leave a Reply

Your email address will not be published.