SPUG:-e filecheck on windows web app

Dan Ebert mathin at mathin.com
Thu May 22 09:23:15 CDT 2003


Maybe a dumb suggestion, but could it be file permissions?  (i.e. the
script doesn't have permission to see the file when run by the web
server, but does when run by you.)

Dan.

On Wed, 2003-05-21 at 16:04, John Subaykan wrote:
> I have copies of the same CGI script on two machines on my network.  This 
> script, somewhere along the line, checks the existence of a file or 
> directory on a third machine on the same network:
> 
> if (-e "//Machine3/path/to/file)
> 
> when this script is runs on //Machine1, (as it has been running until now) 
> the file is found, and the test evaluates to true.
> 
> on //Machine2 (where this CGI will now reside), this test finds no such 
> file.
> 
> the pathname is hard-coded as a UNC path, but other tests in the same script 
> (or one of its modules) test filenames stored in variables:
> 
> if (-e $myFile)
> 
> these all fail on //Machine2
> 
> But when I run a simple command line test on //Machine2 like this:
> 
> if (-e "//Machine3/bla/bla) {
>   print "it exists";
> } else {
>   print "no it doesn't";
> }
> 
> 
> ... from the command line, this script tells me that the file exists.  A web 
> app running on the same machine tells me otherwise.
> 
> Has anyone run into this problem before?  (both //Machine1 and //Machine2 
> are Windows 2000 running IIS 5)
> 
> Thanks,
> 
> John
> 
> _________________________________________________________________
> The new MSN 8: advanced junk mail protection and 2 months FREE*  
> http://join.msn.com/?page=features/junkmail
> 
> _____________________________________________________________
> Seattle Perl Users Group Mailing List  
> POST TO: spug-list at mail.pm.org
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, U-District, Seattle WA
> WEB PAGE: www.seattleperl.org
> 



More information about the spug-list mailing list