Jump to content

On-Line users not visible


zznic

Recommended Posts

Good day,

 

I have a problem in the admin panel since a couple of days, when I go to the statistics and enter the connected users it always says there is one and when I clic on the lid it shows none, like nobody is connected or has been connected in the last few minutes. What is the problem and how can I fix it?

 

Thanks in advance for your help

 

regards

 

Nicola  :D

Link to comment
Share on other sites

There is always you who is online. The column Is Admin? should have a green check.

 

When you click the link that is just after the location, you are taken to that location. What do expect to see when you get this page?

 

Please describe what you think is the problem, that is, what you see versus what you think you should see.

Link to comment
Share on other sites

Hi BSmither, I clik on statistics and I expect to see 20, 15, 25 or 150 people online, like it used to be three days ago. Now there's only one and no links are shown either, not even for that single one. 

 

The administrator has a green check

 

Hope this helps

 

tx, ciao

 

Nicola

Link to comment
Share on other sites

Using a utility like phpMyAdmin, would you please view the database directly, the table CubeCart_sessions.

 

We need to compare how many records are in this table versus what shows up in the admin Statistics, Users Online list.

 

According to the code, only visitors who last viewed a page not any later than 30 minutes ago will be in the list.

Link to comment
Share on other sites

  • 8 months later...

I've been having an issue with not seeing the usual time frame of users online since I upgraded plushcatalog to 5.2.4. Dirtybutterestates, also on 5.2.4, still shows 12 hours worth, but I can only get 30 minutes to show on plushcatalog, even though the database has 120 records in _sessions. I'm using the same statistics.index.inc.php file for both sites.

 

Any suggestions about where else the problem could be?

Link to comment
Share on other sites

I can't find any where else that would affect the time elapsed parameter for the query to pull records from the database.

 

In statistics.index.inc.php, near the bottom, find:

// Customers Online
$timeLimit    = time()-1800;  // 30 minutes

The 1800 number (might be different for your needs) is the same for both stores?

 

"The database has 120 records in _sessions."

 

But what are the values in the 'session_last' column?

Link to comment
Share on other sites

In the file /classes/class.session.php, near line 540, find:

        // Purge sessions older than the session time out
        Database::getInstance()->delete('CubeCart_sessions', array('session_last' => '<='.(time() - $this->_session_timeout)), false);

This purges records older than the session timeout, which, unless you changed it near the top of this file, is one hour.

Link to comment
Share on other sites

You've not split the time between ADMIN_CP and otherwise?

$this->_session_timeout = (ADMIN_CP) ? 60 * 60 * 168 : 60 * 60 * 168; // Admin : Customer session length in hours

 

Realize that when a customer's page is delivered, and the customer's session closes (not the same as destroyed), the session getting closed (any session) will cause the database _session table purge according to the session_timeout of that session.

 

That is to say, if your customers have a 60 minute session_timeout, your customer is causing the table to be purged of all records older than 60 minutes.

Link to comment
Share on other sites

More towards the top of the file is where $_session_timeout is declared:

private $_session_timeout = 3600;

 

So, unless some other statement assigns a value to it (like the un-commented $this->_session_timeout statement), 3600 seconds (1 hour) will be the time span used to purge the table (and also be the idle-time session timeout).

Link to comment
Share on other sites

I don't understand why, but commenting out the line I mentioned in post #13

 

 

FIXED it.

 

I couldn't find the thread where the reason FOR uncommenting it was suggested by Convict. I usually do a better job of documenting why I make these kinds of suggested changes, so I'm at a loss.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...