View Full Version : info about session table
hi all!
I'm trying to develop a little cms based on vbulletin... I wish know how can I do to insert a user in the session table...
example..
the user enter in the home of the forum and automatically appears a record in the table...
but if the user go on my main page doesn't appear in session...
how can I do this?:rolleyes:
thanks
Marco van Herwaarden
13 Mar 2007, 16:55
Just include global.php in your script and a session will be done automatically.
Just include global.php in your script and a session will be done automatically.
thanks! but
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I use these, and works, 'cause i tried to comment the second line and the message that appears is this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I suppose that the path is correct and global.php is included, but the session doesn't appears valid
thanks again:up:
JMH11788
21 Mar 2007, 02:49
thanks! but
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I use these, and works, 'cause i tried to comment the second line and the message that appears is this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I suppose that the path is correct and global.php is included, but the session doesn't appears valid
thanks again:up:
I've been trying to get past this for months. Someone please help him (us) :(
Just to add to the information pool, I also get this error sometimes when trying to do the same thing:
warning: array_keys(): The first argument should be an array in /var/www/forums/includes/functions.php on line 3699.
warning: Invalid argument supplied for foreach() in /var/www/forums/includes/functions.php on line 3699.
Dismounted
21 Mar 2007, 10:47
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Just that is sufficient. The config is loaded by global.php.
JMH11788
21 Mar 2007, 15:07
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Just that is sufficient. The config is loaded by global.php.
right, but why does it not work then?
I've noticed it usually works okay if your file is in the same directory as vBulletin, but if you aren't in the same directory then problems arise quickly. A fix is to use chdir() to set the right working directory before including the file. It works all fine and dandy until I try to add all of it into a function (my CMS uses functions for nearly everything so it has to go in a function). I've been pulling my hair out trying to make it work.
I'm going to try including the login file with an include via http. I'll declare the username and password variables global so they are available outside of the scope. HOPEFULLY that will work, but at this point it seems to be wishful thinking :(
I use
<?php
chdir("vbforum/");
require('./global.php');
chdir("../");
?>
and it works fine
JMH11788
29 Mar 2007, 04:04
I use
<?php
chdir("vbforum/");
require('./global.php');
chdir("../");
?>
and it works fine
I use
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
and it works sometimes and not others. I've been dissecting the code more and have learned what causes the error. It all depends on what you are trying to do though, but I got it down pat pretty well.
vBulletin® v3.6.12, Copyright ©2000-2009, Jelsoft Enterprises Ltd.