[pmwiki-users] Value saved in $_SESSION is inconsistent (Peter & Melodye Bowers)

William Hurford hhurford at llamazone.com
Fri May 2 00:09:34 CDT 2008


Peter-
	I just resolved a similar problem, it may be relevant..
-Session-based scripts worked fine on my development system, but failed 
when migrated to my site host, which is a shared server.
-In general, the cause was 'name collisions', in which a script-variable ( 
defined in a script, not in a function) over-wrote a session variable.
-Specifically, a first script defined $_SESSION['pp']=1;
-A later script defined $pp='init'; which also changed $_SESSION['pp'] from 
1 to 'init' .

The reason was different settings in php.ini.  On my dev system, 
register_globals is Off, the host server has it On.
( see these settings using phpinfo(), in the PHP Core section).

The fix depends on the host, I know of 4 different ways. Contact me if you 
want them. I found useful relevant info at
http://www.sitepoint.com/article/write-secure-scripts-php-4-2/4

	WH



More information about the pmwiki-users mailing list