This was sent to bugs but i thought it needed to be cross-posted here
As a follow-up to the suggestion that I trouble-shoot this issue
(re:MLimburg): Has anyone noticed that upon login to the user.php
script, the following occurs (if you want to trace it, set &
= true; in your lib-sessions.php file and it will dump the following data
upon attempting to sign in).
This is how my trace looks:
USER CLICKS SUBMIT ON LOGIN BOX:
Tue Jul 23 22:44:03 2002 - *************inside new_session********
Tue Jul 23 22:44:03 2002 - Args to new_session: userid = 13, remote_ip
= 63.65.xyz.abc, lifespan = 7200, md5_based = 0
Tue Jul 23 22:44:03 2002 - Assigned the following session id:
Tue Jul 23 22:44:03 2002 - *************leaving SESS_newSession**
Tue Jul 23 22:44:03 2002 - ***Inside SESS_sessionCheck***
Tue Jul 23 22:44:03 2002 - session cookie not found from lib-
Tue Jul 23 22:44:03 2002 - ***Leaving SESS_sessionCheck***
I am tracing this methodically as follows:
You click login.
The system checks for a session cookie in lib-common.php
The system does not find a session cookie on the browser, either session
or permanent based.
The system exits this routine having gotten nowhere with identifying your
***Now, the interesting part:
THEN the system takes you to SESS_newsession which attempts to setup
a session in the database.
It has your id, ip, assigns a lifespan,etc
Now, it clears any session you may have had from the database AND
any session which timed out, inserts your session.
Then it sets a new cookie and sets the global $_USER to your &
(which holds your id, username, etc).
Now, in the past, we know we have had problems with this global.
According to the geeklog file lib-sessions.php (at the top):
// LOAD USER DATA. NOTE: I'm not sure why I have to set $_USER
// it's suppose to be a global variable. I tried setting $_USER from
// SESS_sessionCheck() and it doesn't work.
$_USER = SESS_sessionCheck();
Yet they are setting the $_USER variable from within this
SESS_sessioncheck routine upon login anyway. (like the script tells us <
WHY? is this the trouble we are all having who cannot log in?
Here is another interesting thought: the welcome_msg in header.thtml
gives us anoher clue: the variable substitution that does not happen. <
$_USER['username'] (in $msg) is not being substituted in lib-
(my line 343). (as read from $_USER hash/array)
YET our usernames are appearing in the upper right corner as being
logged in. (as read from mysql)
NOW, Please keep in mind that these things happen ONE AFTER
ANOTHER in lib-sessions.php and therefore can only be a of a failure for
the $_USER global to be set correctly due to the fact that it is being
INSIDE the function and not outside as previously stated in the script as
Any thoughts? Dirk? Anyone?
Keep in mind in am an experienced programmer--10 years,
however I just jumped into PHP a few months ago. I may be totally off-
base, but i CAN read code