#23405 [Opn->Bgs]: fopen() fails when SessionID is added as GET-Param
| From: | wez@php.net | Date: | Tue, 29 Apr 2003 14:01:20 +0000 |
| Subject: | #23405 [Opn->Bgs]: fopen() fails when SessionID is added as GET-Param | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-38712@lists.php.net to get a copy of this message | ||
ID: 23405
Updated by: wez@php.net
Reported By: helmut dot chang at tuivelsminne dot at
-Status: Open
+Status: Bogus
-Bug Type: HTTP related
+Bug Type: Session related
Operating System: SuSE Linux 8.0
PHP Version: 4.3.2RC2
New Comment:
If both your local script and the remote script are running on the same
machine and are using the files session module, you need to be aware
that the session file is locked for the duration of the session;
You are encountering a classic deadlock here because the first script
holds the lock while the second attempts to acquire it. Since the
first can't release the lock until it has finished, and it can't finish
until the second has acquired the lock, you get the timeout message.
Why don't you include() a local file? It is *much* more resource
efficient and is not subject to these issues.
I'm marking this as bogus, as it is the expected behaviour.
(Changing it will break sessions for everybody).
Previous Comments:
------------------------------------------------------------------------
[2003-04-29 07:59:44] helmut dot chang at tuivelsminne dot at
Using Apache 1.3.27 with mod_ssl and mod_php4 as DSO, fopen() fails
when adding SessionID as GET-Parameter:
test1.php:
<?php
session_start();
$fp =
fopen('http://domain.tld/test2.php?'.session_name().'='.session_id(),
'r');
?>
test2.php:
<?php
session_start();
?>
Calling 'test1.php' makes the server busy for the max_execution_time
and then producing the message:
Warning:
fopen(http://cmit.dev.is-it-on.at/test2.php?PHPSESSID=d438afbea1645cab6e557bd7cb396165):
failed to open stream: HTTP request failed! main:443 for SSL protocol L
library ound (st in /daten/www-data/cmIT/htdocs/test.php on line 4
The part between 'HTTP request failed!' and 'in /daten/...' changes
each time, sometimes producing somewhat looking like binary data.
Changing test1.php to:
$fp = fopen('http://domain.tld/test2.php', 'r');
doesn't cause any problems. The same, when using other GET-Params:
$fp = fopen('http://domain.tld/test2.php?test=TRUE',
'r');
works also.
I just compiled a new PHP, using the latest Snapshot, after reading the
Bugreports #19051, #22937, #20759,..., but it seems to me, the problem
is not exact the same:
fopen works ALWAYS with 'normal' HTTP-URLs and NEVER works when adding
the SessionID.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23405&edit=1