From: sup1382 at accedo dot es Operating system: OpenBSD 3.9 PHP version: 5.2.0 PHP Bug Type: Session related Bug description: Session variables overwritten by local variables (register_globals=off)
Description: ------------ Session variables are being overwritten by local variables with everything (that I've checked) set as default, register_globals=off, bug_compat_42=off, etc. In my workstation (Fedora Core 5), I get the correct output. (Surprisingly first time I execute the script in the OpenBSD box I get the correct output. Then always the buggie one). This are the options used in 'configure': --with-apxs=/usr/sbin/apxs --without-mysql --enable-xml --enable-wddx --enable-cli --with-gettext=/usr/local/base/ --enable-dio --with-pear=/usr/share/pear --enable-bcmath --enable-session --enable-trans-sid --enable-calendar --enable-ctype --enable-ftp --with-pcre-regex --with-posix --enable-sockets --enable-sysvsem --enable-sysvshm --enable-yp --enable-exif --without-sqlite (Copied from the OpenBSD ports, the same problem applies also to the packaged version in OpenBSD 3.9, PHP 5.05, I've recompiled and tested with 5.2 to check if the problem continues, and it does). Reproduce code: --------------- <?php session_start(); $_SESSION["test"] = "test"; $test = null; print("<br>Local var test: '".$test."'"); print("<br>Session var test: '".$_SESSION["test"]."'"); ?> Expected result: ---------------- Local var test: '' Session var test: 'test' Actual result: -------------- Local var test: '' Session var test: '' -- Edit bug report at http://bugs.php.net/?id=39833&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39833&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39833&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39833&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39833&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39833&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39833&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39833&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39833&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39833&r=support Expected behavior: http://bugs.php.net/fix.php?id=39833&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39833&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39833&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39833&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39833&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39833&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39833&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39833&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39833&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39833&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39833&r=mysqlcfg