iis - PHP Session variable not saving (though some are) -


i have been unable figure out problem - doesn't make sense.

the server php 5.2.6 running on windows nt pdp-iis 5.2 build 3790.

first have confirmed sessions working via test script:

<?php  session_start();  if (!isset($_session['counter'])) $_session['counter']=0; echo "counter ".$_session['counter']++.".<br><a href=".$_server['php_self'].">reload</a>";  ?> 

the counter increments - works.

my site using custom built mvc framework (i wrote it), , put last code of app function testing purposes:

echo session_id(); echo '<pre>'; var_dump($_session); echo '</pre>'; session_write_close(); exit(); 

the first few lines of file are:

<?php error_reporting(e_all); ini_set('display_errors', '1'); session_start(); 

the session dumps , looks expected. go server , open session file - , result appears depend on browser i'm using. chrome , safari, session file empty. opera , ie8 session file looked fine. i'll firefox in minute - @ point firefox appeared fine.

so testing purposes following session_start() added following lines:

$_session['bogus'] = -5; $_session['test'] = 'other'; 

i closed browsers , tried site again sure had new session. again opera , ie8 session files appeared fine. both chrome , safari had 'bogus' , 'test' values, other session value missing. firefox @ first had same problem chrome , safari @ point - upon refreshing page, rest of session showed up. refreshing did not chrome or safari.

here var_dump looks @ point:

array(3) {   ["bogus"]=>   int(-5)   ["test"]=>   string(5) "other"   ["saved_form"]=>   array(1) {     ["dgvsjm"]=>     array(4) {       ["method"]=>       string(4) "post"       ["processor"]=>       string(0) ""       ["formid"]=>       string(10) "searchform"       ["fields"]=>       array(2) {         ["searchterm"]=>         array(5) {           ["label"]=>           string(10) "searchterm"           ["type"]=>           string(6) "search"           ["required"]=>           bool(false)           ["multiple"]=>           bool(false)           ["selectempty"]=>           string(6) "b5bmxw"         }         ["forminput_0"]=>         array(5) {           ["label"]=>           string(0) ""           ["type"]=>           string(6) "submit"           ["required"]=>           bool(false)           ["multiple"]=>           bool(false)           ["selectempty"]=>           string(6) "tkzufo"         }       }     }   } } 

i created different website different subdomain, , copied code on - , works fine 'saved_form' shows in session files. tried deleting original website , recreating - didn't problem.

anyone know going on and/or how can fix it?

thanks.

i believe have solved issue.

after application processes 'saved_form' key - on every run - removes security reasons.

i using rewrite module nicer links (module iirf).

this problem - though no fault of module, rules.

after page rendered , session saved - browser made request favicon.ico, rules setup caused request run through app , form processed , removed session - causing odd behavior seeing. added rule ignore it, , working again.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -