HP3000-L Archives

February 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Mon, 28 Feb 2000 16:16:57 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
LaMont wrote:
>
> I am new to POSIX.  I am trying to write a cgi routine that is run by
> APACHE.  This cgi routine needs to open my image database.  However I don't
> know how to tell it where the database is.  If I was running under the CI
> shell, then I would simply do the following:
>
> :file mydatadb=mydatadb.group.acct
> :run mypgm
>
> however when I am in POSIX, I know I can issue the command
>
> Schell-iX>./mypgm
>
> but it doesn't know where to look for my database.
>
> How can I tell it where to look?

In the shell, you can do this:

        callci 'file mydatadb=mydatadb.group.acct'
        ./mypgm

But the problem with this approach in an Apache CGI environment is that :FILE
commands have job/session scope, i.e. all web requests currently executing will
be sharing the same pool of :FILE commands because Apache is just a single job
with multiple children.  Unless you're very careful and have a controlled CGI
application mix, you can get into trouble doing this when one CGI decides to
do:

        file mydatadb=mydatadb.somewhere.else

It's far safer to have your CGI programs open fully qualified file/database
names that don't rely on file equations.

- Mark B.

ATOM RSS1 RSS2