ID: 15999
Comment by: ghazban at gmail dot com
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:
The mentioned problem is probably caused because PHP opens the session
file in a exclusive, which denies other threads to open the same file.
// Starts session and opens session file in exclusive mode
session_start();
// And here is the important thing. You need to close the session file,
before calling in second thread, which will access the same session
file.
session_write_close();
// read http page into string
$html = implode("",
file("http://localhost/backend.php?".session_name()."=".session_id()."&SESSION_NAME=".session_name());
// Start again the session
session_start();
Previous Comments:
------------------------------------------------------------------------
[2008-02-06 10:21:53] juergen dot link at freenet dot de
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.
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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