Re: session_register() - Netscape workaround?

From: Date: Sat, 05 May 2001 13:06:13 +0000
Subject: Re: session_register() - Netscape workaround?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-51526@lists.php.net to get a copy of this message
Jennifer wrote: > I thought of a workaraound for Netscape and would like some > feedback on how to do it and whether it is a good idea. > > I manually edited the session file and Netscape was able to read > the variable on subsequent pages. It just can't seem to write > it. > > So I thought, until Netscape 4.x is more of a gonner, I could > have my own custom_session_register() function that can open the > file and write the info manually. > > 2 questions. > 1) Is there some reason that this would be a bad idea? I would still really like to know this answer. > 2) What is the format of the file? My file contents are > testing|s:24:"Let's see if this works."; I think I figured this out. variable_name|variable_type*:length*:value*; *variable_type is the first letter of the type *length can be diferent things depending on the variable type. I've only tried a few, but here is what I have gathered thus far. If type is string, then length is the length of the value, pretty simple. If type is integer then there is no length and it is skipped altogether rather than being left blank. If type is array, then length is the number of elements. *value can also vary depending on type. If type is string, then it is simply the value quoted, if the type is integer then it is simply the value. If type is array, then each element of the array is described by type and length etc. After trying a few, it's not too difficult to see the pattern. Jennifer

« previous php.general (#51526) next »