From:             [EMAIL PROTECTED]
Operating system: win 2000 pro
PHP version:      4.1.2
PHP Bug Type:     Session related
Bug description:  session variables not getting set

Setup: win2k pro, apache-win 1.3.23, php 4.1.2 (sapi)

Session variables set using this method

    $_SESSION['quux'] = 'foo'

don't get set. Using session_register() works though. This is the case
with _both_ CGI and SAPI versions

I verified this by opening up the session file in an editor. It is created
but not written to in the first case, and *is* written to when using
session_register().

I tried toggling register_globals, changing location of session file
directory, making sure it had correct access permissions, trying the CGI,
restarting apache, tweaking the session cookie parameters, explicitly
calling session_write_close(). None of these worked.

Rolling back to php 4.1.1 solved the problem.

Here's a script to reproduce the problem:

----- file test1.php -----
<?php
    session_start();
    $_SESSION["roy"] = "haynes";
    header("location: ./test2.php");
?>

----- file test2.php -----
<?php
    session_start();

    //
    // displays empty array
    //
    var_dump($_SESSION);
?>
-- 
Edit bug report at http://bugs.php.net/?id=16202&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16202&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16202&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16202&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16202&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16202&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16202&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16202&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16202&r=submittedtwice

Reply via email to