in reply to IO::File::new_tmpfile on IIS

Hello, I've just put this code
use IO::File; print "Content-type: text/html\n\n"; print "Go..\n"; my $fh = IO::File->new_tmpfile(); if (defined $fh) { # Do something with the tmpfile print "Defined: $fh\n"; } else { # Do something in memory print "Not defined\n"; }

in my site running IIS 4
and it seems no work.
If I run the code in a command window, the output is what I expect:

Go..
Defined: IO::File=GLOB(0x176f208)

I think is a permissions problem, the user which is executing that .pl is an anonymous user, and it has no permissions except in a couple of directories.
Hope this helps

Hopes

Replies are listed 'Best First'.
Re: Re: IO::File::new_tmpfile on IIS
by earthboundmisfit (Chaplain) on Oct 18, 2001 at 16:43 UTC
    I can corroborate this. IIS will only write to files that reside in or beneath the web root (A-Z:\InetPub\wwwroot\ by default). I've gotten around this problem by creating a temp directory (D:\foo\temp)and making it into a IIS virtual directory (http://localhost/temp/).