Ask a Question related to PERL Beginners, Design and Development.
-
David #1
RE: Chdir doesn't work under Apache?
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:ch]
Sent: Wednesday, 18 February 2004 12:48 AM
To: org
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:ch
/ http://www.ecoplan.ch>
--
To unsubscribe, e-mail: org
For additional commands, e-mail: org
<http://learn.perl.org/> <http://learn.perl.org/first-response>
David Guest
-
#39953 [Opn->Fbk]: chdir(..) not working in open_basedir where chdir(../) does !
ID: 39953 Updated by: tony2001@php.net Reported By: zend at oliwel dot de -Status: Open +Status: ... -
#39953 [NEW]: chdir(..) not working in open_basedir where chdir(../) does !
From: zend at oliwel dot de Operating system: Linux PHP version: 5.2.0 PHP Bug Type: Directory function related Bug... -
#38820 [NEW]: chdir(".") and chdir("..") don't work with Apache 2.0+
From: ras at fyn dot dk Operating system: Win XP SP2 PHP version: 5.1.6 PHP Bug Type: Directory function related Bug... -
Getting Apache 2.x to work with Coldfusion MX 7
I have windows 2003 server and I'm running apache 2.x and coldfusion MX 7 full CD. I used to mess around with coldfusion 6.1 trail version, and... -
APACHE/PHP - buttons don't work
Hi, I've recently upgraded my webserver for apache 2.0.47 with php 4.3.2 on a solaris 9 box My problem is... the buttons on the php pages... -
Renger #2
AW: Chdir doesn't work under Apache?
Thanks so much, David
Apache was running as 'local system' and now runs with the appropriate user
(never knew that you could run Apache in these different ways..)
The script now runs fine.
Renger
-----Ursprungliche Nachricht-----
Von: David le Blanc [mailto:com.au]
Gesendet: Dienstag, 17. Februar 2004 15:33
An: ch
Cc: org
Betreff: RE: Chdir doesn't work under Apache?
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:ch]
Sent: Wednesday, 18 February 2004 12:48 AM
To: org
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:ch
/ http://www.ecoplan.ch>
--
To unsubscribe, e-mail: org
For additional commands, e-mail: org
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Renger Guest



Reply With Quote

