Re: How to get Perlscript in ASP / IIS to execute command line system calls



"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.


.



Relevant Pages

  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... we will be introducing the ability to configure IIS to run under ... and under the 32bit command line no error is thrown. ... the problem must be to do with how the dll is registered. ... > You should be able to reproduce your situation outside of ASP by creating ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... and under the 32bit command line no error is thrown. ... The dll is not in the System32 diectory. ... > to do with IIS or COM registration weirdness involving WOW64. ... > your ASP page. ...
    (microsoft.public.inetserver.iis)
  • I need a way to uninstall IIS 7 (and ASP) under WOW64
    ... more luck under this forum, since ASP is involved, somewhat, in my problem. ... In a Web server installer that I'm maintaining, we keep track of whether or ... value is there and no other Web sites are using IIS on that machine, ... The following is the command that we launch in order to remove IIS 7 and ASP ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: HTTP 405: The HTTP verb used to access this page is not allowed
    ... considered static by IIS. ... It has nothing to do with Perl - no idea how you ... I presume your small form POSTs to a small .ASP page. ... installing a perl CGI script interpreter. ...
    (microsoft.public.inetserver.iis.security)
  • re: Chilisoft and Includes
    ... >> Although I am used to working in IIS, I am currently developing a site ... >> timestamp of the page is updated. ... >> cached the page because the ASP doc itself hasn't changed. ... You need a command line on the box and then you simply issue the command ...
    (comp.sys.sun.misc)