php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18118 Crashes when declaring a function with global $HTTP_SESSION_VARS, $_SESSION
Submitted: 2002-07-02 18:00 UTC Modified: 2002-07-02 20:14 UTC
From: awoywood at entelchile dot net Assigned:
Status: Closed Package: Session related
PHP Version: 4.1.2 OS: SUSE 6.4
Private report: No CVE-ID: None
 [2002-07-02 18:00 UTC] awoywood at entelchile dot net
PHP crashes with the following code:

<?
function a () {
        global $HTTP_SESSION_VARS, $_SESSION;
        return true;
}
session_start();
$tmp=a(); //dies here
echo "Got here";
?>

If you take the "$_SESSION" out of the global statement, it runs without problem.

I'm using PHP 4.1.2 (default php.ini), SUSE 6.4 and Apache/1.3.23

Alejandro.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-02 18:16 UTC] awoywood at entelchile dot net
I just tried the same in PHP 4.1.2 in Win2000 (build 2195) and executed without problem. The problem it's only in the linux version.
 [2002-07-02 20:14 UTC] sniper@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 03:01:32 2024 UTC