Forums / General Questions / Who's online not working correctly

Who's online not working correctly

Locked

Views: 4,029

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
16 Dec 2009, 9:44 PM
#1
extremerc avatar

extremerc

New Zenner

Join Date:
Nov 2009
Posts:
16
Plugin Contributions:
0

Who's online not working correctly

Since transferring the site to a new server the who's online feature has not been working properly. Takes ages to load when you click it or refresh it, and shows everyone as having active or inactive carts. I tried to replace the file with one from my original ftp backup but no change. Any suggestions on how to fix this or what is causing it most welcome! :)

16 Dec 2009, 10:51 PM
#2
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Who's online not working correctly

It could be your sever that your site is hosted it could be slow. You might need to check with them.

14 Jan 2010, 9:08 AM
#3
skybluepunk avatar

skybluepunk

New Zenner

Join Date:
Oct 2008
Posts:
28
Plugin Contributions:
0

Re: Who's online not working correctly

I have the same problem. Spider sessions show as 'Inactive no cart', but all others have active or inactive carts, which seems a bit improbable.

The box showing cart contents is also missing.

14 Jan 2010, 8:33 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Who's online not working correctly

If you could test your whos_online file by editing the file:
/admin/whos_online.php

and around line 45 change the code from:

  // longer than 2 minutes light color
  $xx_mins_ago_long = (time() - WHOIS_TIMER_INACTIVE);

to read:

  // longer than 2 minutes light color
  $xx_mins_ago_long = (time() - WHOIS_TIMER_INACTIVE);

  echo 'I SEE ' . $which_query->fields['value'] . '<br>';

then run the file, and see if you see english like text or garbage ...

If you see garbage, change that code to read:

  // longer than 2 minutes light color
  $xx_mins_ago_long = (time() - WHOIS_TIMER_INACTIVE);

  echo 'I SEE ' . base64_decode($which_query->fields['value']) . '<br>';

do you see english like text or garbage?

If you now see english like text, try changing the code around line 56 to read:

    case (strstr(base64_decode($which_query->fields['value']),'"contents";a:0:')):

and line 63 to read:

    case (!strstr(base64_decode($which_query->fields['value']),'"contents";a:0:')):

If, when the cart has something in it, you cannot see the detail, be sure that you are storing sessions to the database, as you cannot see the content unless you are ...

If you are storing to the database and still cannot see the content, try to edit the line at 386 from:

      $session_data = trim($session_data->fields['value']);

to read:

      $session_data = trim(base64_decode($session_data->fields['value']));

do these help?

NOTE: Save a good copy of your current whos_online.php before trying these changes ...

NOTE: these changes are NOT needed for all servers and should not be made unless there is a problem

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Jan 2010, 3:00 AM
#5
skybluepunk avatar

skybluepunk

New Zenner

Join Date:
Oct 2008
Posts:
28
Plugin Contributions:
0

Re: Who's online not working correctly

Hi Ajeh,

Thanks for your prompt reply.

This doesn't appear to be the problem, as the ECHO gave me english text right from the start.

It actually looks as if it might be some kind of timeout issue, as the page is never completely loaded. Do you know what else I could check?

Thanks!

15 Jan 2010, 3:24 AM
#6
skybluepunk avatar

skybluepunk

New Zenner

Join Date:
Oct 2008
Posts:
28
Plugin Contributions:
0

Re: Who's online not working correctly

If, when the cart has something in it, you cannot see the detail, be sure that you are storing sessions to the database, as you cannot see the content unless you are ...

Perhaps this is the problem? My zen_sessions table only contains 4 rows - is this the table I should be checking?

If I'm not storing sessions, how do I do so?

15 Jan 2010, 5:19 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Who's online not working correctly

Check your two configure.php files:
/includes/configure.php
/admin/includes/configure.php

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Jan 2010, 12:48 AM
#8
skybluepunk avatar

skybluepunk

New Zenner

Join Date:
Oct 2008
Posts:
28
Plugin Contributions:
0

Re: Who's online not working correctly

Both these files contain the line:

define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

Is that what I'm looking for?

16 Jan 2010, 2:03 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Who's online not working correctly

That means you are storing the sessions in the database ...

What version php?

What version MySQL?

Also check on your Tools ... Server Info ... for the values of:
suhosin.session.encrypt
suhosin.server.encode

NOTE: You may or may not have those values, depending on the server ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

13 Mar 2010, 11:44 AM
#10
unicorn avatar

unicorn

Zen Follower

Join Date:
Sep 2008
Posts:
107
Plugin Contributions:
0

Re: Who's online not working correctly

I'm having the same problem after I moved my shop, and none of these fixes work for me... I get the "I SEE", but only if nothing's in the cart. It's garbage if there is...

Checked both configure-files, look good as far as I can see. No suhosin either.

Any ideas..?

2 Apr 2010, 9:01 PM
#11
wcironsales avatar

wcironsales

New Zenner

Join Date:
Sep 2005
Location:
Gladstone, Oregon
Posts:
40
Plugin Contributions:
0

Re: Who's online not working correctly

Mine is working after I moved my shop recently but loads slow. My store was moved from https://www.mydomain.com/store to the root folder https://www.mydomain.com

  • whos online loads slow *

If no one is online it responds immediately that there is no one online. If someone is online it can show who/what/where and display Maximum execution time of 60 seconds exceeded in /home/users/account/www.mydomain.com/admin/whos_online.php on line 416 line.

My friends 1.3.7 upgrade to 1.3.8a store whos online is immediate every time.

My slow load settings are
PHP Version: 5.2.9
MySQL 5.0.89-community
suhosin.session.encrypt on/on
suhosin.server.encode on/on

configure.php (both files)
define('STORE_SESSIONS', 'db');

I did notice my friends had in the 2 configure.php files
define('SQL_CACHE_METHOD', 'database');

Where I had
define('SQL_CACHE_METHOD', 'file');

I changed to database with no effect. I'm not sure if just changing 'file' to 'database' and saving is the correct way of doing this however.

wcironsales

5 May 2010, 4:25 PM
#12
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Who's online not working correctly

Same thing has happend to me today.
It has worked like it should for 1.5 yrs.

It reloads every 60 seconds, but the page never fully load.
All the visitors have either full carts - green, og full abandoned carts - yellow. But when I click on a green cart, the contents of the cart doesn't show up like it used to..

I've noticed a lot of yandex-spiders the last couple of days, but I don't know if that has anything to do with it.

All help would be appreciated!

7 May 2010, 7:08 PM
#13
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Who's online not working correctly

Anyone have or found a solution for this?

7 May 2010, 7:45 PM
#14
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Who's online not working correctly

Ajeh:

That means you are storing the sessions in the database ...

What version php?

What version MySQL?

Also check on your Tools ... Server Info ... for the values of:
suhosin.session.encrypt
suhosin.server.encode

NOTE: You may or may not have those values, depending on the server ...

Both suhosin.session.encrypt and
suhosin.server.encode are enabled on my server, will this be a problem?

Zen Cart 1.38a, db-saved-sessions.

7 May 2010, 7:53 PM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Who's online not working correctly

Gomlers:

Both suhosin.session.encrypt and
suhosin.server.encode are enabled on my server, will this be a problem?
That will be why you don't see whos-online data.
The encryption/encoding is specifically intended to prevent snooping, and has the negative side-effect of preventing whos-online from snooping too.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 May 2010, 12:27 AM
#16
gomlers avatar

gomlers

Zen Follower

Join Date:
Aug 2008
Posts:
139
Plugin Contributions:
0

Re: Who's online not working correctly

Thank you! Do you know if I can affect this my self in any possible way, or is the only way to change host?

8 May 2010, 1:35 AM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: Who's online not working correctly

As your host if they'll turn off suhosin for your domain.
Or ask them if they'll let you do it yourself using a php.ini or .htaccess file, and if so, how should you do it.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.