ID:               15999
 Comment by:       juergen dot link at freenet dot de
 Reported By:      didier dot alain at laposte dot net
 Status:           No Feedback
 Bug Type:         Session related
 Operating System: Linux
 PHP Version:      4.1.0, 4.0.6
 New Comment:

I came across the same issue - the answer is pretty simple.
PHP does not support parallel requests with the same session id, i.e.
the session ids serves as mutex for the requests.
Thus, triggering a http request to a session <X> from within another
request to this very session will lead to a timeout for this request.
After the first request is finished, the second one will come to a happy
end, too. You may observe this in your web server's log.


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

[2004-05-08 02:12:47] jcgonz at innox dot com dot mx

I have exactly the same problem. I try to send PHPSESSID=session_id()
and apache hangs up; when I change PHPSESSID from the url string, it
works perfectly (Obviously this doesn't work because I need to know in
the target script what session are we talking about).

Does anyone has a solution for this? Thanks in advance!

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

[2002-08-12 01:00:12] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

[2002-07-11 00:40:20] [EMAIL PROTECTED]

Your scripts will never work since the session data
will be available AFTER the script is run.

What are you trying to achieve? Can't you just use include()
as the files are on same machine???


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

[2002-06-01 11:56:54] didier dot alain at laposte dot net

$doc="http://myserver/docs/mydoc.html?PHPSESSID=".session_id();
It was a type mismatch, of course, sorry.

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

[2002-06-01 11:51:18] didier dot alain at laposte dot net

Sorry for the long time...

Here's a complete but simple example :

-------------
In httpd.conf
-------------
<Directory "/var/www/docs/">
  php_value auto_prepend_file "block.php"
</Directory>

(block.php is in my php.ini include_path, and /var/www is my Apache
DocumentRoot)

------------
open_doc.php   (<--I call this one with my browser)
------------
<?php
  session_register("s_util");
  $s_util = toto";
  session_start();
  echo "Session Id :".session_id(); //just to be sure...
  $doc =
"http://http://myserver/docs/mydoc.html?PHPSESSID=".session_id();
  readfile($doc); //same with $fp=fopen($doc, "r");
?>

---------
block.php
---------
<?php
  session_start();
  echo "Session Id :".session_id(); //just to be sure...
  if (session_is_registered("s_util"))
  {
     echo "Right, man !";
  }
  else
  {
     echo "No auth!";
  }
?>

I can't see any infinite loop here, but I may be wrong... Whenever you
don't pass the session param in the url anymore,   there's "no problem"
anymore, except you can't retrieve session values !

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

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/15999

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

Reply via email to