SESSIONHANDLERINTERFACE.READ(3) 1 SESSIONHANDLERINTERFACE.READ(3)SessionHandlerInterface::read - Read session data
SYNOPSIS
abstractpublic string SessionHandlerInterface::read (string $session_id)
DESCRIPTION
Reads the session data from the session storage, and returns the results. Called right after the session starts or when session_start(3)
is called. Please note that before this method is called SessionHandlerInterface.open(3) is invoked.
This method is called by PHP itself when the session is started. This method should retrieve the session data from storage by the session
ID provided. The string returned by this method must be in the same serialized format as when originally passed to the SessionHandlerInter-
face.write(3) If the record was not found, return an empty string.
The data returned by this method will be decoded internally by PHP using the unserialization method specified in session.serialize_han-
dler. The resultig data will be used to populate the $_SESSION superglobal.
Note that the serialization scheme is not the same as unserialize(3) and can be accessed by session_decode(3).
PARAMETERS
o $session_id
- The session id.
RETURN VALUES
Returns an encoded string of the read data. If nothing was read, it must return an empty string. Note this value is returned internally to
PHP for processing.
SEE ALSO
The session.serialize_handler configuration directive. .
PHP Documentation Group SESSIONHANDLERINTERFACE.READ(3)
Check Out this Related Man Page
SESSION_REGENERATE_ID(3) 1 SESSION_REGENERATE_ID(3)session_regenerate_id - Update the current session id with a newly generated oneSYNOPSIS
bool session_regenerate_id ([bool $delete_old_session = false])
DESCRIPTION session_regenerate_id(3) will replace the current session id with a new one, and keep the current session information.
PARAMETERS
o $delete_old_session
- Whether to delete the old associated session file or not.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 4.3.3 | |
| | |
| | Since then, if session cookies are enabled, use |
| | of session_regenerate_id(3) will also submit a |
| | new session cookie with the new session id. |
| | |
| 5.1.0 | |
| | |
| | Added the $delete_old_session parameter. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
A session_regenerate_id(3) example
<?php
session_start();
$old_sessionid = session_id();
session_regenerate_id();
$new_sessionid = session_id();
echo "Old Session: $old_sessionid<br />";
echo "New Session: $new_sessionid<br />";
print_r($_SESSION);
?>
SEE ALSO session_id(3), session_start(3), session_name(3).
PHP Documentation Group SESSION_REGENERATE_ID(3)
Hi all,
I have this method to read a string from a STDIN:
void readLine(char* inputBuffer){
fgets (inputBuffer, MAX_LINE, stdin);
fflush(stdin);
/* remove '\n' char from string */
if(strlen(inputBuffer) != 0)
inputBuffer = '\0';
}
All work fine but if i... (1 Reply)
Hi there,
I need a socket (server) in perl that when session created by a client request, take a string and after some proccesing on it, send a string(response) and close the session. but socket wait for future requests.
It's possible to lead me?! :(? or write a psudo code?
Thanks in advance. (1 Reply)
Hi All,
I'm trying to read from two files at the same time, but the second READ is failing, giving no value.
Obvious STDIN is being used by the first "while read", so how can I retrieve a value from a second file within the loop ??
IFS=" ,"
cat $DATAFILE | while read curdate currentcksum... (3 Replies)
Hi the following c-code utilizing the 'read()' man 2 read method cant read in files larger that 2gig.
Hi I've found a strange problem on ubuntu64bit, that limits the data you are allowed to allocate on a 64bit platform using the c function 'read()'
The following program wont allow to allocate... (14 Replies)
So far I have this little regex to match sessionids:
session.id={32}What must I add to make it match all occurances i want to match?session_id=993e3cf23ffff68a2b619518829192b9
?session_id=993e3cf23ffff68a2b619518829192b9
&session_id=993e3cf23ffff68a2b619518829192b9... (1 Reply)
Friends,
I want to read BGP session information with C ( in FreeBSD ). The program will almost work like a sniffer. My FreeBSD box (which is not a BGP speaker) will look at BGP session information (after catching and parsing it) and take a decision based on the information it sees. :wall:
... (1 Reply)
hi
joomla on it has been used that one of my pprivate web servers the error can be seen in its log
PHP Notice: unserialize(): Error at offset 847804 of 847839 bytes in /home/../public_html/libraries/joomla/cache/controller.php on line 176, referer
.
is this error is a serious error ?
is... (0 Replies)