ID:               26494
 User updated by:  hexer at studentcenter dot org
 Reported By:      hexer at studentcenter dot org
-Status:           Feedback
+Status:           Open
 Bug Type:         Apache related
 Operating System: *
 PHP Version:      4CVS, 5CVS (2005-01-25)
 New Comment:

http://www.studentcenter.org/mod_php4.patch

let me know if you have any questions or need anything else


Previous Comments:
------------------------------------------------------------------------

[2005-02-03 04:13:07] [EMAIL PROTECTED]

Can you provide that patch somewhere in the web and paste the url here?
Also, please make the patch unified diff (diff -u).


------------------------------------------------------------------------

[2005-01-27 23:24:33] hexer at studentcenter dot org

Ok I tried it, same results. It's the problem in mod_php4.c
also just as a side note, our php is compiled-in to apache.

------------------------------------------------------------------------

[2005-01-25 15:25:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Always try the snapshot first..


------------------------------------------------------------------------

[2005-01-11 21:50:43] hexer at studentcenter dot org

Ok here is a more detailed step-by-step on how to reproduce:

Use php 4.3.10 compiled-in with Apache 1.3.33

1. Compile Apache 1.3 with php-4.3.10 compiled-in:

In source tree:
./configure --prefix=/usr/local/apache

In PHP source tree:
./configure --with-mysql \
--with-xml \
--with-apache=../apache_1.3.33 \
--enable-track-vars \
--with-gd \
--enable-discard-path \
--enable-bcmath \
--enable-gd-native-tt \
--with-freetype-dir=/usr/local \
--with-png-dir=/usr/local \
--with-jpeg-dir=/usr/local \
--with-zlib=/usr/local

make
make install

In Apache source tree:
./configure \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=php4 \
--enable-module=rewrite \
--enable-module=so \
--prefix=/usr/local/apache

make
make install


2. Edit httpd.conf and 
make sure you have the following enabled in httpd.conf:

TimeOut 60

AddModule mod_status.c

ExtendedStatus On

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Allow from all
</Location>



3. Create the test output script (test.php):

<?php
for($i = 0; $i < 1000000; $i++) {
        echo "XXXXXXXXXXXXXXXXXXXXXXXX<br>\n";
}
?>


4. On a different computer, open the browser and point it to
test.php, as soon as test.php starts loading unplug the
computer from the network, before it finishes loading.
This one's important. You have to make a true dead connection without
the server knowing about it.
Make sure your network does not notify the server immediately that the
connection was closed or there is a broken pipe etc.
(by default the Linux recv has a very long timeout)


5. Check the server-status page. You will see something like this:

0-1 4990 0/177/15106 W  0.45 9 0 0.0 0.19 43.85  x.x.x.x
your.server.com GET /test.php

Note the 'W' under status in that particular process.

6. You will see the SS value start going way beyond the timeout
setting. This _must_ happen unless the system has somehow managed to
find out that the connection is broken.

If the process is not in W status and 60 seconds have not passed that
means the system somehow found out that the connection is broken so the
dead-connection
condition hasn't been simulated.


Also another good experiment would be to see if the TimeOut overrides
max_execution_time. 
If in your scenario TimeOut does in fact work, it probably overrides
the max_execution_time and causes the script to abort if it runs longer
than TimeOut seconds.

------------------------------------------------------------------------

[2005-01-11 20:28:39] [EMAIL PROTECTED]

I haven't been able to reproduce this either even with MySQL enabled.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26494

-- 
Edit this bug report at http://bugs.php.net/?id=26494&edit=1

Reply via email to