#28308 [NEW]: Zero length session files in /tmp

From: Date: Fri, 07 May 2004 00:13:40 +0000
Subject: #28308 [NEW]: Zero length session files in /tmp
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-59334@lists.php.net to get a copy of this message
From: lee dot stewart at attglobal dot net Operating system: SuSE SLES8 on IBM mainframe PHP version: 4.3.4 PHP Bug Type: Session related Bug description: Zero length session files in /tmp Description: ------------ Hi... I have a script that runs on other platforms, but I can't get it to work on this platform. (I suspect it's not a PHP code bug, but haven't been able to find a problem in the setup or anything I've done.) The problem is that PHP creates a sess... file in /tmp (which is global read/write/execute), but the file ALWAYS has zero bytes, which of course means the next screen fails becuase it can't get it's assumed data... The code below is a truly trivial test case which fails. The test case also fails the same way with the new style session support. (The full application is quite large and it's not reasonable to go convert the entire application to the new style.) The code does the same with or without a session_write_close() call. The "real" code runs on a PHP 4.3.4 system that's not net accessible. But the code fails the same on a similar (SuSE SLES8 on and IBM mainframe with PHP 4.2.2) system that is web accessible. You can run the test for yourself at www.sytek-services.com/page1.php. And you can also see the PHP Info page for that system at www.sytek-services.com/phpinfo.php. Like I said, I suspect it's something in the setup, but I've not been able to find out what... Thanks for any help or pointers... Lee Stewart Reproduce code: --------------- page1.php: <? session_start(); $test='foobar'; session_register('test'); $test='fooey'; header('Location: page2.php'); ?> page2.php: <? session_start(); echo "test is $test<br>"; ?> Expected result: ---------------- test is fooey Actual result: -------------- test is -- Edit bug report at http://bugs.php.net/?id=28308&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28308&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28308&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28308&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28308&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28308&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28308&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28308&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28308&r=support Expected behavior: http://bugs.php.net/fix.php?id=28308&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28308&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28308&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28308&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28308&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28308&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28308&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28308&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28308&r=float

« previous php.bugs (#59334) next »