Cookie path and domain

Depending on your site layout you might need to change the cookies settings within vBulletin. This page will guide you to the settings you'll have to make.

Example layouts

Below are a couple of example site layouts:

Layout 1

vBulletin location
http://example.org/forum
vbDrupal location
http://example.org/forum/drupal

No changed will have to be made, this set up should work out of the box.

Layout 2

vBulletin location
http://example.org/forum
vbDrupal location
http://example.org/

This setup is similar to the vbdrupal.org setup. For this to work properly you might need to change the cookie path setting. The cookie path must /. The cookie domain doesn't need to be adjusted

Layout 3

vBulletin location
http://forum.example.org/
vbDrupal location
http://example.org/

In this case the forum and drupal run on different hostname. Mostlikely you will have to adjust the cookie domain value. In this case the value must be .example.org (note the leading dot). You might also need to adjust the cookie path, it must be /.

Layout 4

vBulletin location
http://example.com/
vbDrupal location
http://example.org/

Completely different domains. This setup prevents sharing of cookies, thus single sign-on is not available.

Starting from vbDrupal 5.2.1 it is possible to use a setup like this. To enable cross domain authentication you will need to add a configuration directive to the settings.php. See the settings.php or default.settings.php file for further instructions. There are a few limitations to this setup:

  • Only works on browsers with cookies enabled
  • No single sign-on
  • You can not use the login form on the vBulletin navbar; either use a different Drupal theme or change the vBulletin navbar.

How to change these settings

The cookie settings can be found in the vBulletin admin control panel. It's one of the various settings you can change from the "vBulletin Options" page.

Concerns with changing cookies settings

When you change cookie settings (path or domain) you need to invalidate the old cookies before everything will work. After you change the cookie settings you will mostlikely not be able to log out through vBulletin. this is because the cookie settings send to the browser do not match the currently stored cookies.

There are a couple of ways to kill these stale cookies. On way is to remove the cookies from your browser. This option might not be available to all browsers.

Another way is to wait until the cookies have been expired. However this could take a long while.

The best way would be to user a cookie kill script that removed the stale cookies based on the old settings. A script like this is available from the vbDrupal CVS. You will have to edit that script to reflect the old settings and let users visit the script in one way or the other. One way would be simply to point the users to that script through a link. A nicer, and transparent method, would be to include this script in vBulletin. When users visit vBulletin again their old cookies will be automatically killed. A method to include this script in vBulletin would be to place it in the includes directory of vBulletin and add the following line to the config.php file:

@include_once('includes/kill_stale_cookies.php');

Note: if you screw up the configuration you might not be able to log in while this script is still being included.

On the subject of cookies...

What should i make my cookies path?

My site is hosted at, say http://a-host.com/karlm/vbdrupal but the domain is http://my-site.com

This would fit example Layout 4. In other words, there is no way this would work. vBulletin and vbDrupal must be used within the same domain, they may be on different subdomains, as long as the domain is the same.

e.g. a domain name is the last two parts of a hostname.

Hostname 1: www.example.org
Hostname 2: forum.example.org
Both have the domain: example.org

They are on the same domain, and I have not configured any subdomain. The only difference between them is their install dir.

VbDrupal is at: http://a-host.com/vbdr

Vbulletin is at: http://a-host.com/vbdr/forum

My purchased domain though, is entirely different (see sig)

In fact, if you would be good enough to peruse the site in my sig, you'd see what i'm trying to address.

Thanks

subdomain installations

What is the cookie settings if

1- http://vbdrupal.site.com and http://forum.site.com

2-http://www.site.com/vbdrupal and http://forum.site.com

My forum is located in http://forum.site.com which drupal installation is recommended from the above 2.

Thanks in advance

For both of the above, the setting for the vbulletin cookies should be '.site.com' , because the subdomains are different.

which installation

which installation should i prefer.does it matter. if it is a subdomain or directory

If the 'www.site.com' is not used, then it is natural for that to be the vbdrupal home, but if you have other plans for that root domain, then 'www.site.com/vbdrupal' is the next natural option.

thank you for the advice ihope forum.site.com and site.com/vbdrupal works together fine

same login is not working for drupal-drupalvb

i hv used vbulletin, i hv configured it completely, works.

i want to access it from drupal site, for that i have used the drupalvb module as specified.
but while i login to drupal and use the forum from the link

"Logging into the website gives you access to Forums as well."

site is redirect to the forum, but ihave to again login there, so please provide the information that why the common login is not working, or is there patch, or misconfiguration.

i want single login, that give access to both drupal and vbulletin

thank you
drupal devloper

this is vbDrupal, not the drupalvb module you can find on drupal.org.
If you have issues with the drupalvb module get support here: http://drupal.org/project/issues/dru...gories=support

Powered by Drupal - Modified by Danger4k