PDA

View Full Version : How to change the 's' session variable to fit my own?


fabrizio
05-04-2005, 08:06 PM
Hello.

I am installing vBulletin on my site, and I have a question about sessions.

I order to not lose the session ID of users with no cookies enabled coming from other pages of my site, I need to have vBulletin accept my own session ID variable as session ID to be used inside vBulletin... here is the facts when a user has not cookies enabled browser:

1. My site uses the standard PHP variable for sessions such as PHPSESSID, and it is automatically added to any URL if the user has not the browser cookies enabled.

2. But when the user arrives to vBulletin which uses its own "s" variable, then the session ID changes.

3. When the user returns to my own site pages, the session ID changes again.

This is bad because since my site is a commercial website, every time a user visit the vBulletin section he/she loses its shopping cart content and other custom settings.

How this can be managed? There is any way to make vBulletin take the standard PHPSESSID variable from PHP without the use of cookies?

Any idea is very welcome.

Thank you in advance.

Fabrizio Ferrari
Virtual Sheet Music, Inc.
http://www.virtualsheetmusic.com
Edit/Delete Message

sabret00the
05-05-2005, 07:07 PM
could you not do it via a form <click here to enter forums> and then process the form as PHPSESSID = vBSESSID? kinda thing??

fabrizio
05-06-2005, 12:06 AM
Thank you for your reply.

I have just solved the problem by modifying the sessions.php file of vBulletin allowing to create a new session by taking the value from the $_GET['PHPSESSID'] passed paramenter.

Thank you anyway!

Sincerely,
Fabrizio