The first three things to note: 1) CHDIR to C: works, CHDIR to UNC paths (//server/what/the/file) cannot and will not. *Map a drive* or use it as a path (ie, direct all commands to '$directories/stuff'.
2) Make sure the user running APACHE as a user, and not 'local system', and make sure that user has access to the mapped drive. (local system generally has less network permission than guest, except where the share has been enabled to NULL session access). (http://support.microsoft.com/default.aspx?scid=kb;en-us;289655) 3) You are using CGI::Carp but not CGI, and you are not printing headers. What exactly is the error you are getting? -----Original Message----- From: Renger van Nieuwkoop [mailto:[EMAIL PROTECTED] Sent: Wednesday, 18 February 2004 12:48 AM To: [EMAIL PROTECTED] Subject: Chdir doesn't work under Apache? Hi I have a simple script that runs fine from the command line, but gives me an error when I run it using Apache 2.0: #!perl -w use CGI::Carp qw(fatalsToBrowser); use File::Find; # get a network directory my $directories = qw(//server/Web/database/EDV); chdir("$directories") || die "cannot open current directory : $!\n"; If I use a local directory like in: my $directories = qw(C:/); the script runs fine under Apache and from the command line. What am I doing wrong? Thanks for any help. Renger PS I use Perl 5.8, Apache 2 and Windows 2000.s _________________________________________________ ECOPLAN Forschung und Beratung in Wirtschaft und Politik Economic Research and Policy Consultancy Thunstrasse 22 / CH-3005 Berne (Switzerland) Phone: +41 31 356 61 61 / Fax: +41 31 356 61 60 mailto:[EMAIL PROTECTED] / http://www.ecoplan.ch> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>