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)
Check Out this Related Man Page
SESSION_ID(3) 1 SESSION_ID(3)session_id - Get and/or set the current session id
SYNOPSIS
string session_id ([string $id])
DESCRIPTION session_id(3) is used to get or set the session id for the current session.
The constant SID can also be used to retrieve the current name and session id as a string suitable for adding to URLs. See also Session
handling.
PARAMETERS
o $id
- If $id is specified, it will replace the current session id. session_id(3) needs to be called before session_start(3) for that
purpose. Depending on the session handler, not all characters are allowed within the session id. For example, the file session
handler only allows characters in the range a-z A-Z 0-9 , (comma) and - (minus)!
Note
When using session cookies, specifying an $id for session_id(3) will always send a new cookie when session_start(3) is
called, regardless if the current session id is identical to the one being set.
RETURN VALUES session_id(3) returns the session id for the current session or the empty string ( "") if there is no current session (no current session
id exists).
SEE ALSO session_regenerate_id(3), session_start(3), session_set_save_handler(3), session.save_handler.
PHP Documentation Group SESSION_ID(3)
Hi,
when I make a mistake and then try to backspace I am unable to do so . Can someone please suggest How I can correct this on my session
For Eg:
pwd^H^H^H
Thanks
rooh (2 Replies)
hi,
does anyone knows how to trace a user session on a unix system:
i want to log these things
1- login
2- date of starting session
3- date of closing session
i've tryed who and last but they don't give closing time of session
regards
hmaiida (2 Replies)
Hi Everyone,
Each time I do update the crontab, it gets reset after exiting from the telnet session. I'm using Solaris 2.8
So it goes like this:
Step 1: Login as root, from a telnet session
Step 2: Crontab -e (I make modification)
Step 3: Save and exit
Step 4: Type crontab -l , changes... (4 Replies)
Hi All,
I logged into a sun microsystems server box, using both a vnc session and a ssh session. I am able to use "ifconfig -a" in a ssh session, but the same on a vnc session says that its a invalid command. how is this possible, when i am logging into the same box through two different... (4 Replies)
During the course of the session before I logout I see some of the commands listed from my previous session but not from my current session and after I logout and log back in I see the commands which I ran before logging out.
Does the .bash_history stay in the buffer or someplace else then?
... (2 Replies)
Hello sir,
Im in a Fedora 9 system.
Im using screen to invoke the session that is created by me.
Whenever we open the terminal then a session is created by the operating system. I want to know what is the name of default session in screen command.
I could not get it using "screen -ls". Can you... (3 Replies)
I am running a sql session within a shell script. Later I am performing some validations on the value coming from the sql session.
The problem is that, the value I am getting from sql session have an extra white space at the begining(I am actually, assigning the outcome of the sql session to a... (5 Replies)
Hi Guys,
Is there a way to recover a lost session? I was working in a server and that lost the connection, now, I have a new session but all the previous processes that I was running, like scripts, etc, are still running.
Is there a way to bring them to my session?
Best regards,
Marco. (4 Replies)
Hi,
Is there any way to refresh the session(for the profile file changes get reflect) in putty?
I am tired of closing reopening putty.
Thanks,
Pandeeesh
CTRL + Q to Enable/Disable GoPhoto.it (4 Replies)
Hi Admins,
Just a small question - Can we have multiple session for single user on HMC.
e.g. Can I have a terminal session (via IE ) and command line (ssh) at same time ??
I am not sure whether it will impact HMC system or not. So want to make sure.
let me know folks.
Thanks (3 Replies)
Below code runs n number of session at a time when called. I want to restrict it to run only for 3 sqlplus at a time. Is there a way to do the same.
for name in `cat abc.txt`
do
(sqlplus -s usert/password@host <<-EOF>> error.txt
SET LINESIZE 1000
select '$name',... (4 Replies)