You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@organic.com> on 1995/05/26 09:06:35 UTC

cwdir a part of CGI spec?

Even though this is just related to CGI I thought I'd post it here.  This 
morning an issue came up where a bunch of scripts I had written for a 
client failed to work, the reason being that NCSA and Apache do a cwdir 
to the script's directory before launching the script, while NetSite 
doesn't.  Thus, if I have one Perl script that "requires" another and 
references it locally (just like the way HTML files can point to each 
other locally), it'll work on Apache and NCSA but not on Netsite.  I.e.:

In directory /path/scripts/ I have

common.pl
script.cgi

where common.pl is a perl file that sets config information and/or has 
common subroutines for the other scripts to use.  I should be able to say

require "./common.pl"

in script.cgi.  With NetSite (and I'm sorry to single it out, Rob, I'm 
sure others have this problem) I'd have to explicitly state

require "/path/scripts/common.pl"

which suddenly make my scripts a lot less portable.  


Should doing a cwdir to a script's directory be a part of the CGI spec?

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  brian@hyperreal.com  http://www.[hyperreal,organic].com/