bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /bin/cat: Argument list too long


From: Bob Proulx
Subject: Re: /bin/cat: Argument list too long
Date: Fri, 22 Oct 2004 00:23:00 -0600
User-agent: Mutt/1.5.6+20040907i

Paul Jarc wrote:
> Jeff Chua <jeff93@silk.corp.fedex.com> wrote:
> > The "cat" command is simply ...
> >     cat <<EOF
> >     some text less than 2kBytes
> 
> The size of the input doesn't matter, only the size of the command
> line and environment.  It's odd that the script can start, but cat
> can't.  The shell may be automatically setting some environment
> variables, which would explain it.
>
> > Somehow running under apache, there's less memory left for running
> > shell command.

Apache adds additional variables to the environment.  CGI scripts that
print the environment for debug and education are common if you are
interested in looking at that.  But these additional variables are
probably less than 1k for most implementations.  But if you were very
close to ARG_MAX that would be enough to put you over the edge and
cause this error.

  env | wc -c

I would try that in the script and see what it prints, if you can trim
the environment enough to run.  I am guessing you will find that it is
huge.  Why would it be so big?  What information is being stored
there?  Can it be stored in a file instead?

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]