|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-06-19 23:56 UTC] andrei at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
I'm using Apache 1.3.12/Windows 98/PHP 4.0 release without Zend optimizer. Session variables do not retain their values between page accesses when track_vars = On and register_globals = Off in php.ini. If track_vars is turned off OR register_globals is turned on, sessions work correctly. Here's a sample script: <? session_start(); session_register('counter'); $counter++; echo "<p>You've been here $counter times.</p>"; ?> If track_vars = On and register_globals = Off, the script displays "You've been here 1 times" each time it is run. It appears that the session data file (sess_*) that corresponds with the current session is not written to or read from. If track_vars = Off and register_globals = On, (or if track_vars = On and register_globals = On) the script runs correctly and displays increments the counter each time it is run. Workaround: Make sure that register_globals is turned on in php.ini.