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