php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17848 Session stored in db doesn't show up until data is stored with it
Submitted: 2002-06-19 14:13 UTC Modified: 2002-08-24 05:52 UTC
From: fabian at ahrberg dot se Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.1 OS: Linux 2.4 kernel
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabian at ahrberg dot se
New email:
PHP Version: OS:

 

 [2002-06-19 14:13 UTC] fabian at ahrberg dot 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... ;)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-19 15:18 UTC] 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 15:23 UTC] fabian at ahrberg dot se
Just a suggestion...

Workarounds bothers me...
 [2002-08-24 05:52 UTC] georg@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 07:01:31 2024 UTC