Bug #68869 [NEW]: Require and Include Files with Variables Doesn't Update Global Value on Refresh

From: Date: Wed, 21 Jan 2015 03:49:47 +0000
Subject: Bug #68869 [NEW]: Require and Include Files with Variables Doesn't Update Global Value on Refresh
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190093@lists.php.net to get a copy of this message
From: own3mall at gmail dot com Operating system: Ubuntu 14.04 PHP version: 5.6.4 Package: Streams related Bug Type: Bug Bug description:Require and Include Files with Variables Doesn't Update Global Value on Refresh Description: ------------ Basically, if a redirect is sent such as header("Location: page.php"); to the client or the page is refreshed by the client, a variable being loaded through a require statement does not always update in the global scope. The global variable's value is set to the old value even though the file the variable is loaded from has changed. The old value remains until the page is refreshed again after a wait period. I was able to reproduce this issue on PHP 5.5.9 and PHP 5.6.4. Here's a video which explains and shows what is going on: https://www.youtube.com/watch?v=xVLMdgnXfww&feature=youtu.be The source to the script shown in the video can be downloaded here: http://dinofly.com/files/linux/bugs/php5.5.x_refresh_bug.tar.gz I was not able to reproduce this issue on a php 5.3.x virtual machine running Ubuntu 12.04. Basically, I'm not sure when this bug was introduced, but I know it doesn't happen on older versions of php. Test script: --------------- http://dinofly.com/files/linux/bugs/php5.5.x_refresh_bug.tar.gz Expected result: ---------------- Global variable value should be updated on each page refresh or load to what is defined in the file that is required. Actual result: -------------- Global variable sometimes updates correctly when the page is refreshed but other times is not if refreshed quickly. It needs to be consistent. -- Edit bug report at https://bugs.php.net/bug.php?id=68869&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68869&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68869&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68869&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68869&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68869&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68869&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68869&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68869&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68869&r=support Expected behavior: https://bugs.php.net/fix.php?id=68869&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68869&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68869&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68869&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68869&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68869&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68869&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68869&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68869&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68869&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68869&r=mysqlcfg

« previous php.bugs (#190093) next »