Re: File::Find problem on windows+apache+activePerl
- From: "Koolrans" <koolrans@xxxxxxxxx>
- Date: 27 Feb 2006 13:12:07 -0800
Thanks for the reply. I did try the FAQ.
Who are you thanking? What reply? What FAQ?
My bad. Being my first time, I used reply instead of options->reply. So
the reply only made it to the author.
Are you checking all your file I/O operations for errors? Are you
dying on errors? Are you including the operating system's last error
variable ($!) in those die messages?
It's time for you to show some code.
Here is how I use the function.
@src_dir = "\\\\testnetwork\\filesToBeUploaded\\linux"
print "@src_dir";
find(\&processFiles, "@src_dir") or die ("Can't fetch information from
the find command: $! $@\n");
This works fine from commandline and gives an error when run from
apache. The print is successful and I can see the desired value in the
browser. The following error is logged into the log.
[Mon Feb 27 13:06:02 2006] [error] [client 10.2.20.109] Can't stat
\\\\testnetwork\\filesToBeUploaded\\linux: No such file or directory,
referer: http://test2-2k/Test/
[Mon Feb 27 13:06:02 2006] [error] [client 10.2.20.109] at
commonFuncs.pl line 29, referer: http://test2-2k/Test/
[Mon Feb 27 13:06:02 2006] [error] [client 10.2.20.109] Use of
uninitialized value in concatenation (.) or string at commonFuncs.pl
line 29., referer: http://test2/Test/
[Mon Feb 27 13:06:02 2006] [error] [client 10.2.20.109] Can't fetch
information from the find command: No such file or directory , referer:
http://test2-2k/Test/
As evident, it is an escape character issue but am new to perl. So do
not have an idea.
Can somebody tell me how to fix this.
Thanks,
Koolrans
Paul Lalli wrote:
Koolrans wrote:
Thanks for the reply. I did try the FAQ.
Who are you thanking? What reply? What FAQ?
Please quote an appropriate amount of context when posting a reply to
Usenet.
It is different in my error in
the sense that I do not get any 500 or server side errors. In my
script, the script does work but the file::find does not find any list
of files when called from browser.
I find those two sentences contradictory. Just because your errors are
not compile-time errors does not mean you are not getting errors.
The fact remains that your script "works" on the command line but does
not "work" when executed from the browser.
90% of the time, this is due to permissions problems. Whatever user
you're running as from the command line has certain permissions to the
directory structure that the user that the webserver is executing the
CGI as does not have.
Are you checking all your file I/O operations for errors? Are you
dying on errors? Are you including the operating system's last error
variable ($!) in those die messages?
It's time for you to show some code.
BTW, you should probably read the Posting Guidelines for this group
before posting again.
Paul Lalli
.
- Follow-Ups:
- Re: File::Find problem on windows+apache+activePerl
- From: Jürgen Exner
- Re: File::Find problem on windows+apache+activePerl
- From: A. Sinan Unur
- Re: File::Find problem on windows+apache+activePerl
- References:
- File::Find problem on windows+apache+activePerl
- From: Koolrans
- Re: File::Find problem on windows+apache+activePerl
- From: Jürgen Exner
- Re: File::Find problem on windows+apache+activePerl
- From: Koolrans
- Re: File::Find problem on windows+apache+activePerl
- From: Paul Lalli
- File::Find problem on windows+apache+activePerl
- Prev by Date: Re: Parsing/sorting big file problem
- Next by Date: Convert a string into array of characters
- Previous by thread: Re: File::Find problem on windows+apache+activePerl
- Next by thread: Re: File::Find problem on windows+apache+activePerl
- Index(es):