httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject cwdir a part of CGI spec?
Date Fri, 26 May 1995 07:06:35 GMT

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

where 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 "./"

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/"

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?


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

View raw message