Something I have implemented in 1.2 is that upon CGI execution, the server
changes its working directory to the directory of the currently executing
script. This would allow you to keep your config files in a subdirectory of
the script's directory, if you wanted, but the problem with that is that
people might be able to read them (I have also implemented CGI execution in
non-ScriptAlias directories). Someone mentioned making SCRIPT_TRANSLATED
available, in this setup, a script could get its real name from pwd and
SCRIPT_NAME or argv[0]. However, the spec. does not require the working
directory to be anything on script execution.
One idea I have found interesting is the idea of making some kind of
configuration directory available. Something like CGI_CONFIG which would be
set to a central location of CGI configuration files may be nice, but then
people will all have to have write access to this directory. So I'm not sure
if this would help much either. This could be set to SERVER_ROOT/conf for
NCSA httpd, or just allow users to configure it. The point would be to
create a central repository for CGI config. files which would be available
on any server.
--Rob