#17848 [Opn->Bgs]: Session stored in db doesn't show up until data is stored with it
| From: | georg@php.net | Date: | Sat, 24 Aug 2002 09:52:58 +0000 |
| Subject: | #17848 [Opn->Bgs]: Session stored in db doesn't show up until data is stored with it | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-17753@lists.php.net to get a copy of this message | ||
ID: 17848
Updated by: georg@php.net
Reported By: fabian@ahrberg.se
-Status: Open
+Status: Bogus
Bug Type: Session related
Operating System: Linux 2.4 kernel
PHP Version: 4.2.1
New Comment:
Usually if you don't store information in your session variables, there
is no need to store some information in the database. Connecting to the
database and inserting data implicates performance disadvantages.
If you have to store information for stats, use normal db functions and
insert them via delayed insert.
Previous Comments:
------------------------------------------------------------------------
[2002-06-19 15:23:43] fabian@ahrberg.se
Just a suggestion...
Workarounds bothers me...
------------------------------------------------------------------------
[2002-06-19 15:18:15] hholzgra@php.net
why don't you just register a dummy variable?
would take about the same amount of code rewrite
as the session_start() flag you suggested, but
save us C code changes, documentation update
and QA testing ...
------------------------------------------------------------------------
[2002-06-19 14:13:36] fabian@ahrberg.se
I used to store sessions in mysql as it made it easy for me to jsut
count the rows to find out how many sessions that were being used at a
time.
Since I also stored whether a session was "logged in" or not it made it
very easy to make realtime stats such as:
95 visitors, 65 logged in
When I upgraded to 4.1.x, I'm not sure it could be 4.0.2 or something
like that it suddenly stopped working. When I looked into it I found
out that the sessions started but with no variables written to them
never showed up in my session table which is REALLY annoying as I no
longer can get the stats out as easily as before.
Someone told me it's a feature not to store the empty sessions,
according to me it's a problem. Maybe a flag with the session_start
could be used? So the feature wanting can keep it as it is right now
and I can store my empty sessions?
Somewhat bothered... ;)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17848&edit=1