Unix and Linux Discussions Tagged with session |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
0 |
5,904 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
2,701 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
6,859 |
Solaris |
|
|
|
2 |
7,386 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
14,351 |
UNIX for Advanced & Expert Users |
|
|
|
4 |
2,571 |
Shell Programming and Scripting |
|
|
|
2 |
8,691 |
AIX |
|
|
|
0 |
2,793 |
Shell Programming and Scripting |
|
|
|
2 |
15,866 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,752 |
IT Security RSS |
|
|
|
2 |
2,363 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
24,935 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,203 |
Software Releases - RSS News |
|
|
|
0 |
1,381 |
Software Releases - RSS News |
|
|
|
2 |
4,606 |
AIX |
|
|
|
3 |
3,846 |
Shell Programming and Scripting |
|
|
|
0 |
3,561 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
2,449 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
9,115 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
3,623 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
997 |
Software Releases - RSS News |
|
|
|
4 |
8,441 |
Linux |
|
|
|
2 |
5,428 |
Solaris |
|
|
|
0 |
1,291 |
UNIX and Linux RSS News |
|
|
|
3 |
2,020 |
Shell Programming and Scripting |
|
|
|
7 |
6,994 |
Solaris |
|
|
|
1 |
2,579 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,336 |
Solaris |
|
|
|
3 |
15,802 |
Solaris |
|
|
|
15 |
16,548 |
Linux |
|
|
|
0 |
1,242 |
Software Releases - RSS News |
|
|
|
2 |
9,224 |
Shell Programming and Scripting |
|
|
|
0 |
5,349 |
Shell Programming and Scripting |
|
|
|
5 |
16,973 |
Cybersecurity |
|
|
|
1 |
2,781 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
10,707 |
UNIX for Advanced & Expert Users |
|
|
|
2 |
4,697 |
Filesystems, Disks and Memory |
|
|
|
2 |
3,783 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
50,028 |
UNIX for Dummies Questions & Answers |
|
|
|
20 |
18,087 |
UNIX for Dummies Questions & Answers |
SESSION_NAME(3) 1 SESSION_NAME(3)
session_name - Get and/or set the current session name
SYNOPSIS
string session_name ([string $name])
DESCRIPTION
session_name(3) returns the name of the current session. If $name is given, session_name(3) will update the session name and return the old
session name.
The session name is reset to the default value stored in session.name at request startup time. Thus, you need to call session_name(3) for
every request (and before session_start(3) or session_register(3) are called).
PARAMETERS
o $name
- The session name references the name of the session, which is used in cookies and URLs (e.g. PHPSESSID). It should contain only
alphanumeric characters; it should be short and descriptive (i.e. for users with enabled cookie warnings). If $name is specified,
the name of the current session is changed to its value.
Warning
The session name can't consist of digits only, at least one letter must be present. Otherwise a new session id is generated
every time.
RETURN VALUES
Returns the name of the current session. If $name is given and function updates the session name, name of the old session is returned.
EXAMPLES
Example #1
session_name(3) example
<?php
/* set the session name to WebsiteID */
$previous_name = session_name("WebsiteID");
echo "The previous session name was $previous_name<br />";
?>
SEE ALSO
The session.name configuration directive .
PHP Documentation Group SESSION_NAME(3)