Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 10-13-2003, 11:31 PM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default how do sessions work in vb3 beta 7?

Hi. I'm building an application that uses a bunch of vbulletin functions and tables.

In vb 2.~ I was fine with:

require_once("global.php");
session_start();

Now that I have ported over to vb3b7 I notice that my sessions are gone between pages. I don't understand what they are doing with sessions now, I assume it is for security.

What I want to be able to do is put a variable into a session and be able to access that session on another page.

Does anybody have any ideas as to what I need to understand about vb3b7 and sessions?

Thanks
Reply With Quote
  #2  
Old 10-14-2003, 02:01 AM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Check out global.php and session.php.

Thats all I can give you as vB3 code disscussion is still not allowed.
Reply With Quote
  #3  
Old 10-14-2003, 02:12 AM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok. I can abide by that. I don't fully understand sessions.php yet but I'm getting there.

Thanks
Reply With Quote
  #4  
Old 10-14-2003, 02:43 AM
DrkFusion's Avatar
DrkFusion DrkFusion is offline
 
Join Date: Nov 2001
Posts: 1,926
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I believe vB does not use session hashes (db) to manage active sessions for logged in users, but only for guests, I think vb uses cookies for users now.
Reply With Quote
  #5  
Old 10-14-2003, 12:50 PM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think that sessions.php clears the sessions after it runs so I think I'm going to convert all my sessions to variables in there before the clear. I would have preferred to not have to add any code to sessions.php but I guess just this once...
Reply With Quote
  #6  
Old 10-14-2003, 12:56 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vB does work using sessions as well as cookies Arunan. Why do you think there is the sessionhash in the url still
Reply With Quote
  #7  
Old 10-14-2003, 03:14 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why do you need to know how they work? Like what exactly are you trying to do?
Reply With Quote
  #8  
Old 10-14-2003, 03:35 PM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I use the vbulletin back end to help me with user management (and forum of course) on a web application I am building.

- I collect some user data with form1.php
- I post to the form1.php and validate the post variables
- after successful validation set them all to session variables and and redirect to form2.php (visual verification for the user) and so on through my 5 page process.
- my session variables are not present in form2.php like they were in vbulletin 2.3
- it looks like the sesison gets cleared in sessions.php
- since sessions.php is called from global.php then my problem is that I need the vbulletin back end but I need my sessions as well

The two ideas I have through of are:
1) forget this multi page process and put all the stuff on one multi stage page and just use post variables for everything, skipping sessions completely
2) convert all my session variables to variables in sessions.php before the session clear

I appreciate your time. Thanks
Reply With Quote
  #9  
Old 10-14-2003, 08:09 PM
SmEdD's Avatar
SmEdD SmEdD is offline
 
Join Date: Mar 2003
Location: Ontario, Canada
Posts: 381
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well get the code out of global.php and you should be fine!

And I also noticed 3 out of 4 of use that have posted in this thread are from Canada
Reply With Quote
  #10  
Old 10-14-2003, 08:18 PM
bradsears's Avatar
bradsears bradsears is offline
 
Join Date: Aug 2003
Location: Toronto
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll do something with it. Too bad my limited understanding seems to say that vbulletin takes my session and won't give it back. I'm sure they have a good reason.

Thanks for your help my Canadian brothers - and word to Mist ... Canada is cool with the UK.
Reply With Quote
Reply

Thread Tools
Display Modes

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

Forum Jump


All times are GMT. The time now is 03:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04139 seconds
  • Memory Usage 2,237KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete