By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,635 Members | 2,174 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,635 IT Pros & Developers. It's quick & easy.

Where does php session cookies stored

P: n/a
Hi

Where does the cookies stored in the client machine that php
creates after calling session_start() function.

I am using IE... I checked in the following folders but no
cookies are stored.

1)C:\Documents and Settings\Administrator\Local Settings\Temporary
Internet Files
2)C:\Documents and Settings\Administrator\Cookies
3)C:\Documents and Settings\Administrator\Cookies\index.dat
moses

Sep 28 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
<mo************@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi

Where does the cookies stored in the client machine that php
creates after calling session_start() function.

I am using IE... I checked in the following folders but no
cookies are stored.

1)C:\Documents and Settings\Administrator\Local Settings\Temporary
Internet Files
2)C:\Documents and Settings\Administrator\Cookies
3)C:\Documents and Settings\Administrator\Cookies\index.dat
moses
Hi Moses,

It depends whether the session handler is actually set to use cookies.

check in the IE cookie store: open internet explorer then on the tools
menu go to Internet Options then in the general tab, temporary files
section click 'Settings' then 'view files'
the physical location is hidden and has a random character string in the
pathname. Using the inbuilt IE function is the easiest way to find it

You should be able to open the cookie file in notepad.

Cheers

Ron
Sep 28 '06 #2

P: n/a
Hi Ron

Thanks for ur reply.. I have some more questions please....

I tried with what u said but I could not find the cookie
file I am sure that the session handler is set to handle cookies
because I dont have any problem with accessing cookie variable and
session variable every thing works fine But I am curious about seeing
the cookie file what my program has created. Meanwhile if I open
yahoo.com I could see the cookie file created by the yahoo.

So I uploaded my test file to another server and checked and
now I could see the cookie file.

I have learned that by default cookies are not created its
either created by javascript or server side scripting. In php,
session_start() and setcookie() will create a cookie

Now I removed these two function in my file and I had only html
code But still cookies are created I am very much confused.....

My Questions are.

1) when I run my script in server (A) cookie file is not created
where as when I run the same script in server (B) cookie file is
created why?????

2) Does a html page creates a cookie.

3) Can a value stored in a cookie be edited. (ie I am storing a
variable called access level in the cookie based upon the access level
i will give permission to the user, Since cookies are stored in the
client machine can the user open the cookie file and edit the access
level )
regards
moses

Sep 28 '06 #3

P: n/a
mo************@gmail.com wrote:
Hi Ron

Thanks for ur reply.. I have some more questions please....

I tried with what u said but I could not find the cookie
file I am sure that the session handler is set to handle cookies
because I dont have any problem with accessing cookie variable and
session variable every thing works fine But I am curious about seeing
the cookie file what my program has created. Meanwhile if I open
yahoo.com I could see the cookie file created by the yahoo.

So I uploaded my test file to another server and checked and
now I could see the cookie file.

I have learned that by default cookies are not created its
either created by javascript or server side scripting. In php,
session_start() and setcookie() will create a cookie

Now I removed these two function in my file and I had only html
code But still cookies are created I am very much confused.....

My Questions are.

1) when I run my script in server (A) cookie file is not created
where as when I run the same script in server (B) cookie file is
created why?????
If this is a PHP script, perhaps session.auto_start is set in the
php.ini file? Or maybe something else is setting the cookie automatically.
2) Does a html page creates a cookie.
No.
3) Can a value stored in a cookie be edited. (ie I am storing a
variable called access level in the cookie based upon the access level
i will give permission to the user, Since cookies are stored in the
client machine can the user open the cookie file and edit the access
level )
Yes, it's a file on the user's computer, after all. They may not get it
right - but it can be edited. Keep this information in the session, not
the cookie. Session files are kept on the server.
>
regards
moses

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 28 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.