#22526 [Fbk->Opn]: session_start/popen hang
| From: | iberry at raxnet dot net | Date: | Tue, 04 Mar 2003 21:46:20 +0000 |
| Subject: | #22526 [Fbk->Opn]: session_start/popen hang | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34803@lists.php.net to get a copy of this message | ||
ID: 22526
User updated by: iberry at raxnet dot net
Reported By: iberry at raxnet dot net
-Status: Feedback
+Status: Open
Bug Type: Session related
Operating System: Windows 2000
PHP Version: 4.3.0
New Comment:
I tried the latest CVS version with the same negative results. I then
tried to duplicate the bug using the CGI/CLI binary with no luck (could
not produce the sufficent code). After this however, I switched Apache
from SAPI to CGI and the problem went away.
So for now, we can assume that the problem is related to PHP's SAPI
support.
Were you able to reproduce this under a SAPI environment?
-Ian
Previous Comments:
------------------------------------------------------------------------
[2003-03-04 10:29:31] iliaa@php.net
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
If the problem persists, see if the bug can be replicated using the CLI
or CGI sapi.
------------------------------------------------------------------------
[2003-03-03 17:55:33] iberry at raxnet dot net
I think I have found some sort of race-like condition using
session_start() and popen() functions, causing the web server to hang.
The bug only seems to manifest when repeatedly initiating a page that
requires session_start() and uses popen(). This is relevant for me
because this page renders graphs and needs both of these functions to
perform its job. Here is some example code to re-produce the problem:
----test.php----
<img src="img.php?rra_id=1">
<img src="img.php?rra_id=2">
<img src="img.php?rra_id=3">
<img src="img.php?rra_id=4">
----end----
----img.php----
<?php
session_start();
$fp = popen('test', "r");
print fpassthru($fp);
pclose($fp);
?>
----end----
Notice how I am passing different GET variables to each image page
session, this seems to be necessary for the bug to manifest. This code
has been tested on both IIS 5 and Apache 2.0.44 with the same results
The path I give popen() does not appear to make a difference. I have
also have tried the popen 'r' and 'rb' file modes, which made no
difference. The two triggers of this bug appear to be the combined use
of session_start()/popen() and the varying GET variable values.
Thanks for taking time to look into this.
-Ian
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22526&edit=1