Home > Blogroll, installation > mod_plsql

mod_plsql

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
</Location>

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!

  1. May 23rd, 2006 at 16:19 | #1

    what about example of dbms_epg , configuration ?

  2. May 23rd, 2006 at 18:31 | #2

    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.

    cheers

    Pete

  3. May 23rd, 2006 at 23:37 | #3

    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.

  4. Anonymous
    May 26th, 2006 at 20:09 | #4

    what? not even a database?

  5. May 26th, 2006 at 21:04 | #5

    good point, I need a listener too!

  6. June 6th, 2006 at 12:32 | #6

    by the way, the http can be located on a different machine than the db server

  7. June 6th, 2006 at 15:38 | #7

    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.

  8. Anonymous
    June 30th, 2006 at 13:25 | #8

    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?
    Thanks!
    I’m on Windows Pro with SP 2

  1. No trackbacks yet.