Ariel,
Thanks a lot for the help. It is still not working. I got my AOLServer from
ftp://ftp.aolserver.com/pub/misc/as32-win32-installer.zip. I got the driver
from both you and
http://www.arsdigita.com/acs-repository/oracle-driver-2.5.tar.gz.
AOLServer works fine both oracle8 driver just does not work at all. There is
very little documentation. I strongly doubt anyone one in the world ever
made it work. I believe it works for Linux or Unix. Not WinNT. I tried your
binary and tried compiled version and even tried the ALOServer source file
from http://www.arsdigita.com/acs-repository.
I still can not make the driver work.
Here is my directory structure:
<AOLSERVER_DIR>
|
-->nsd.tcl
--->./bin
|
---->nsd.exe
---->ora8.dll
|
--->./log
--->./servers
|
---->acs
---->server1
|
---->modules
---->pages
The web pages are in the aolserver\servers\server1\pages directory.
When I run nsd.exe -ft ..\nsd.tcl, I have no errors provided the line:
ns_section ns/server/${servername}/db
with the line:
ns_section ns/server/gsdev/db
And the program does not write anything to the server.log file. If I use
ns_section ns/server/${servername}/db, I will get an error saying:
"Error: dbinit: no such default pool 'main', fail to load ora8.dll".
I have absolutely no clue at all why this is so. The following again is the
nsd.tcl. Again, I don't have any error as long as I use
ns_section ns/server/gsdev/db. But in any event, when I run a test adp file
with a single line ns_db gethandle or ns_db gethandle main. The AOLServer
complains by saying ns_db is not enabled.
Can you guess what has gone wrong?
Thanks a lot.
Ling Wang
# $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 256000
#ns_param stacksize [expr 128*1024] ;# Per-thread stack size.
set home [file dirname [ns_info config]]
set bin [file dirname [info nameofexecutable]]
# Setting the following should get you going.
set server acs
set httpport 8000
set oracleuser "scott"
set oraclepassword "tiger"
set sroot servers/$server
foreach d [list log servers $sroot $sroot/modules $sroot/pages] {
if ![file exists $home/$d] {
file mkdir $home/$d
}
}
# Oracle8 driver
ns_section ns/db/drivers
ns_param ora8 ora8.dll
ns_section ns/db/pool/main
ns_param driver ora8
ns_param connections 2
ns_param user $oracleuser
ns_param datasource "ora0"
ns_param password $oraclepassword
ns_param verbose off
ns_section ns/db/pool/subquery
ns_param driver ora8
ns_param connections 2
ns_param user $oracleuser
ns_param datasource "ora0"
ns_param password $oraclepassword
ns_param verbose off
ns_section ns/db/pool/log
ns_param driver ora8
ns_param connections 2
ns_param user $oracleuser
ns_param datasource "ora0"
ns_param password $oraclepassword
ns_param verbose off
ns_section ns/db/pools
ns_param main main
ns_param subquery subquery
ns_param log log
#
# 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
#ns_section ns/server/gsdev/db
ns_section ns/server/${servername}/db
ns_param pools *
ns_param DefaultPool main
#
# 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.
#
# 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: "Ariel E. Carn�" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Subject: Re: Re: [AOLSERVER] Help on Oracle8 driver for WinNT needed
>Date: Wed, 18 Apr 2001 09:30:00 -0300
>
>Hi Ling!
>I don't know from where are you running the command "nsd -ft <script.tcl>"
>but in the common schema the directory tree is as follow:
><AOLSERVER_DIR>
>|
>--->./bin
> |
> ---->nsd.exe
> ---->ora8.dll
>|
>--->./log
>--->./servers
>--->./nsd-startup.tcl
>
>then from <AOLSERVER_DIR> is commonly to run "./bin/nsd -ft
>nsd-startup.tcl"
>
>After run, check the log file (./log/server.log) to see if the Oracle
>Driver
>(ora8.dll) load correctly.
>If all this is ok, add a section like this:
>
>ns_section "ns/server/${servername}/db"
>ns_param Pools *
>ns_param DefaultPool main
>
>ns_param Pools * # It's indicating
>all the pools defined previously.
>ns_param DefaultPool main # It's indicating the
>default pool.
>
>When you use a "set db [ns_db gethandle]", this sentence take a handle from
>the default pool, if you like use another database you have to specify the
>pool desired.
>g.e.: set db [ns_db gethandle ib6]
>
>
>See you!
>
>@riel.
>
>_________________________
>Ariel Carn�
>Buenos Aires - ARGENTINA
>e-mail: [EMAIL PROTECTED]
>
>
>----- Original Message -----
>From: "Ling Wang" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, April 17, 2001 11:54 PM
>Subject: Re: [AOLSERVER] Help on Oracle8 driver for WinNT needed
>
>
> > Thanks a lot for the hint and I got through the loading stage and I did
>not
> > see any error message now. Then I started to run a simple adp file
> > (test.adp) as shown in the following:
> >
> >
> > <HTML>
> > <HEAD><TITLE>Test</TITLE></HEAD>
> > <BODY>
> > <H1>Test</H1>
> > <%
> > set db [ns_db gethandle]
> > %>
> > </BODY></HTML>
> >
> > I got the "Test" displayed which means the AOLServer is working.
>However,
> > when I look at the command prompt, AOLServer says the command ns_db is
>not
> > enabled. As I understand, once the driver is loaded, I should be able to
>do
> > the above.
> >
> > Anyone one has any suggestions as to what was the problem?
> >
> > I have made progress from tons of error to no errors when I run
>nsd.exe -ft
> > nsd.tcl. The following is the right nsd.tcl for running "nsd.exe -ft
> > 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 256000
> > #ns_param stacksize [expr 128*1024] ;# Per-thread stack size.
> > set home [file dirname [ns_info config]]
> > set bin [file dirname [info nameofexecutable]]
> >
> > # Setting the following should get you going.
> > set server acs
> > set httpport 8000
> > set oracleuser "scott"
> > set oraclepassword "tiger"
> > set sroot servers/$server
> >
> > foreach d [list log servers $sroot $sroot/modules $sroot/pages] {
> > if ![file exists $home/$d] {
> > file mkdir $home/$d
> > }
> > }
> >
> > # Oracle8 driver
> > ns_section ns/db/drivers
> > ns_param ora8 ora8.dll
> >
> > ns_section ns/db/pool/main
> > ns_param driver ora8
> > ns_param connections 2
> > ns_param user $oracleuser
> > ns_param datasource "ora0"
> > ns_param password $oraclepassword
> > ns_param verbose off
> >
> > ns_section ns/db/pool/subquery
> > ns_param driver ora8
> > ns_param connections 2
> > ns_param user $oracleuser
> > ns_param datasource "ora0"
> > ns_param password $oraclepassword
> > ns_param verbose off
> >
> > ns_section ns/db/pool/log
> > ns_param driver ora8
> > ns_param connections 2
> > ns_param user $oracleuser
> > ns_param datasource "ora0"
> > ns_param password $oraclepassword
> > ns_param verbose off
> >
> > ns_section ns/db/pools
> > ns_param main main
> > ns_param subquery subquery
> > ns_param log log
> >
> >
> > #
> > # 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
> >
> > ns_section ns/server/gsdev/db
> > ns_param pools *
> > ns_param DefaultPool main
> >
> > #
> > # 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.
> >
> > #
> > # 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: Rob Mayoff <[EMAIL PROTECTED]>
> > >Reply-To: AOLserver Discussion <[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: [AOLSERVER] Help on Oracle8 driver for WinNT needed
> > >Date: Tue, 17 Apr 2001 04:51:09 -0500
> > >
> > > > The very first problem I have is that when nsd.exe try to load the
> > >driver,
> > > > it looks for the function called Ns_ModuleInit in the ora8.dll. This
> > > > function does not exist in the ora8.dll. As a matter of fact, all
>other
> > >dlls
> > > > in the bin directory have this function, for example, nsd.dll,
>nscp.dll
> > >etc.
> > > > I looked through the source code and found only Ns_DbDriverInit.
> > >
> > >ora8.dll does not have Ns_ModuleInit. It is not supposed to.
> > >Ns_ModuleInit is for loadable modules. ora8.dll is not a loadable
> > >module. It is a database driver.
> > >
> > >You are loading the driver incorrectly. You are listing it in the
> > >ns/server/server1/modules section of your config file instead of in the
> > >ns/db/drivers section.
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com