I've spotted a few problems:

1)  You refer to the driver as "ns_ora" and not "ora8".

2)  You are missing the necessary ns/db/pool/ora_db section.

3)  You are missing the necessary ns/server/${servername}/db section.

Compile the DLL from scratch (without your changes) and make sure
these problems are corrected in your nsd.tcl, and try again.

- Dossy


On 2001.04.13, Ling Wang <[EMAIL PROTECTED]> wrote:
> Dossy,
>
> I have been using Oracle on my WinNT box for a while. It is fully
> functional. The AOLServer I have just installed is also working because i
> tested with the index.html. Here is the problem I have been running into:
>
> After compiling the source code into the dll. I copy it into the bin
> directory and added the following line into my nsd.tcl:
>
> ns_section "ns/db/drivers"
> ns_param  ns_ora  ${bindir}/ora8${ext}
>
> When I run nsd.exe -ft nsd.tcl, I got an error saying Ns_ModuleInit does not
> exist and the nsd.exe terminated with error. I then looked at the source
> code and found the entry point is Ns_DbDriverInit instead. So I made the
> change from Ns_DbDriverInit to Ns_ModuleInit and then I got a little
> further. This time, after loading the dll, I am getting the following messge
> saying:
>
> Notice: server1 driver LobBufferSize = 16384
> Notice: server1 driver PrefetchRows = 0
> Notice: server1 driver PrefetchMemory = 0
>
> And again nsd.exe then terminate with the above error without going to the
> next line in the nsd.tcl
>
> It looks like when I look into the source code the ora8.dll is looking the
> input parameters. But I have no idea how and where should I specify the
> above parameters. Can you help me out please?
>
> Thank you very much
>
> Ling Wang
>
> By the way here is my entire nsd.tcl
>
>
> # $Header: /cvsroot/aolserver/aolserver/nsd/sample-config.tcl,v 1.1
> 2000/10/09 22:00:32 kriston Exp $
>
> #
> # sample-config.tcl --  The AOLserver Startup Script
> #
> #      This is a Tcl script that is sourced when AOLserver starts up.
> #      A detailed reference is in "doc/config.txt".
> #
>
> ns_log notice "config.tcl: starting to read config file..."
>
>
> #
> # Set some Tcl variables that are commonly used throughout this file.
> #
>
> set httpport               8000
> set httpsport              8443
>
> # The hostname and address should be set to actual values.
> set hostname               [ns_info hostname]
> set address                [ns_info address]
>
> set servername             "server1"
> set serverdesc             "Server Name"
>
> set homedir                [file dirname [ns_info config]]
> set bindir                 [file dirname [ns_info nsd]]
>
> set pageroot               ${homedir}/servers/${servername}/pages
> set directoryfile          index.adp,index.html,index.htm
>
> set ext [info sharedlibextension]
> # nsssl: Only loads if keyfile.pem and certfile.pem exist.
> #set sslmodule              nsssl${ext}  ;# Domestic 128-bit/1024-bit SSL.
> set sslmodule              nsssle${ext} ;# Exportable 40-bit/512-bit SSL.
> set sslkeyfile   ${homedir}/servers/${servername}/modules/nsssl/keyfile.pem
> set sslcertfile  ${homedir}/servers/${servername}/modules/nsssl/certfile.pem
>
> # nscp: Uncomment the sample password and log in with "nsadmin", password
> "x",
> #       type "ns_crypt newpassword salt" and put the encrypted string below.
> set nscp_port 9999
> set nscp_addr 127.0.0.1
> set nscp_user ""
> #set nscp_user "nsadmin:t2GqvvaiIUbF2:" ;# sample user="nsadmin", pw="x".
>
>
> #
> # Global server parameters
> #
> ns_section "ns/parameters"
> ns_param   home            $homedir
> ns_param   debug           false
>
>
> #
> # Thread library (nsthread) parameters
> #
> ns_section "ns/threads"
> ns_param   mutexmeter      true      ;# measure lock contention
> #ns_param   stacksize [expr 128*1024] ;# Per-thread stack size.
>
> #
> # MIME types.
> #
> #  Note: AOLserver already has an exhaustive list of MIME types, but in
> #  case something is missing you can add it here.
> #
> ns_section "ns/mimetypes"
> ns_param   default         "*/*"     ;# MIME type for unknown extension.
> ns_param   noextension     "*/*"     ;# MIME type for missing extension.
> #ns_param   ".xls"          "application/vnd.ms-excel"
>
>
> ############################################################
> #
> # Server-level configuration
> #
> #  There is only one server in AOLserver, but this is helpful when multiple
> #  servers share the same configuration file.  This file assumes that only
> #  one server is in use so it is set at the top in the "server" Tcl
> variable.
> #  Other host-specific values are set up above as Tcl variables, too.
> #
>
> ns_section "ns/servers"
> ns_param   $servername     $serverdesc
>
>
> #
> # Server parameters
> #
> ns_section "ns/server/${servername}"
> ns_param   directoryfile   $directoryfile
> ns_param   pageroot        $pageroot
> ns_param   globalstats     true      ;# Enable built-in statistics.
> ns_param   urlstats        true      ;# Enable URL statistics.
> ns_param   maxurlstats     1000      ;# Max number of URL's to do stats on.
> ns_param   enabletclpages  false     ;# Parse *.tcl files in pageroot.
>
> # Directory listings -- use an ADP or a Tcl proc to generate them.
> #ns_param   directoryadp    $pageroot/dirlist.adp ;# Choose one or the
> other.
> #ns_param   directoryproc   _ns_dirlist           ;#  ...but not both!
> #ns_param   directorylisting simple               ;# Can be simple or fancy.
>
>
> #
> # ADP (AOLserver Dynamic Page) configuration
> #
> ns_section "ns/server/${servername}/adp"
> ns_param   map             "/*.adp"  ;# Extensions to parse as ADP's.
> #ns_param   map             "/*.html" ;# Any extension can be mapped.
> ns_param   enableexpire    false     ;# Set "Expires: now" on all ADP's.
> ns_param   enabledebug     false     ;# Allow Tclpro debugging with
> "?debug".
>
> # ADP special pages
> #ns_param   errorpage      ${pageroot}/errorpage.adp ;# ADP error page.
>
>
> #
> # ADP custom parsers -- see adp.c
> #
> ns_section "ns/server/${servername}/adp/parsers"
> ns_param   adp             ".adp"    ;# adp is the default parser.
>
>
> #
> # Socket driver module (HTTP)  -- nssock
> #
> ns_section "ns/server/${servername}/module/nssock"
> ns_param   port            $httpport
> ns_param   hostname        $hostname
> ns_param   address         $address
>
>
> #
> # Socket driver module (HTTPS) -- nsssl
> #
> #  nsssl does not load unless sslkeyfile/sslcertfile exist (above).
> #
> ns_section "ns/server/${servername}/module/nsssl"
> ns_param   port            $httpsport
> ns_param   hostname        $hostname
> ns_param   address         $address
> ns_param   keyfile         $sslkeyfile
> ns_param   certfile        $sslcertfile
>
>
> #
> # Control port -- nscp
> #
> #  nscp does not load unless nscp_user is a valid user.
> #
> ns_section "ns/server/${servername}/module/nscp"
> ns_param   port            $nscp_port
> ns_param   address         $nscp_addr
>
> ns_section "ns/server/${servername}/module/nscp/users"
> ns_param   user            $nscp_user
>
>
> #
> # Access log -- nslog
> #
> ns_section "ns/server/${servername}/module/nslog"
> ns_param   rolllog         true      ;# Should we roll log?
> ns_param   rollonsignal    true      ;# Roll log on SIGHUP.
> ns_param   rollhour        0         ;# Time to roll log.
> ns_param   maxbackup       5         ;# Max number to keep around when
> rolling.
>
>
> #
> # CGI interface -- nscgi
> #
> #  WARNING: These directories must not live under pageroot.
> #
> ns_section "ns/server/${servername}/module/nscgi"
> #ns_param   map "GET  /cgi /usr/local/cgi"     ;# CGI script file dir (GET).
> #ns_param   map "POST /cgi /usr/local/cgi"     ;# CGI script file dir
> (POST).
>
>
> #
> # Modules to load
> #
> ns_section "ns/server/${servername}/modules"
> ns_param   nssock          ${bindir}/nssock${ext}
> ns_param   nslog           ${bindir}/nslog${ext}
> #ns_param   nscgi           ${bindir}/nscgi${ext}  ;# Map the paths before
> using.
> #ns_param   nsperm          ${bindir}/nsperm${ext} ;# Edit passwd before
> using.
> #
> # Db driver module -- ora8
> #
> ns_section "ns/db/drivers"
> ns_param  ns_ora  ${bindir}/ora8${ext}
> ns_section "ns/db/pools"
> ns_param ora_db "Your Oracle Database Pool"
>
>
> #
> # nsssl: Only loads if sslcertfile and sslkeyfile exist (see above).
> #
> if { [file exists $sslcertfile] && [file exists $sslkeyfile] } {
>     ns_param nsssl ${bindir}/${sslmodule}
> } else {
>     ns_log warning "config.tcl: nsssl not loaded -- key/cert files do not
> exist."
> }
>
> #
> # nscp: Only loads if nscp_user is set (see above).
> #
> if { $nscp_user != "" } {
>
>     if ![string match "127.0.0.1" $nscp_addr] {
>         # Anything but 127.0.0.1 is not recommended.
>         ns_log warning "config.tcl: nscp listening on ${nscp_addr}:${nscp_port}"
>     }
>     ns_param nscp ${bindir}/nscp${ext}
>
> } else {
>     ns_log warning "config.tcl: nscp not loaded -- user/password is not
> set."
> }
>
> ns_log notice "config.tcl: finished reading config file."
>
>
>
>
>
> >From: Dossy <[EMAIL PROTECTED]>
> >Reply-To: AOLserver Discussion <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: [AOLSERVER] Configuring WinNT40 Oracle Driver for
> >AOLServer(Windows)
> >Date: Thu, 12 Apr 2001 21:17:32 -0400
> >
> >Hi,
> >
> >How much do you know about Oracle (particularly, configuring the
> >Oracle Net8 client)?
> >
> >Presuming you configured the Net8 client to connect to your Oracle
> >instance (in other words, you can connect to your Oracle database
> >using something like SQL*Plus) ... setting up the database pool
> >in AOLserver is fairly straightforward.
> >
> >First, in your nsd.tcl, you need to define the database driver:
> >
> >   ns_section "ns/db/drivers"
> >   ns_param ora8    ora8.dll
> >
> >(We're assuming that you placed the ora8.dll in your bin/ directory
> >where the other .dll's live.)
> >
> >Then, you need to define a database pool:
> >
> >   ns_section "ns/db/pools"
> >   ns_param ora_db "Your Oracle Database Pool"
> >
> >Then, you need to define the attributes of the database pool:
> >
> >   ns_section "ns/db/pool/sysmon_db"
> >   ns_param driver       ora8
> >   ns_param connections  4
> >   ns_param user         <insert_username_here>
> >   ns_param password     <insert_password_here>
> >   ns_param datasource   <insert_oracle_sid_here>
> >
> >Don't worry about tuning the "connections" parameter until you
> >have everything working.  Obviously, replace the <insert_..._here>
> >with the appropriate values.
> >
> >Then, you need to define the database settings for the actual
> >webserver instance (assumed to be set to $servername somewhere
> >earlier in your nsd.tcl script):
> >
> >   ns_section "ns/server/${servername}/db"
> >   ns_param defaultpool  ora_db
> >   ns_param pools        *
> >
> >
> >Then, all you have left to do actually create pages that use
> >the ns_db API to interact with the database.
> >
> >- Dossy
> >
> >
> >On 2001.04.12, Ling Wang <[EMAIL PROTECTED]> wrote:
> > > Hi there,
> > >
> > > I installed Windows version of AOLServer from
> > > ftp://ftp.aolserver.com/pub/misc/as32-win32-installer.zip and downloaded
> > > the driver for Oracle8 from
> >http://www.arsdigita.com/acs-repository/oracle-
> > > driver-2.5.tar.gz. I compiled the driver source code without any
> >problem.
> > > But I just could not figure out from the sketchy description in the
> >readme
> > > file and other webpages as to how to configure it (change my nsd.tcl
> >file).
> > > Can anyone who has the experience send me a sample configureation file
> > > (nsd.tcl file) showing exactly what to do to make it my WinNT Oracle8
> >work
> > > with my WinNT AOLServer? I don't know much about UNIX.
> > >
> > > Thanks in advance.
> > >
> > > Ling Wang
> >
> >--
> >Dossy Shiobara                       mail: [EMAIL PROTECTED]
> >Panoptic Computer Network             web: http://www.panoptic.com/
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com

--
Dossy Shiobara                       mail: [EMAIL PROTECTED]
Panoptic Computer Network             web: http://www.panoptic.com/

Reply via email to