> Hello,
>
> I am trying to open a file that are maped in my computer with the leter
> "G:\". I only want to open the file and while read it write the line in
> variable "$_". It's a simple action but Perl die and tell me some error
> about my permision and that directory here are the code:
>
> use CGI qw(:satndard);
> use CGI::Carp qw(fatalsToBrowser);
> use strict;
>
> my $archive = "G:/dir1/dir2/dir3" . param("archive");
>
> print header;
> open FH, "$archive" or die "Error in open:$!\n";
> while(<FH>)
> {
> print $_;
> }
> close(FH);
>
> I am accesing the script with Apache Web Server locally in my computer so,
> the addres is http://localhost/cgi-bin/scriptname.pl but Perls tells me
> this:
>
> "Permision Denied";
>
> then i try to open the archive with the UPC address like
> \\NT_SOMETHINGHERE\DIR1\DIR2\ARCHIVE and its Perl complaying with:
>
> "Invalid Argument"
>
> I go to my prompt in DOS and I can access the drive "G:\" and view the
> archives. My firends tell me that this is a permision problem but I can
> access the archive in DOS why I can by the browser(Web Server). I try in
> PWS personal server from Microsoft and I have the same errors. I spend a
> lot of our searching the web for an answer for this errors and I don't
> find anything. The only thing tha t I find is this in the DBD::ODBC
> documentation:
>
> For file based drivers, rather than client server drivers, the file path
> is VERY important. There are a few things to keep in mind. This applies
> to, for example, MS Access databases.
> 1) If the file is on an NTFS partition, check to make sure that the Web
> service user has permissions to access that file.
> 2) If the file is on a remote computer, check to make sure the Web service
> user has permissions to access the file.
> 3) If the file is on a remote computer, try using a UNC path the file,
> rather than a X:\ notation. This can be VERY important as services don't
> quite get the same access permissions to the mapped drive letters and,
> more importantly, the drive letters themselves are GLOBAL to the machine.
> That means that if the service tries to access Z:, the Z: it gets can
> depend upon the user who is logged into the machine at the time. (I've
> tested this while I was developing a service -- it's ugly and worth
> avoiding at all costs).
> Unfortunately, the Access ODBC driver that I have does not allow one to
> specify the UNC path, only the X:\ notation. There is at least one way
> around that. The simplest is probably to use Regedit and go to (assuming
> it's a system DSN, of course) HKEY_LOCAL_USERS\SOFTWARE\ODBC\"YOUR DSN"
> You will see a few settings which are typically driver specific. The
> important value to change for the Access driver, for example, is the DBQ
> value. That's actually the file name of the Access database.
>
> If someone can help I will apreciate a lot!!!
>
> P.S. Sorry with my english
>
>
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web