Re: pipe_loop: too many headers
Michiel Boland <[email protected]> Sun, 6 Oct 2002 00:18:47 +0200 (CEST)
| Newsgroups | gmane.network.mathopd |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 4 Oct 2002 [email protected] wrote: > Hi, > > Does anyone have an idea why I get this error when trying to use > php 4.2.3 under OpenBSD with mathopd 1.4 / phpstub-0.5? > > Fri Oct 4 18:51:13 2002 [28715] pipe_loop: too many headers One way to check what is going on is to run a patched version of phpstub that dumps its input whenever this condition occurs. I have attached one such patch. There are two possible causes for this error. Either the php program emits so many CGI headers that it overflows phpstub's internal buffer size (not likely) or the php program simply does not emit any CGI headers at all, which is illegal. If you run the patched version and then inspect the ChildLog it will become apparent which of the two it is. Cheers Michiel
pipe-patch.txt
(text/plain, 470 B)
Index: pipe_loop.c
===================================================================
RCS file: /home/boland/cvs/repository/phpstub/pipe_loop.c,v
retrieving revision 1.23
diff -u -r1.23 pipe_loop.c
--- pipe_loop.c 1 Nov 2001 00:14:27 -0000 1.23
+++ pipe_loop.c 5 Oct 2002 22:05:05 -0000
@@ -274,6 +274,7 @@
}
} else if (p->pstart == p->psize) {
stub_log("pipe_loop: too many headers");
+ write(2, p->pbuf, p->pstart);
return 1;
}
}