FWIW - this turned out to be an APR problem on OS/2 in network_io/sendrecv.c
On Thu, 3 Aug 2006 02:27:45 UTC, "Paul Smedley" <[EMAIL PROTECTED]> wrote: > Hi Guys, > > I'm maintaining OS/2 versions of Apache2 and PHP5. They work nicely, > except for some issues in modphp which I've thus far been unable to > root cause. > > Last night I made some progress in diagnosing the problems. > > I got a testcase testbuffer.php as follows: > <?php > $infile = "block.htm"; > $fh = fopen($infile,"r"); > $buff = fread($fh,65536); > fclose($infile); > echo $buff; > ?> > > block.html is a file containing htm code that is ~70k in size. > > Using cgi php this works fine - but with modphp, all I get in the > browser is a page with a 0 as the only character rendered. > > If 65535 is used in place of 65536 it works fine. It seems something > has a problem at 64k. > > Tracing through some code, the difference between the working and > non-working example is that in the non-working example, ap_rwrite > fails here: > if (r->connection->aborted) > return -1; > > The initial ap_rwrite is called with length 65536 and returns a valid > success return code. > > Does anyone have any ideas on what could be causing this? > > PHP and Apache2 built with the EMX compiler (gcc 2.8.1) don't have > this problem, I'm using a newer GCC 3.3.5. I've compared apr.h and > apu.h and there are no significant differences in #defines between gcc > 2.8.1 & 3.3.5 that I would think could explain this behaviour :( > > Any ideas are appreciated! -- Cheers, Paul.
