Tags:
create new tag
, view all tags

Question

I had a really wierd problem with my webserver setting the cwd for the scripts to the root directory of the webserver instead of the directory of the script. This ruins everything.

Below I show what I have added to the scripts to hopefully make this work.

  • TWiki version: Sept 2001
  • Web server: IIS5.0 (but I suspect with an II3.0 compatibility mode)
  • Server OS: Windows 2000 Advanced Server
  • Web browser: IE 5.0
  • Client OS: Any

-- MartinCleaver - 04 Oct 2001

Answer

Insert this in every file in /bin immediately after the #! perl line:

BEGIN{($_=$0)=~s!(.*)[\\/][^\\/]+$!!;chdir $1}

For what it does, see http://www.rcbowen.com/imho/perl_cwd_iis.html I modified it to make it work in taint mode.

-- MartinCleaver - 04 Oct 2001

Please rename this to Bizarre ... (Also, surely I should be able to rename my own topic, especially if no-one has made changes!!)


Category: TWikiPatches
Topic attachments
I Attachment Action Size Date Who Comment
htmlhtm cwdunderPerlonIIS.htm manage 7.4 K 04 Oct 2003 - 21:41 MartinCleaver  
Topic revision: r5 - 04 Oct 2003 - 21:41:03 - MartinCleaver
Support.BizarreIis5CurrentWorkingDirectoryProblem moved from Support.BizzareIis5CurrentWorkingDirectoryProblem on 01 Nov 2001 - 17:38 by PeterThoeny - put it back
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback