Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Sessions & Block Cookie setting truncates vBulletin Code? Details »»
Sessions & Block Cookie setting truncates vBulletin Code?
Version: , by donjames donjames is offline
Developer Last Online: Aug 2002 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-21-2002 Last Update: Never Installs: 0
 
No support by the author.

Hi,

I am working on integrating vBulleting with our website, and want to pass session info to it if someone visits vBulletin from other pages on our site.

So, in the phpheader template, I added a "session_start()" command to pass session info from page to page.

It seems to work fine IF THE USER ALLOWS COOKIES. However, if the user's browser is set to block cookies, though most of it displays correctly (with links that will pass the session id), various parts of the display do not.

For example: on the forum home page, immediately after the "lock" image on the bottom, the text "<font face="verdan" appears and then the rest of the display ends (so no contact or home page links appear after this). In other words - for some reason, with the "session_start()" command in the php_header, if the user's browser is set to block cookies, the display gets truncated when the <small font> is being parsed after the lock image (<small font> works fine before this point).

ANYONE HAVE ANY IDEAS WHAT MIGHT BE CAUSING THIS?

To see what I mean, you can go to the forum at http://66.220.24.247/forum/ - try viewing it with your browser set to allowing cookies, and the set it to blocking cookies and refresh the screen.

IF ANYONE HAS ANY THOUGHTS ON WHY THIS HAPPENS, I WOULD GREATLY APPRECIATE IT.

Has anyone else tried using sessions between their site and their forum?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-21-2002, 04:10 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It works fine for me, both with cookies enabled and cookies blocked with IE6 and NT 5.1.

If you wish to use the vB sessionhash on your none forums pages add this to the top of the PHP file:

PHP Code:
require('./forums/golbal.php'); 
And then use s=$session[sessionhash] instead of PHPSESSID in your links.

Hope this helps.
Reply With Quote
  #3  
Old 08-22-2002, 01:09 AM
donjames donjames is offline
 
Join Date: Aug 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NTLDR, I think that's because I was working on trying something different. I've since switched it back to using sessions - and I get the same thing. Can you see if it still works for you or if you now get what I was talking about?

Thanks.
Reply With Quote
  #4  
Old 08-22-2002, 01:44 AM
donjames donjames is offline
 
Join Date: Aug 2002
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

QUESTION,

the vB sessionhash - is that a real session or a way to mimic a session? Is it an array of variables kept in memory or is it just a variable used to track people online (stored in the session table).

I'm trying to understand why there would be any conflict when I use "session_start()". There doesn't seem to be any conflict when the user doesn't block cookies - but if he does, the entire page does not get displayed - which gives some weird behavior (sometimes, clicking on a link will display the rest of the html that should have been displayed on the previous page - but didn't.

It's almost like there isn't quite enough memory to output the entire html document (if cookies are blocked) and it gets temporarily stored somewhere until you click on another link.

Example - with cookies blocked (I'm using IE6.0), go to the home page (http://66.220.24.247/forum/ ). At the bottom, you might see "<font face="verdana,arial,he " or it might give part of the text that follows the locked icon. Then click on the FAQ button up top. When I do that, the FAQ page comes up and the last few questions are cut off. Now, if I click on the Home Button - it takes me back to the home page, but above the actual Home Page html, it shows the remaining questions - with some extraneous html since the html tags were cut off.

Now - if I don't block cookies, none of this happens - everything works great!

Has anyone run into this kind of a problem. The code that affects this is definitely "session_start()" because I've taken it out and it works fine even when cookies are blocked.

Thanks
Reply With Quote
Reply


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 10:35 PM.


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.04020 seconds
  • Memory Usage 2,228KB
  • Queries Executed 17 (?)
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)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)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