On Wed, 28 Nov 2001, Hans de Groot wrote:

> Hi,
>
> I have Embperl working nicely on NT4 together with apache and
> mysql. (and sessions :-) )
>
> I have one thing I don't understand how to solv.
>
> Under linux I use releative paths (like open
> F,"<../data/paswordfile"  and I open this from
> htdocs/index.html) My server root is C:\apache and my
> document root is d:\servers\www.mywebsite.nl The file failed
> to open and I than I did a test like (print F,">../dummy")
> and after I search my pc for that file it was in C:\ so this
> means (I think) that perl on win32 things it should always
> read file from the serverroot?

I'm not sure if this is the cause, but there was a change in
Win32 Apache a few versions ago that sets some defaults to use
the path to Apache.exe so that people could double-click on the
Apache.exe icon and it would start OK.

> Is there a way to change this? it would be very anying I have
> to change all my paths to absolute paths every time I update
> my pages on linux and want to do the same in the NT version.

I'm not sure about Embperl, but in a cgi environment sometimes
relative paths like '../' can fail, even on Unix. You could use
the FindBin module to locate the directory of your script, and
then specify the path relative to that, as in
'/path/to/script/..'.

best regards,
randy kobes


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to