PHP session data is not saved just

PHP session data is stored only once, cannot be updated!

Please help me that the sessions are stored, but there is no way to update the session data:

Consider the following code example:

<?php

session_start();


header("Cache-control: private");


   $_SESSION['counter']++;

   echo $_SESSION['counter'];

   session_write_close();

?>

When called for the first time, a session file is created C: \ Window \ Temp \ sess_fs3r6tfmoc2tpv9ggnv8542ib2 containing the correct data: counter|i:1; and session_cookie is also set containing the samesessionID:fs3r6tfmoc2tpv9ggnv8542ib2

When I started it again, the counter did not increase! The file \ Temp \ sess_fs3r6tfmoc2tpv9ggnv8542ib2 is not updated. However, SessionID is correct.

Please help, it seems to me a configuration problem.

I Use: 
PHP Version 5.3.10
Windows 7
Microsoft-IIS/7.5
with Zend Extension     220090626 

Session Setting were all default:
Session Support     enabled
Registered save handlers     files user
Registered serializer handlers     php php_binary wddx

Directive    Local Value    Master Value
session.auto_start    Off    Off
session.bug_compat_42    Off    Off
session.bug_compat_warn    Off    Off
session.cache_expire    180    180
session.cache_limiter    nocache    nocache
session.cookie_domain    no value    no value
session.cookie_httponly    Off    Off
session.cookie_lifetime    0    0
session.cookie_path    /    /
session.cookie_secure    Off    Off
session.entropy_file    no value    no value
session.entropy_length    0    0
session.gc_divisor    1000    1000
session.gc_maxlifetime    1440    1440
session.gc_probability    1    1
session.hash_bits_per_character    5    5
session.hash_function    0    0
session.name    PHPSESSID    PHPSESSID
session.referer_check    no value    no value
session.save_handler    files    files
session.save_path    C:\Windows\Temp    C:\Windows\Temp
session.serialize_handler    php    php
session.use_cookies    On    On
session.use_only_cookies    On    On
session.use_trans_sid    0    0
+1
source share
1 answer

session_write_close() @http://www.php.net/manual/en/function.session-write-close.php#107945

" session_write_close PHP- Ajax: " " , !"

;)

+2

All Articles