Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-18-2009, 01:01 PM Mixed Sessions
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I write my scripts to use DB storage for sessions. I'll be integrating this method on a site where I need to fetch some information from the "other" session, set by simply calling session_start(). How can I fetch the information from the one session and then have my own DB-stored session?

I'm thinking of just starting the session at the beginning of the script, fetching my data, then deleting the session and starting the sessions the way I otherwise have them, but I think this will screw up some header commands sent to the browser without redirects.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
 
Register now for full access!
Old 05-18-2009, 01:10 PM Re: Mixed Sessions
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
I think sessions are pretty flexible. They don't need headers to work, since it can work without the PHPSESSIONID cookie, by appending the sessionid to the URL. As long as you aren't outputting anything to browser, it isn't going to mess with redirects. Am I missing something?
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 05-18-2009, 01:12 PM Re: Mixed Sessions
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
I'm not sure if you're missing anything, but I'll go ahead and give my idea a try tomorrow and let you know how it goes. THANKS!
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Old 05-18-2009, 01:56 PM Re: Mixed Sessions
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
I've never done this, but you may want to look into named sessions. If you know the name of both sessions you should be able to switch between them.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 05-18-2009, 02:03 PM Re: Mixed Sessions
JeremyMiller's Avatar
WT Moderator

Posts: 1,712
Name: Jeremy Miller
Location: Las Vegas, NV
Trades: 0
Good idea, Matt. I have a feeling we'll all learn a little bit about sessions from this small task.
__________________
Jeremy Miller

Please login or register to view this content. Registration is FREE
JeremyMiller is offline
Reply With Quote
View Public Profile Visit JeremyMiller's homepage!
 
Reply     « Reply to Mixed Sessions
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61248 seconds with 12 queries