On Thu, Dec 04, 2003 at 02:40:59AM -0500, Jeff Gordon wrote:
> I had SqWebMail 3.6.2 up and running on a new server, yesterday.
> 
> Then I moved a busy mostly-CGI site to the new server -- and now
> SqWebMail won't go.  It reports (consistently):
> 
> "The webmail system is temporarily unavailable.  An error occured in
> function CGI: CGI environment exceeds allowed maximum size."
> 
> Uh, whose "maximum size"?  Is this a system variable I don't know
> about, or a new Apache 2.0 config setting-related maximum, or...?

Use the source, Luke:

$ cd sqwebmail-3.6.2/
$ find . -type f | xargs grep -n "CGI environment exceeds"
./sqwebmail/sqwebmaild.c:122:                       err("CGI", "CGI environment 
exceeds allowed "

Looking in the function in which that line appears, the maximum size of the
environment is SOCKENVIRONLEN minus a few bytes (6 or 10), which in turn is
4096 bytes.

$ find . -type f | xargs grep -n SOCKENVIRONLEN
./sqwebmail/sqwebmaild.c:103:   char buf[SOCKENVIRONLEN];
./sqwebmail/sqwebmail.c:2407:   static char buf[SOCKENVIRONLEN];
./sqwebmail/sqwebmail.h:37:#define SOCKENVIRONLEN 4096

So it seems you have some *huge* environment set up at the time when you
start Apache (and Apache is propagating it all to the CGI, which I didn't
think it would, but then I don't use 2.0)

If I were you, I'd go to the command line where you start Apache, and type
"set" to see what is in your environment. I'd then try flushing out as much
as possible (e.g. using 'su -l' or 'env -i', at least those are available
under FreeBSD) and *then* stopping and starting Apache.

Regards,

Brian.

Reply via email to