From: [EMAIL PROTECTED]
Operating system: Linux Gnu 2.2.12
PHP version: 4.1.2
PHP Bug Type: Session related
Bug description: Session data not updated on page jump
Several pages that worked in PHP 4.0.2 no longer work in 4.1.2. The problem
is that values added to a global session variable array just before
jumping to another page are not being stored.
For example, on page courses.php the user selects a course from a list.
The code for the course is stored in a session variable $S[event_code],
and the code pagejumps (by calling a library routine that calls header())
to page course.php, to display data for that particular course. The
problem is, the value $S[event_code] no longer exists when we get to the
second page (course.php).
I can see the value in $S[event_code] if I var_dump($S) before the
pagejump in courses.php. If I var_dump($S) just after arriving in page
course.php, I see the other contents of the $S array but not
$S[event_code].
Array $S is global and each page begins with
session_register("S");
The update takes place within a function that declares $S as global.
If I replace
$S[event_code] = $event_code;
with
$_SESSION[S][event_code] = $event_code;
the value is passed.
PHP options enable_track_vars and register_globals are ON,
session.save_handler is files, session.serialize_handler is php.
Thank you.
--
Edit bug report at http://bugs.php.net/?id=15909&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15909&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15909&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15909&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15909&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15909&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15909&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15909&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15909&r=submittedtwice