Edit report at https://bugs.php.net/bug.php?id=61191&edit=1

 ID:                 61191
 User updated by:    phismail at web dot de
 Reported by:        phismail at web dot de
 Summary:            $_SESSION['abfrage']++
 Status:             Closed
 Type:               Bug
 Package:            Session related
 Operating System:   Windows 7 64bit
 PHP Version:        5.3.10
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

Solution: Deactivate Firebug in Firefox! -- Thx a lot


Previous Comments:
------------------------------------------------------------------------
[2012-02-27 14:48:55] phismail at web dot de

Your right! The script is loaded twice.

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"

It seems to be a Firefox problem. The page is loaded twice at the same time. 
I.e. IE: 

::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:19:25 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
8 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 
Firefox/10.0.2"
::1 - - [27/Feb/2012:15:22:46 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:22:47 +0100] "GET /favicon.ico HTTP/1.1" 200 1406 "-" 
"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; 
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 
6.0; .NET4.0C; .NET4.0E)"
::1 - - [27/Feb/2012:15:23:14 +0100] "GET /taxilearn/training.php HTTP/1.1" 200 
7 "-" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; 
SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center 
PC 6.0; .NET4.0C; .NET4.0E)"

i never thought about that...sorry!

------------------------------------------------------------------------
[2012-02-26 23:14:45] ras...@php.net

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.

------------------------------------------------------------------------
[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

Reply via email to