ID:               39519
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sw4u at gmx dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: Debian GNU/Linux
 PHP Version:      4.4.4
 New Comment:

This is called "deadlock" and you did it yourself.
Session file is locked, so every apache request will wait for the
previous one to finish before using it.
You're sending a request using the same session ID, while the session
file is locked, so we got the following situation:
- a.php has locked session and is still executing, waiting for file().
- but file() will never end, because b.php is waiting for session to be
unlocked and that won't happen until a.php is finished executing.


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

[2006-11-15 01:48:53] sw4u at gmx dot net

Description:
------------
If you have two seperate scripts with session_start() and you read one
via fopen wrappers Apache webserver freezes.

Tested on
Apache/2.0.54 (Debian GNU/Linux)
Server API Apache 2.0 Handler
--enable-trans-sid
session.auto_start Off
session.bug_compat_42 On
session.name PHPSESSID
session.use_cookies On
session.use_only_cookies Off
session.use_trans_sid Off


Reproduce code:
---------------
script a.php
---
<?php

session_start();
$_SESSION["foo"] = "bar";
echo session_name() ."<br />";
echo session_id() ."<br />";
echo $_SESSION["foo"] ."<br />";

echo implode("", file("http://"; . $_SERVER["HTTP_HOST"] . "/b.php?" .
session_name() . "=" . session_id()));

?>
---

script b.php
---
<?php

session_start();
echo session_name() ."<br />";
echo session_id() ."<br />";
echo $_SESSION["foo"] ."<br />";

?>
---


Expected result:
----------------
PHPSESSID
some_session_id_here
bar
PHPSESSID
same_session_id_here
bar


Actual result:
--------------
Apache freezes, no heavy load, no error message, no logfile entry.


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


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

Reply via email to