Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Who's Online Enhancement 1.4


Guest

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

Link to comment
Share on other sites

  • 2 weeks later...
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.

Link to comment
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/

Link to comment
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.

Link to comment
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?

Link to comment
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

Link to comment
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.

Link to comment
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.

Link to comment
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
Link to comment
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!

Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

  • 2 weeks later...

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?

Link to comment
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.

Link to comment
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 :)

Link to comment
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();

Link to comment
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.

Link to comment
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.

Link to comment
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

Link to comment
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.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...