Quote:
Originally Posted by fviper
If you don't mind, can you explain the "print_output" in more detail?
|
This is admittedly based on my memory of something I worked on over a year ago, but - the session timeout is done by comparing the last activity time (saved in the session table) with the current time, and the current time is then saved as the "last activity". The actual update of the session table is done in exec_shut_down() which is called from print_output() (both of those are in includes/functions.php). So if you're not calling one of those then your script probably isn't updating the lastactivity. But I don't know if that has anything to do with the problem you're having - probably it doesn't. (I also could be remembering wrong).
I'm kind of surprised your code works because global.php includes init.php, and it looks like that exits if THIS_SCRIPT isn't defined.
I don't know how important having the actual group is to you, but of course if you read cookies or some other info coming from the user then it could be hacked. If that's not an issue then one thing you might be able to do is set your own cookie somewhere in the vb code (via a plugin), but I don't know where you'd do that offhand, and you might have to deal with making sure it gets reset if the group should change, and what to if it's not sent, etc.
I know other people have had issues with trying to include global.php from another directory, so maybe that has something to do with the problems in your current code. I seem to remember someone recently was doing a chdir to the forum directory bbefore including global.php, then doing a chdir back to their custom directory.
ETA: ...one other thought - you mentioned before that your global.php was the first thing after "<?php", but it didn't occur to me that you might have something before that in the file. The HTML you have at the top might be the cause of the "can't set cookie" message you get sometimes. You might try including global.php at the top even if you don't need it until later.
Anyway, sorry I'm not more help - I'm sure if anyone else has ideas they will chime in.