Subject: | |
From: | |
Reply To: | |
Date: | Mon, 28 Feb 2000 16:16:57 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
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.
|
|
|