Jump to content
medvid

Who's Online Enhancement 1.4

Recommended Posts

Still tearing my hair out with this one, any new ideas?

 

I still have the problem that more often than not my Whos Online screen looks like this

 

WhosOnlineScreen.Jpg

 

Can anyone help me solve this?


Thanks for any help/comments.

 

Regards,

 

Lewis Hill

Share this post


Link to post
Share on other sites
I have moved to new server recently and installed this contribution.

 

Problem is that it does not work by default. I think I have tracked down the issue to session handling by my server. It seem to crypt session values because when I look at session table data is not readable (looks like base64 encoding but is not).

 

And because of that, script can't show basket content because it gets this data from session value and what's more, it gets into infinite loop in one place in script.

 

Loop can be fixed by adding:

      if ( $start_id === false ) $start_id = 0;
     if ( $start_cart === false ) $start_cart = 0;
     if ( $start_currency === false ) $start_currency = 0;
     if ( $start_country === false ) $start_country = 0;
     if ( $start_zone === false ) $start_zone = 0;

after:

        $start_id = strpos($session_data, 'customer_id|s');
       $start_cart = strpos($session_data, 'cart|O');
       $start_currency = strpos($session_data, 'currency|s');
       $start_country = strpos($session_data, 'customer_country_id|s');
       $start_zone = strpos($session_data, 'customer_zone_id|s');

 

but it does not fix missing basket. Can anyone think of some workaround for this issue? Can I somehow see real session data in my script?

 

I agree with you! I tracked down the simialr issue here. I have used my store for months. While I look at the session table, early session values are readable like cart|O:12:"shoppingcart":4:{s:8:"contents";a:0:{}s:5:"total";i:0;s:6:"weight";. But later values suddently changed to crypt values like Bszvn64O1Abd_pK0YiFC9ICvcmRnCx2WfKxLSU084RGCVcn2Oi. I am not sure if it has something to do with updates of PHP or Mysql or IE . The only place to insert seesion data I find is function _sess_write($key, $val) in catalog\includes\functions\session.php. However, I don't know how to modify it to recover the real session data.

Share this post


Link to post
Share on other sites
I agree with you! I tracked down the simialr issue here. I have used my store for months. While I look at the session table, early session values are readable like cart|O:12:"shoppingcart":4:{s:8:"contents";a:0:{}s:5:"total";i:0;s:6:"weight";. But later values suddently changed to crypt values like Bszvn64O1Abd_pK0YiFC9ICvcmRnCx2WfKxLSU084RGCVcn2Oi. I am not sure if it has something to do with updates of PHP or Mysql or IE . The only place to insert seesion data I find is function _sess_write($key, $val) in catalog\includes\functions\session.php. However, I don't know how to modify it to recover the real session data.

 

I found the solution finally!!

 

Session values are encrypted because my server has installed a new php patch named Hardened-PHP , which was founded to protect PHP users and servers against present and future security holes. To bring session values back to normal, just change the suhosin.ini file which is normally located in etc/php4/apache2/conf.d/. Add one line "suhosin.session.encrypt=0" into the suhosin.ini file. Then reboot the apache server. Now when you check the session table in your mysql database, the values are readable. Shopping cart of who's online module works fine now!

 

More information about Hardened-PHP can be found at http://www.hardened-php.net/

Share this post


Link to post
Share on other sites
I got busy and didn't have the chance to post it. I will package it all up and make an announcement here when it is posted.

 

--Glen

 

has anybody a solution about this problem? I was not able to fix it by now.

Share this post


Link to post
Share on other sites
I got busy and didn't have the chance to post it. I will package it all up and make an announcement here when it is posted.

 

--Glen

has anybody a solution about this problem? I was not able to fix it by now.

 

Anyone?

Share this post


Link to post
Share on other sites

i'v recently had this problem. It used to work fine , i only get this error when there are people on my site, how do i fix this please? Thanks

 

Fatal error: Maximum execution time of 30 seconds exceeded in /home2/public_html/catalog/admin/whos_online.php on line 121

Share this post


Link to post
Share on other sites
i'v recently had this problem. It used to work fine , i only get this error when there are people on my site, how do i fix this please? Thanks

 

Fatal error: Maximum execution time of 30 seconds exceeded in /home2/public_html/catalog/admin/whos_online.php on line 121

Please refer to my Post #1202 and #1203.

 

The error occurs because session values are encrypted due to subosin patch of PHP on your server (your host may upgrade php and add the patch). Who's online script enters into an infinite loop because $start_cart is undefined.

 

Two solutions.

 

1. Modify your whos_online.php file as fszone posted (#1192). Fatal error will disappear but you can't see what your customers have added to their shopping cart.

 

2. Remove subosin patch of your PHP or configure suhosin.ini file by adding one line "suhosin.session.encrypt=0". This can solve the problem thoroughly and you don't need to modify the whos_online.php file. Fatal error won't happen again and shopping cart works fine.

Share this post


Link to post
Share on other sites
Please refer to my Post #1202 and #1203.

 

The error occurs because session values are encrypted due to subosin patch of PHP on your server (your host may upgrade php and add the patch). Who's online script enters into an infinite loop because $start_cart is undefined.

 

Two solutions.

 

1. Modify your whos_online.php file as fszone posted (#1192). Fatal error will disappear but you can't see what your customers have added to their shopping cart.

 

2. Remove subosin patch of your PHP or configure suhosin.ini file by adding one line "suhosin.session.encrypt=0". This can solve the problem thoroughly and you don't need to modify the whos_online.php file. Fatal error won't happen again and shopping cart works fine.

 

i added the code, Thank you for pointing it out, very much appreciated.

Share this post


Link to post
Share on other sites
i added the code, Thank you for pointing it out, very much appreciated.

i've added the code too, but i don't see any changes. The loop is still there.

Share this post


Link to post
Share on other sites
i've added the code too, but i don't see any changes. The loop is still there.

 

 

did u modify catalog/admin/whos_online.php?

 

there is 2 of the same sets of code, add the new code to both.

Share this post


Link to post
Share on other sites
did u modify catalog/admin/whos_online.php?

 

there is 2 of the same sets of code, add the new code to both.

yes i did it! i don't get error message but whos online take more than 2 minutes to show the results and the shopping cart ist not shown. I'm not able to make any changes to the server. Is there no other way to resolve the problem?

Edited by cyrusfd

Share this post


Link to post
Share on other sites

Hi there,

 

I just installed the contribution, and it almost works as expected.

 

If the selected person has something in his cart, the cart-image is shown to the left of all clients.

 

I've checked the mysql-database, and I can easily match a sesskey from SESSIONS with the session_id FROM whos_online, but apparently the same match isn't made in whos_online.php.

 

I have tried to put a product in my cart, and then go check in the module. Sometimes the right content shows up - other times, another shoppers content shows up (while my sesskey is supplied) - and again, sometimes no content is displayed - It seems pretty random.

 

I have no problems with cart content on the user-side of my shop!

Share this post


Link to post
Share on other sites

Does anyone know how to make this contribution hide bots?

Why are they included at all?

Share this post


Link to post
Share on other sites

i have asked number of times for this fix, to turn "Show bots ON/OFF" .. no luck :)

Share this post


Link to post
Share on other sites

i searched this topic but didn't notice anyone else having this problem.

 

 

i have register_globals off and i wonder if this is the cause of my error:

whos online works fine, but it doesn't show me when a customer has a cart.

 

if i happen to click on one that does, EVERYBODY (except bots) are blinking with the 'has a cart' icon.

 

then once i click off customers, nobody has a cart again.

Share this post


Link to post
Share on other sites

WHERE DO YOU ADD THIS CODE, as I KEEP GETTING TIME OUT ERROR IN WHOS ONLINE?

I CANNOT EDIT THE APACHE SIDE AS THIS WAS A INSTALL VIA FANTASTICO

 

THANKS STEVE

 

I have moved to new server recently and installed this contribution.

 

Problem is that it does not work by default. I think I have tracked down the issue to session handling by my server. It seem to crypt session values because when I look at session table data is not readable (looks like base64 encoding but is not).

 

And because of that, script can't show basket content because it gets this data from session value and what's more, it gets into infinite loop in one place in script.

 

 

 

Loop can be fixed by adding:

      if ( $start_id === false ) $start_id = 0;
     if ( $start_cart === false ) $start_cart = 0;
     if ( $start_currency === false ) $start_currency = 0;
     if ( $start_country === false ) $start_country = 0;
     if ( $start_zone === false ) $start_zone = 0;

after:

        $start_id = strpos($session_data, 'customer_id|s');
       $start_cart = strpos($session_data, 'cart|O');
       $start_currency = strpos($session_data, 'currency|s');
       $start_country = strpos($session_data, 'customer_country_id|s');
       $start_zone = strpos($session_data, 'customer_zone_id|s');

 

but it does not fix missing basket. Can anyone think of some workaround for this issue? Can I somehow see real session data in my script?

Share this post


Link to post
Share on other sites
i searched this topic but didn't notice anyone else having this problem.

i have register_globals off and i wonder if this is the cause of my error:

whos online works fine, but it doesn't show me when a customer has a cart.

if i happen to click on one that does, EVERYBODY (except bots) are blinking with the 'has a cart' icon.

then once i click off customers, nobody has a cart again.

 

As best I can tell this contribution will not show cart contents with register globals turned off.

Share this post


Link to post
Share on other sites

it shows the contents, but it shows them for everybody with the cart blinking once i click on somebody that i know has a cart.

 

surely there's a way to make it compatible. i keep trying, but i'm not the best when it comes to technical aspects of php :)

Share this post


Link to post
Share on other sites

I get this error after install: Fatal error: Cannot redeclare class shoppingcart in /mnt/w0207/d18/s05/b02d72b0/www/catalog/catalog/admin/includes/classes/shopping_cart.php on line 13

Line 13 reads: Released under the GNU General Public License

*/

 

class shoppingCart {

var $contents, $total, $weight, $cartID, $content_type;

 

function shoppingCart() {

$this->reset();


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Well, I solved my issue. I removed the shopping cart reference in the whos_online.php file in admin. I also removed two redirects from these files that were sending info to other sites! One was called whatsmyisp.com the other was for a site that is owned by the contributor azir.

The only thing left to fix is the images don't display, just boxes with red x's.


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites
Well, I solved my issue. I removed the shopping cart reference in the whos_online.php file in admin. I also removed two redirects from these files that were sending info to other sites! One was called whatsmyisp.com the other was for a site that is owned by the contributor azir.

The only thing left to fix is the images don't display, just boxes with red x's.

 

Would you be more specific? What exactly is the issue that your editing solved?

 

Those aren't "redirects". They are links to what is my ip.

Share this post


Link to post
Share on other sites
I get this error after install: Fatal error: Cannot redeclare class shoppingcart in /mnt/w0207/d18/s05/b02d72b0/www/catalog/catalog/admin/includes/classes/shopping_cart.php on line 13

Line 13 reads: Released under the GNU General Public License

*/

 

class shoppingCart {

var $contents, $total, $weight, $cartID, $content_type;

 

function shoppingCart() {

$this->reset();

 

Exactly the same problem, updated whos online from OSCMax2 whos online, don't know that version.

Anyone has an idea what can be the problem?

 

/Bengt

Share this post


Link to post
Share on other sites

Ok, here's what I did. I ftp'ed each php file to my desktop and opened it in winmerge. I compared these files with the stock whos online files. The modified file that goes in the admin directory has a call to the shopping cart just below the require application top. I simply commented it out and the program worked.

 

As for the links, I don't like having redirects in my programs. The whatsmyisp.com redirect wasn't too bad. But the other one was making a call to another website that was logging customer info. So, they both got booted.


If the only tool you have is a hammer, all your problems look like nails

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×