ID: 15999
Updated by: yohgaki@php.net
Reported By: didier.alain@laposte.net
-Status: Open
+Status: Feedback
Bug Type: Session related
Operating System: Linux
PHP Version: 4.1.0
New Comment:
What is the name of the script you have pasted?
What is the content of block.html?
It seems you are not calling the same script, but
if block.html is calling the script pasted, it's
the same.
Previous Comments:
------------------------------------------------------------------------
[2002-03-11 13:28:19] sniper@php.net
Ok..let's reopen this. I have no idea what you're doing
but if you're not doing what I thought you were, it might
be a bug..although that auto_prepend thing makes me wonder..
Please add some example scripts and what needs to be set
in php.ini / httpd.conf to reproduce this.
------------------------------------------------------------------------
[2002-03-11 12:38:04] didier.alain@laposte.net
Why do you think that block.html is the same script ? Maybe my example
is not very clear. But you are right, Apache behavior looks like
infinite recursion. Let me explain again and more precisly :
the script A (the one in the previous post) tries to open the url B
($url). Script C is auto_prepended (at fread instruction, right ?) and
validate the access to the script B, with the session variable. If I
don't use the PHPSESSID in the url parameter (and skip the test in the
script C), the script is OK. If I use another parameter than PHPSESSID,
the script A is OK. Same behavior with fgets, readfile, etc... Note
that the script C is auto_prepended only in a subdirectory (containing
only docs like B) by apache configuration (<Directory ...> php_value
....</Directory>) and of course scripts A and C are not on this
directory.
------------------------------------------------------------------------
[2002-03-11 11:17:55] sniper@php.net
You're calling the same script with that fopen() ?
The behaviour is called 'infinite recursion' and yes,
it will hang.
Not a bug.
--Jani
------------------------------------------------------------------------
[2002-03-11 10:48:52] didier.alain@laposte.net
<?php
$url = "http://test/block.html?PHPSESSID=".session_id();
$fp = fopen($url, 'r'); // the file pointer semms to be valid
$file = fread($fp,1048576); //hangs here !
echo $file;
?>
hangs apache (1.3.x). Same with 4.0.2, 4.0.6 Linux (RH 6.2 and Debian
2.2), never on Win98. Other parameters don't have the same effect.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15999&edit=1