#28465 [NEW]: Session variables not being kept with include_once()

From: Date: Fri, 21 May 2004 01:43:52 +0000
Subject: #28465 [NEW]: Session variables not being kept with include_once()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59823@lists.php.net to get a copy of this message
From: dave at faf dot co dot nz Operating system: linux PHP version: 4.3.4 PHP Bug Type: Session related Bug description: Session variables not being kept with include_once() Description: ------------ When i use an include/require to load a success page ( in this case, the list the "add" was called from ) the session variables are not present. I have session_start() on each page, and if i call the pages directly ( from a menu ) the sessions remain. This happends every time i do this. I dont know if its a bug, but i have to control over the webserver as its a web hosting plan. Reproduce code: --------------- <?php session_start(); if (isset($_POST['submit']) { //do saveing stuff $OK = true; } if ($OK) { //display form, submit button at bottom //page calls itself, or rather, blank action } else { require_once('list.php'); } Expected result: ---------------- the original listing come back up, with the new addition. Actual result: -------------- the frame/table for the expected result, empty due to session vars not relaying the clientid or any other for that matter. -- Edit bug report at http://bugs.php.net/?id=28465&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28465&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28465&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28465&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28465&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28465&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28465&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28465&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28465&r=support Expected behavior: http://bugs.php.net/fix.php?id=28465&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28465&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28465&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28465&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28465&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28465&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28465&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28465&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28465&r=float

« previous php.bugs (#59823) next »