ActiveState Perl 5.10 on Windows XP - can't shell!!??

Discussion in 'Perl Misc' started by Perl Junkie, Aug 30, 2010.

  1. Perl Junkie

    Perl Junkie Guest

    Searched high and low on this and have found absolutely nothing. It's
    so bizarre. I've never actually heard of this happening anyway.
    (It's Windows, so there's half of the problem there, IMO...)

    Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for
    seemingly no reason at all (of course none that I know about), I can't
    shell out of Perl. For instance:

    C:\> perl -e "$dir = `dir`; print $dir;"

    Prints nothing. The `dir` doesn't happen. I've tried using qx{} as
    well. I have Cygwin running on my machine and it works fine using
    Cygwin Perl v5.10. But not under ActiveState. I checked with our
    security group and as far as they know, no restrictions are being made
    on system() or shell calls on software on our systems. I tried
    installing/upgrading to AS Perl v5.12 -- the latest -- but still can't
    seem to shell.

    Anyone else run into this? It's so bizarre, I can't even conceive of
    what would be blocking this.

    -pj
    Perl Junkie, Aug 30, 2010
    #1
    1. Advertising

  2. Perl Junkie

    Perl Junkie Guest

    On Aug 30, 3:22 pm, Ben Morrow <> wrote:
    > Quoth Perl Junkie <>:
    >
    >
    >
    >
    >
    > > Searched high and low on this and have found absolutely nothing.  It's
    > > so bizarre.  I've never actually heard of this happening anyway.
    > > (It's Windows, so there's half of the problem there, IMO...)

    >
    > > Running ActiveState Perl v5.10 on Windows XP.  All of a sudden, for
    > > seemingly no reason at all (of course none that I know about), I can't
    > > shell out of Perl.  For instance:

    >
    > > C:\> perl -e "$dir = `dir`; print $dir;"

    >
    > > Prints nothing.  The `dir` doesn't happen.  I've tried using qx{} as
    > > well.  I have Cygwin running on my machine and it works fine using
    > > Cygwin Perl v5.10.  But not under ActiveState.  I checked with our
    > > security group and as far as they know, no restrictions are being made
    > > on system() or shell calls on software on our systems.  I tried
    > > installing/upgrading to AS Perl v5.12 -- the latest -- but still can't
    > > seem to shell.

    >
    > Do you have either COMSPEC or PERL5SHELL set to something weird in the
    > environment? Are you attempting to do any of this from a non-standard
    > terminal emulator (such as 4NT)?
    >
    > What do you get if you run
    >
    >     perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"
    >


    Result is:

    :65280:65280:No such file or directory:The filename or extension is
    too long:

    But $! isn't alwaya reset. I was getting "Bad filename descriptor" at
    one point in time. Interestingly, we used similar delimiters for a
    similar command I also issued. :) Freaky how techs think. :)

    I'm still submarined. (Man, I hate Windows, but there's no choice in
    the matter here.)

    -PJ
    Perl Junkie, Aug 30, 2010
    #2
    1. Advertising

  3. Perl Junkie

    Guest

    On Mon, 30 Aug 2010 12:32:05 -0700 (PDT), Perl Junkie <> wrote:

    >Searched high and low on this and have found absolutely nothing. It's
    >so bizarre. I've never actually heard of this happening anyway.
    >(It's Windows, so there's half of the problem there, IMO...)
    >
    >Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for
    >seemingly no reason at all (of course none that I know about), I can't
    >shell out of Perl. For instance:
    >
    >C:\> perl -e "$dir = `dir`; print $dir;"


    I have no problem running this from my command line.

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    c:\temp>perl -v

    This is perl, v5.10.0 built for MSWin32-x86-multi-thread
    (with 5 registered patches, see perl -V for more detail)

    Copyright 1987-2007, Larry Wall

    Binary build 1004 [287188] provided by ActiveState http://www.ActiveState.com
    Built Sep 3 2008 13:16:37

    Perl may be copied only under the terms of either the Artistic License or the
    GNU General Public License, which may be found in the Perl 5 source kit.

    Complete documentation for Perl, including FAQ lists, should be found on
    this system using "man perl" or "perldoc perl". If you have access to the
    Internet, point your browser at http://www.perl.org/, the Perl Home Page.

    -sln
    , Aug 31, 2010
    #3
  4. Perl Junkie

    Guest

    On Mon, 30 Aug 2010 21:22:53 +0100, Ben Morrow <> wrote:

    >
    >Quoth Perl Junkie <>:
    >> Searched high and low on this and have found absolutely nothing. It's
    >> so bizarre. I've never actually heard of this happening anyway.
    >> (It's Windows, so there's half of the problem there, IMO...)
    >>
    >> Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for
    >> seemingly no reason at all (of course none that I know about), I can't
    >> shell out of Perl. For instance:
    >>
    >> C:\> perl -e "$dir = `dir`; print $dir;"
    >>
    >> Prints nothing. The `dir` doesn't happen. I've tried using qx{} as
    >> well. I have Cygwin running on my machine and it works fine using
    >> Cygwin Perl v5.10. But not under ActiveState. I checked with our
    >> security group and as far as they know, no restrictions are being made
    >> on system() or shell calls on software on our systems. I tried
    >> installing/upgrading to AS Perl v5.12 -- the latest -- but still can't
    >> seem to shell.

    >
    >Do you have either COMSPEC or PERL5SHELL set to something weird in the
    >environment? Are you attempting to do any of this from a non-standard
    >terminal emulator (such as 4NT)?
    >
    >What do you get if you run
    >
    > perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"


    This is not quoted properly

    perl -le "system 'dir'; print \":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:\""

    Even fixed, it just shows the directory, then some junk at the end
    :0::No such file or directory::

    -sln
    , Aug 31, 2010
    #4
  5. On 31.08.2010 00:20, Ben Morrow wrote:
    >
    > Quoth Perl Junkie <>:
    >> On Aug 30, 3:22�pm, Ben Morrow <> wrote:
    >>>
    >>> Do you have either COMSPEC or PERL5SHELL set to something weird in the
    >>> environment? Are you attempting to do any of this from a non-standard
    >>> terminal emulator (such as 4NT)?

    >
    > I presume since you didn't answer that these are all 'no's?


    I agree, this is an important question.

    >>> What do you get if you run
    >>>
    >>> � � perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"

    >>
    >> Result is:
    >>
    >> :65280:65280:No such file or directory:The filename or extension is
    >> too long:

    >
    > Something else you could try: can you start processes with
    > Win32::process? That's a good deal closer to CreateProcess(3), so it
    > might give us some idea of where the problem is. (It also might give an
    > accurate error indication that hasn't been stomped on by some other
    > code.)


    Hm... indeed very strange. As Ben mentioned CreateProcess, another idea
    came to my mind. Is a "Personal Firewall" installed on your machine or
    any other "security" software? If yes, that could be the cause for these
    problems.

    Wolf
    Wolf Behrenhoff, Sep 1, 2010
    #5
  6. Perl Junkie

    Perl Junkie Guest

    On Sep 1, 3:58 am, Wolf Behrenhoff
    <> wrote:
    > On 31.08.2010 00:20, Ben Morrow wrote:
    >
    >
    >
    > > Quoth Perl Junkie <>:
    > >> On Aug 30, 3:22 pm, Ben Morrow <> wrote:

    >
    > >>> Do you have either COMSPEC or PERL5SHELL set to something weird in the
    > >>> environment? Are you attempting to do any of this from a non-standard
    > >>> terminal emulator (such as 4NT)?

    >
    > > I presume since you didn't answer that these are all 'no's?

    >
    > I agree, this is an important question.
    >
    > >>> What do you get if you run

    >
    > >>> perl -le "system 'dir'; print ":$?:${^CHILD_ERROR_NATIVE}:$!:$^E:"


    FYI, I re-quoted this with qq{} first before running. Yes, as it was
    originally submitted, it had quoting issues.

    >
    > >> Result is:

    >
    > >> :65280:65280:No such file or directory:The filename or extension is
    > >> too long:

    >
    > > Something else you could try: can you start processes with
    > > Win32::process? That's a good deal closer to CreateProcess(3), so it
    > > might give us some idea of where the problem is. (It also might give an
    > > accurate error indication that hasn't been stomped on by some other
    > > code.)

    >
    > Hm... indeed very strange. As Ben mentioned CreateProcess, another idea
    > came to my mind. Is a "Personal Firewall" installed on your machine or
    > any other "security" software? If yes, that could be the cause for these
    > problems.


    No firewalls or anything. I'm over here doing the same thing --
    thinking something was installed on my machine... a patch? ...a new
    GPO? ...a new setting in McAfee? I mean, it just STOPPED WORKING and
    it makes NO SENSE.

    The Win32::process idea is a good idea. I'll try that. Otherwise, I
    may have to actually reimage my machine over this. Another notch in
    my "Why I hate Windows" belt...

    -pj
    Perl Junkie, Sep 7, 2010
    #6
    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. Vittorio

    Boxed Perl or ActiveState Perl?

    Vittorio, Apr 1, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    178
    GreenLight
    Apr 2, 2004
  2. Jake Wiley
    Replies:
    14
    Views:
    288
  3. Arvin Portlock
    Replies:
    11
    Views:
    253
    Arvin Portlock
    Jul 4, 2005
  4. doolittle
    Replies:
    3
    Views:
    101
    Brian Helterline
    Oct 27, 2006
  5. Dilbert
    Replies:
    0
    Views:
    831
    Dilbert
    Nov 10, 2011
Loading...

Share This Page