|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-01-21 04:20 UTC] requinix@php.net
-Status: Open
+Status: Feedback
[2015-01-21 04:20 UTC] requinix@php.net
[2015-01-21 04:55 UTC] own3mall at gmail dot com
-Status: Feedback
+Status: Open
[2015-01-21 04:55 UTC] own3mall at gmail dot com
[2015-01-21 05:09 UTC] rasmus@php.net
[2015-01-21 06:38 UTC] own3mall at gmail dot com
[2015-01-21 08:22 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2015-01-21 08:22 UTC] rasmus@php.net
[2015-01-22 00:25 UTC] own3mall at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 07:00:02 2025 UTC |
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.