ID:               28080
 Updated by:       [EMAIL PROTECTED]
 Reported By:      revealator at myrealbox dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: Windows98
 PHP Version:      4.3.4
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is perfectly normal.


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

[2004-04-20 18:51:35] revealator at myrealbox dot com

Description:
------------
The constant SID is not defined if a session is started with
$_SESSION['bla'] = 'dummy'.

So you have to call session_start to get the SID constant.

But a call to session_start will kill a session that was already
started with $_SESSION['bla'] ='dummy'.

Reproduce code:
---------------
// register globals is off
error_reporting(E_NOTICE);
$_SESSION['dummy'] = 'started';
echo '<pre>';
echo "session data before call to session_start:\n";
print_r($_SESSION);

echo "SID is defined before call to session_start? "  . (defined('SID')
== true?'yes':'no');
echo "\n";

session_start();
echo "SID is defined after call to session start? "  . (defined('SID')
== true?'yes':'no');
echo "\n";

echo "session data after call to session_start:\n";
print_r($_SESSION);
exit;


Expected result:
----------------
SID should be defined when a session is started with $_SESSION and
session_start should handle the call to itself as if it was called
twice when $_SESSION is used.

Actual result:
--------------
session data before call to session_start:
Array
(
    [dummy] => started
)
SID is defined before call to session_start? no
SID is defined after call to session start? yes
session data after call to session_start:
Array
(
)




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


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

Reply via email to