Bug #61191 [Opn->Fbk]: $_SESSION['abfrage']++
| From: | rasmus@php.net | Date: | Sun, 26 Feb 2012 23:14:46 +0000 |
| Subject: | Bug #61191 [Opn->Fbk]: $_SESSION['abfrage']++ | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167875@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61191&edit=1
ID: 61191
Updated by: rasmus@php.net
Reported by: phismail at web dot de
Summary: $_SESSION['abfrage']++
-Status: Open
+Status: Feedback
Type: Bug
Package: Session related
Operating System: Windows 7 64bit
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
A bit of logging should clear it up. But one way this sometimes happens to people
is when they configure their web server to redirect all 404s to a PHP script and
on each page load the browser tries to load favicon.ico, but if it doesn't exist
this request will trigger the 404 error script which in turn hits the session. So
look for something like that.
Previous Comments:
------------------------------------------------------------------------
[2012-02-26 23:05:50] phismail at web dot de
Description:
------------
---
From manual page: http://www.php.net/reserved.variables.session
---
Everytime I reload my page the SESSION Variable increases by 2 instead of 1. register_globals is
turned off! No changes made in php.ini
Modules mysql and other
PHP Version 3.5.1 (I'm too stupid to update)
I expect:
1. I'm too stupid
2. 64-bit CPU running a 32-bit Programm
3. Script is loaded twice somehow
Test script:
---------------
// First test script in test2.php
session_start();
if(isset($_SESSION['views']))
$_SESSION['views']=$_SESSION['views']+1;
else
$_SESSION['views']=1;
echo "Views=". $_SESSION['views'];
// Second test script in test2.php
session_start();
$_SESSION['views']=$_SESSION['views']+2;
echo "Views=". $_SESSION['views'];
Expected result:
----------------
1 at first load
2 at second load
3 ...
4 ...
2 at first load
4 at second load
8 ...
12 ...
Actual result:
--------------
1 at first load
3 at second load
5 at third load
7 ...
9 ...
2 at first load
6 at second load
10 at third load
14 ...
18 ...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61191&edit=1