/    Sign up×
Community /Pin to ProfileBookmark

Session value storage path?

where the session values strores?
how to view the session values?
example

$_SESSION[‘name’] = ‘varghese’;
where the varghese is stored how to view the value varghese.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@jabezOct 17.2006 — If you load this script in a web browser:

<?php phpinfo(); ?>

it will generate the settings for your version of php.

search for the 'session' settings.

Alternatively, look in php.ini config file for:

session.save_handler=files

session.save_path=/tmp

If you have php sessions enabled and set to 'file', then the session cookies should be stored under /tmp (this is on linux).

To view the session cookie file, you need to be root user I think under Linux.

Not sure about other OSes.
Copy linkTweet thisAlerts:
@pcthugOct 18.2006 — [code=php]
<?php
// start a session
session_start();

// assign a value to the 'name' key of the SESSION array
$_SESSION['name'] = 'varghese';

// will output 'varghese'
echo $_SESSION['name'];

?>[/code]
×

Success!

Help @tvarghese spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...