Re: CGI and Oracle on UNIX

From: James P. Cooper <pixel_at_rhino.coe.missouri.edu>
Date: 1996/04/05
Message-ID: <4k24s1$1g5e_at_news.missouri.edu>#1/1


In article <4k18c6$q7g_at_phunn1.sbphrd.com>,

        gtting_at_mcs.drexel.edu (Terence Ting) writes:
>Hi,
> We are considering using CGI to talk to Oracle 7.1 Server on Unix.
>Could somebody give us some advice what to use to talk to Oracle and
>where to get it? C, perl, AWK, . . . . .

I just wrote out a nice response to this, but then I clicked "Abort" in Knews and accidentally deleted it...grrr!

ok, the short version: :-)

We just starting using Oracle as our database server too, and we've been trying to find a similar set of tools to work with. We've found three different approaches:

  1. PRO*C and cgihtml

   PRO*C lets you write embedded SQL into C code. You run your PRO*C    source through the PRO*C precompiler, then compile it with cc and    presto!...you can talk to Oracle via C.    

   One thing you must do is make sure to putenv the ORACLE_HOME and    ORACLE_SID environment variables...otherwise you won't get very far    

   We're using cgihtml to decode the form input into a C structure. If    you already have a C cgi library, then you could definately use that    with PRO*C.    

   If not, cgihtml is at:
   http://hcs.harvard.edu/~eekim/web/cgihtml/   

2) MOWI (or the older WOW) interface

   If you've already got some Oracle stored procedures that you'd like    to use as CGIs, then use MOWI. MOWI is an extension of the WOW    interface that Oracle used to give away at:    http://dozer.us.oracle.com To my knowledge this server is no more,    and Oracle is going to sell WOW in the future :-(    

   However, Andy McAllister at the University of Missouri has improved    WOW, and released it as MOWI (I can't keep straight what these    acronyms stand for...hehe..). It's available at:    

   ftp://ftp.research.missouri.edu/pub/oracle/mowi.tar

   MOWI consists of:    

  1. a shell script that sets the Oracle environment
  2. a PRO*C program that decodes the data from the browser and executes the proper stored procedure
  3. a set of stored procedures that allow you to output HTML from within PL/SQL

    It looks pretty groovy, but our development team is still getting up     to speed on PL/SQL, so we don't have any stored procedures we need     to execute. But if you have a number of developers, and need an     easy way to allow them all to access the same source code, then     using this with PL/SQL is probably a pretty good idea.     

3) Sapphire/Web

    Available from Bluestone Corp (http://www.bluestone.com)     This program allows Sybase, Informix, and Oracle developers to     access their database from the Web, and provides a visual     development tool to ease the process. It's free for non-profits and     universities (!!!), and seems to work pretty well.     

    It generates C code, and creates the Makefiles to compile them     properly. It also includes a gateway that lets your CGI programs     talk to Oracle, but yet keeps the source vendor-neutral. This also     keeps your executable file size down (b/c you don't have the PRO*C     libraries linked into each CGI).     

    A nice package in all. You can easily add your own C source code,     and you can execute stored procedures with it. We were able to put     a database online with it in less than a week (not real complex     project though...).     

    One drawback: Sapphire/Web parses the data from the browser for     you, but it doesn't know about ENC_TYPE: mixed/multi-part, so you     can't do file uploads with it. I've tried to figure out a way to     bypass their parser, and use my own, but it seems pretty hard-coded     into the tool. I've emailed their support folks, but I didn't get     an answer...     

....

I hope that helps you. Good luck!

  • James
.........................................................................
                        James Paul Cooper * Pixel
                         MU College of Education
       pixel_at_coe.missouri.edu - http://tiger.coe.missouri.edu/~pixel/
.........................................................................
Received on Fri Apr 05 1996 - 00:00:00 CEST

Original text of this message