|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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
|
|
#2
|
||||
|
||||
|
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. |
|
#3
|
|||
|
|||
|
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
|
|
#4
|
||||
|
||||
|
look for session.save_path = [something] in your php.ini file
|
|
#5
|
||||
|
||||
|
What he said.
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > PHP Sessions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|