PDA

View Full Version : vBulletin chdir from subdomain help.


noj75
07-18-2008, 07:53 PM
Hi all,

Can anyone help me with this:

I have a script in a subdomain:

http://script.mysite.com

My vBulletin is located in here:

http://www.mysite.com/forum/

In the script (in the subdomain) I am using the following code so that I can access the VB variables that I need:



//vBulletin Variables Start

chdir("/home/******/public_html/forum");
include("./global.php");

if ($vbulletin->userinfo['userid']!=0) {

// Some code here

} else {

// Some different code here

}



The variables are not being accessed. I presume this is to do with the fact that the script is in a subdomain of my site but no matter how many different variations I try I just cant crack it.

If anyone can solve this I would be very happy. Thanks for any help in advance.

Kind regards

MoT3rror
07-19-2008, 02:49 AM
vBulletin Options -> Cookies and HTTP Header Options -> Cookie Domain
needs to be .yourdomain.com then blank to use cookies across sub domains.

noj75
07-19-2008, 07:54 AM
vBulletin Options -> Cookies and HTTP Header Options -> Cookie Domain
needs to be .yourdomain.com then blank to use cookies across sub domains.

MoT3rror you are a star. That sorted a problem I have been having for days.

Thanks for taking the time to reply and fix my problem.

Kind regards