Re: How to get Perlscript in ASP / IIS to execute command line system calls
- From: "Thrill5" <nospam@xxxxxxxxxxxxx>
- Date: Sat, 13 Sep 2008 21:25:54 -0400
"Jürgen Exner" <jurgenex@xxxxxxxxxxx> wrote in message
news:p8bnc41g9gubailn0s2daa0okvfaegtseb@xxxxxxxxxx
Michael Vilain <vilain@xxxxxxxxxxxxx> wrote:
Jack <jack_posemsky@xxxxxxxxx> wrote:
These system calls work find in the .pl world, but in IIS when
Perlscript is running inside of an ASP webpage, nothing happens. I
changed the folder properties under IIS to give "script source access"
and added "write" permissions, but still it doesnt seem to work.. any
ideas out there ?
$syscall0 = "move e:\\tmp\\file1.jpg e:\\file1.jpg ";
system("$syscall0");
Is there a "shell" environment on XP? I don't count the DOS "shell".
That is of course your choice. Perl however doesn't let prejudices get
in the way and works with the DOS command interpreter without problems.
You might want to try a UNIX-compatible environment like Cygwin. But my
guess is you're out of luck. You'll have to rethink this code for the
XP environment.
BS. As the OP said himself explicitely:
"These system calls work find in the .pl world"
Obviously there is no problem with perl calling DOS commands via
system().
He should rethink this code because there is no good reason to shell out
an action for which there is a perfectly fine Perl command. Why not use
rename() in the first place?
However I have a hunch that that won't help him either because the
problem seems to be related to IIS/ASP rather then to Perl on XP. As the
mantra says:
<quote from "My CGI script runs from the command line but not the
browser.">
If you can demonstrate that you've read the following FAQs
and
that your problem isn't something simple that can be easily
answered, you'll probably receive a courteous and useful
reply
to your question if you post it on
comp.infosystems.www.authoring.cgi (if it's something to do
with
HTTP, HTML, or the CGI protocols). Questions that appear to
be
Perl questions but are really CGI ones that are posted to
comp.lang.perl.misc may not be so well received.
</quote>
jue
ASP (and IIS) are "locked down" for security purposes. ASP under IIS is
usually run using the security context "ASPNET" and does not have access to
your "system32" directory where "cmd.exe" is located. Perl programs run
under ASP therefore can't execute any "shell" commands because it can't
locate or load a command processor. As previous poster said, you should
direct your question to an IIS newsgroup and
"microsoft.public.inetserver.iis" would be a good place to start.
.
- References:
- Prev by Date: Re: Minimal path
- Next by Date: Re: Minimal path
- Previous by thread: Re: How to get Perlscript in ASP / IIS to execute command line system calls
- Next by thread: FAQ 9.21 How do I use MIME to make an attachment to a mail message?
- Index(es):
Relevant Pages
|