Log in

View Full Version : chdir and session - script outside vbulletin forum directory session issue


okami1
09-08-2007, 11:12 AM
Hello,

I want to make use of a vb-powered script outside the forum directory, so I basically changed
require_once('./global.php'); to
define('BWD', (($getcwd = getcwd()) ? $getcwd : '.'));
chdir(FWD);
require_once('./global.php');
chdir(BWD);
Works so far, however it seems that the User session is missing as this event always occurs, though I am actually logged in:

if (!$vbulletin->userinfo['userid']) {
print_no_permission();
}


I would appreciate any help on that, thanks alot!