ID: 14834
Updated by: yohgaki
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Analyzed
Bug Type: Session related
Operating System: Debian 3.0 (Woody)
PHP Version: 4.1.0
New Comment:

Confirmed with 4.2.0-dev (2002/1/7). It does segfault with my linux
also.

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

[2002-01-03 18:07:36] [EMAIL PROTECTED]

The following script always produces a segmentation fault on verison
4.1.0:  

<?
session_start();
$bar = foo($HTTP_SESSION_VARS);

function foo() {
        global $HTTP_SESSION_VARS;
        return true;
}
?>
<h1>Test is complete</h1>

The problem goes away if you remove the session array as a parameter to
the foo() function (which is not expecting any parameters anyway).  The
problem also goes away if you remove the "global" declaration inside the
foo() function.  No errors or warning are generated when the function
call occurs.  

Granted, this code snippet looks very odd (why would anyone want to pass
HTTP_SESSION_VARS, for example), but was the quickest (least lines of
code) way to set up the conditions that will always force the error. 
The problem also occurs if you try to pass the new _SESSION array and
still reference the older HTTP_SESSION_VARS in the function.

Reigster_globals is off.  Error_level is set to E_ALL.  Apache version
is 1.3.22-5.




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



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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to