SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: deleting session cookie
-
Dec 17, 2000, 18:42 #1
- Join Date
- Apr 2000
- Location
- Waco, Texas.
- Posts
- 188
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello,
I need to delete the cookie that a session sets. I know there is an option in php.ini to make a session not set a cookie, but I do not have access to the config files. Anyone know how to do this?
Thanks
-
Dec 17, 2000, 18:50 #2
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Set in an .htaccess file, one option is to set a per session cookie that merely sets a cookie with the value of the session id and then have the session hadler be a MySQL database to keep track of session variables, check out http://www.hotscripts.com There is a MySQL session handling lcass that may be of interest to you.
Please don't PM me with questions.
Use the forums, that is what they are here for.
-
Dec 17, 2000, 21:05 #3
- Join Date
- Apr 2000
- Location
- Waco, Texas.
- Posts
- 188
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks for the reply.
I was trying:
Code:setcookie(session_name(),"",0); session_start(); $id = session_id();
Any ideas?
<Edited by robp on 12-17-2000 at 09:09 PM>
-
Dec 18, 2000, 21:50 #4
- Join Date
- Apr 2000
- Location
- Waco, Texas.
- Posts
- 188
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I tried using
ini_alter(session.use_cookies,0) or die ("ERROR"); at the start of my script, but got the "ERROR" thus meaning the variable in php.ini could not be changed. Any ideas why this happened?
-
Dec 19, 2000, 14:50 #5
- Join Date
- Apr 2000
- Location
- Waco, Texas.
- Posts
- 188
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Although it seems like I am talking to myself, if anyone is curious as to why tje ini_alter() did not work, it was because I forgot the quotes
ini_alter("session.use_cookies","0");
works perfectly. If anyone does not want a cookie set when using sessions, use this unless you have access to edit php.ini directly.
Bookmarks