SunQuest
 
           PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old January 28th, 2004, 11:12 AM
kpark kpark is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Woodstock, VT
Posts: 2 kpark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Angry PHP Sessions

Hello All, I am having a problem with my PHP Sessions, specifically session_destroy(). As I understand it, I am supposed to have session_start(); at the top of each page to initiate the session. For some reason this is creating a cookie and saving a file on my server like: sess_d3bef2ed2885598498234e8a229bfe9a. When I destroy the session I can't get it to delete these files. Why are these being stored as cookies SESSID, and a file? The other problem is that it is saving the files in two directories, the main directory and subdirectory..../Catalog. Thanks, Kelly

Reply With Quote
  #2  
Old January 28th, 2004, 12:36 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Out of the box, sessions set a session cookie and save the session file, typically in the /tmp directory. I don't know why you'd be getting session files in two directories. Sessions typically end when you close your browser. Try doing that and see if your cookie goes away. I'm not sure on what kind of schedule the sessio files are deleted.

If you're not satisified with the way sessions are handled, you can override them, saving them in a database, for example. Check out the set_session_handler() function for more info.

Reply With Quote
  #3  
Old January 28th, 2004, 01:11 PM
kpark kpark is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Location: Woodstock, VT
Posts: 2 kpark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks, Houston. I'll check that out. Where would I make sure that my sess files get stored to a /tmp/ file? I read something about a php.ini file or something? Thanks again, Kelly

Reply With Quote
  #4  
Old January 28th, 2004, 10:45 PM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
look for session.save_path = [something] in your php.ini file

Reply With Quote
  #5  
Old January 29th, 2004, 07:19 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
What he said.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > PHP Sessions


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway