How to get Perlscript in ASP / IIS to execute command line systemcalls

Discussion in 'Perl Misc' started by Jack, Sep 13, 2008.

  1. Jack

    Jack Guest

    Hi folks,

    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");

    Thank you,
    Jack
     
    Jack, Sep 13, 2008
    #1
    1. Advertising

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

    Michael Vilain <> wrote:
    > Jack <> 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
     
    Jürgen Exner, Sep 13, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lucas Cowald
    Replies:
    4
    Views:
    1,071
    Tohid
    Oct 23, 2003
  2. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    246
    Genich
    Oct 22, 2003
  3. Lucas Cowald

    RUN/execute a Command-Line command from an ASP page.

    Lucas Cowald, Oct 22, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    211
    Oliver
    Oct 22, 2003
  4. Eric SALGON

    How to execute a command line in Perlscript

    Eric SALGON, Feb 5, 2004, in forum: Perl Misc
    Replies:
    12
    Views:
    187
    Chris
    Feb 10, 2004
  5. Ed
    Replies:
    8
    Views:
    86
    Eric Pozharski
    Aug 25, 2008
Loading...

Share This Page