From:             [EMAIL PROTECTED]
Operating system: Windows XP Professional
PHP version:      4.0.6
PHP Bug Type:     Apache related
Bug description:  Major PHP memory corruption? (with testcase)

Right. This is basically bug 14222 in another guise - I can't see how to
add comments to that bug.

In bug #14222 it shows the type of corruption I've *sometimes* had reports
of seeing with Apache 1.3.20-1.3.22, PHP 4.0.6 on both NT4SP6 and W2KSP2.
Mainly corruption like what was linked to in
http://tugs.imp.ch/index.html.2
but sometimes like this:
http://tugs.imp.ch/index.html.3

And then yesterday I upgraded to Windows XP, and initially I was getting
corruption in parts of a large PHP page. I rebooted, and started getting
(for the first time) the symptom where the page would just keep reloading
and reloading and reloading.

I have a testcase now which causes the problem most of the time on IE6 and
IE5.5 - continual reloading - since the page of this testcase is made up of
HTML comments, I can see various numbers of the point at which HTML loading
failed before restarting - e.g.
<!-- test 1383 -
shown on screen. The bigger the value of count passed to the page, the more
likely it is that this will happen. For me, it happens the majority of the
time for count > 5000. It never happens for low counts.

The script:
<html>
<body>
<?
for ($i = 1; $i < $count; $i++) {
    print ("<!-- test $i -->\n");
}
print "Finished\n";
?>
</body>
</html>

On Mozilla (recent nightly build), it behaves differently - the page cuts
off at a random point (you can see this by doing View Source), but does not
continually reload.

Intrigued by the difference, I did a wget of the script to see what was
actually coming from the webserver. I got the result of
test.php?count=500000
It got to iteration 1547, then it went
<!-[^@]p*[<81><E8>]XT[<80>^@^@^@^@]test[^@<90>^^<81>] -->
and then restarted the count at iteration 214!
(note: the square brackets delimit the reversed colour characters in the
'less' filereader - showing null characters and high-eighth-bit
characters)

It continued up along until iteration 439, then went
<!- --->
and jumped to iteration 1764.
Then at iteration 2409, it printed
<!-- test[^@<F0>]c[<81><E8>]XT<80>^@^@^@^@]-- t[^@<80>]D[<81>]895 -->
and continued on from iteration 896...
etc.
Then we get to 3056, and it goes
<!--[^@]0m[<81><E8>]XT[<80>^@^@^@^@] OK[^M^@^P]}[<81>]e: Wed, 05 Dec 2001
11:26:29 GMT
Server: Apache/1.3.20 (Win32) PHP/4.0.6
etc.
and just started right from the beginning again. It only restarted once in
that run, but my experience with IE suggests that it generally happens more
often.

I don't have a Windows debugger, so think I've given nearly as much
information as I can.

It would be nice if somebody could run the test on 4.0.6, and  test on the
most recent RC of 4.1.0?
(note that while this is extremely reproducible with XP, minor
non-reproducible corruption would often occur with the other NT systems).
-- 
Edit bug report at: http://bugs.php.net/?id=14348&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to