Jump to content
medvid

Who's Online Enhancement 1.4

Recommended Posts

This is very strange. Is there anything unusual about your installation, or your server configuration?

 

not really I have ultimate seo urls installed and a few other mods, the server is running in safe mode

Share this post


Link to post
Share on other sites
not really I have ultimate seo urls installed and a few other mods, the server is running in safe mode

 

What server? Apache? IIS? something else?

Share this post


Link to post
Share on other sites
What server? Apache? IIS? something else?

 

 

Apache/2.2.3 (Debian) PHP/4.4.7

 

Its weird If I refresh the whos online page constantly occasionally it will show the correct url only if the page is still loading on the clients browser if I refresh again once its finished loading it goes straight back to "/"

 

Any suggestions appreciated

 

cheers

Share this post


Link to post
Share on other sites
Apache/2.2.3 (Debian) PHP/4.4.7

 

Its weird If I refresh the whos online page constantly occasionally it will show the correct url only if the page is still loading on the clients browser if I refresh again once its finished loading it goes straight back to "/"

 

Any suggestions appreciated

 

cheers

 

Ok after many late nights slowly restoring my site to stock Ive narrowed it down to header.php

 

heres my header.php can anyone see anything obvious?

 

<?php
/*
 $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
 if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
  $messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
 }

// check if the configure.php file is writeable
 if (WARN_CONFIG_WRITEABLE == 'true') {
if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {
  $messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
 }

// check if the session folder is writeable
 if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
  if (!is_dir(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
  } elseif (!is_writeable(tep_session_save_path())) {
	$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
  }
}
 }

// check session.auto_start is disabled
 if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
  $messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
 }

 if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
  $messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
 }

 if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
 }
?>
<div id="STOREWIDTH">
<table width="99%" border="0" cellpadding="0" cellspacing="0" align="center" background="#ffffff">
 <tr>
<td valign="top" background="images/header/left.gif"> </td>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr class="header">
	<td valign="middle" height="67">  <?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'logo.png', 'tronix.co.nz') . '</a>'; ?></td>
	<td align="center" valign="middle"><?php if ($banner = tep_banner_exists('dynamic', '468x50')) {  echo tep_display_banner('static', $banner);  } ?></td>
	<td align="right" valign="bottom"><?php //echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>
  </tr>
</table>
	<table border="0" width="100%" cellspacing="0" cellpadding="1">
	  <tr class="headerNavigation">
		<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>
		<td align="right" class="headerNavigation"><a href="java script:window.external.AddFavorite(location.href,document.title);" class="headerNavigation"><?php echo BOX_HEADER_ADDFAVORITE; ?></a>  </td>
	  </tr>
	  <tr class="headerNavigation">
		<td class="headerNavigation" align="left" ><span style="font-weight:normal;font-family:Arial">  <?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="15" maxlength="30" style="width: ' . (BOX_WIDTH-15) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ALL_CATEGORIES)))) . '' . tep_hide_session_id() . tep_image_submit('button_search.gif', IMAGE_BUTTON_SEARCH, 'align="middle"') . tep_draw_hidden_field('inc_subcat', '1', true) . '</form>'; ?></span></td>
		<td class="headerNavigation" align="right" ><?php if (tep_session_is_registered('customer_id')) { ?>
			<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  | 
			<?php } ?>
			<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>
	  </tr>
</table></td>
<td background="images/header/right.gif"> </td>
 </tr>
 <tr>
<td align="right" valign="top"><img src="images/header/lower_left.gif" alt="2" width="5" height="5" /></td>
<td valign="top" background="images/header/bot.gif"><img src="images/header/bot.gif" alt="3" width="3" height="5" /></td>
<td align="left" valign="top"><img src="images/header/lower_right.gif" alt="2" width="6" height="5" /></td>
 </tr>
</table>
<?php
 if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerError">
<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>
 </tr>
</table>
<?php
 }

 if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
 <tr class="headerInfo">
<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>
 </tr>
</table>
<?php
 }
?>

Share this post


Link to post
Share on other sites
I added "bonecho/2.0.0.4" to catalog/includes/spiders.txt and it is now being detected as a bot.

 

Here's how it looks in context:

boitho

bonecho/2.0.0.4

booch

 

Thanks for the spelling correction. :-)

 

--Glen

I have the following Yahoo crawlers showing as Guests:

rz311495.crawl.yahoo.net

rz311400.crawl.yahoo.net

rz311442.crawl.yahoo.net

rz311507.crawl.yahoo.net

rz311485.crawl.yahoo.net

rz311515.crawl.yahoo.net

rz311566.crawl.yahoo.net

rz311541.crawl.yahoo.net

rz311562.crawl.yahoo.net

What should I add to the catalog/includes/spiders.txt, so it will be detected as a bot?

 

Thanks.

Share this post


Link to post
Share on other sites
I have the following Yahoo crawlers showing as Guests:

 

What should I add to the catalog/includes/spiders.txt, so it will be detected as a bot?

 

Thanks.

 

Please post the user agent strings for those bots. That is what the code that uses spiders.txt looks at.

 

 

 

--Glen

Share this post


Link to post
Share on other sites
Please post the user agent strings for those bots. That is what the code that uses spiders.txt looks at.

 

 

 

--Glen

It seems that these bots are not even registered in the access_log, I can't find them anywhere. I can just see them through the Admin --> Visitors. Their IP Addresses are shown as Unknown/LAN and different every time. These are just a few of the IPs:

67.195.54.49

67.195.54.225

67.195.54.95

67.195.54.151

67.195.55.113

67.195.55.117

67.195.54.238

67.195.54.217

67.195.54.254

Share this post


Link to post
Share on other sites
It seems that these bots are not even registered in the access_log, I can't find them anywhere. I can just see them through the Admin --> Visitors. Their IP Addresses are shown as Unknown/LAN and different every time. These are just a few of the IPs:

 

Irina,

In Who's Online, change the Profile Display setting to All, then copy the User Agent string of each of the offending bots. Post each unique user agent here and I will be able to help you.

 

--Glen

Share this post


Link to post
Share on other sites

::RECOMMENDATION::

 

Would it be possible to embed a .wav to play when an active cart is present? I tried to add it to the code but was not able to knock it out. Thanks.

Share this post


Link to post
Share on other sites
Irina,

In Who's Online, change the Profile Display setting to All, then copy the User Agent string of each of the offending bots. Post each unique user agent here and I will be able to help you.

 

--Glen

I added bonecho/2.0.0.4 to my spiders list and now all Yahoo crawlers are being detected as bots. So, I'm good now :rolleyes:

 

Thanks.

Share this post


Link to post
Share on other sites

i get the following message

 

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

 

is it possible to fix this without changing the the maximum execution time as i dont think my host will change this?

 

Thanks


Scott

Share this post


Link to post
Share on other sites
i get the following message

 

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

 

is it possible to fix this without changing the the maximum execution time as i dont think my host will change this?

 

Thanks

 

Which version of Who's Online Enhancement are you using?

 

--Glen

Share this post


Link to post
Share on other sites
I'll give that a try then, thanks

 

OK i'm now using v3.5 and i still get a timeout at line 715, you think its possible to fix?


Scott

Share this post


Link to post
Share on other sites
OK i'm now using v3.5 and i still get a timeout at line 715, you think its possible to fix?

 

I think that it is unlikely to have nearly the same error in two entirely different versions. Perhaps you put the updated file in the wrong place and are still running the old version.

 

Or, since your site doesn't seem to be live, you may have a different problem entirely. The most common cause of timeouts is DNS resolution with many customers. I fixed this in v3.5. (Use v3.5.2, as there are bugs in previous releases of v3.5.)

 

The other common problem is related to the suhosin patch for PHP by the Hardened-PHP group. This triggers an endless loop and was also fixed in v3.5. However, cart information is not available if the suhosin patch is installed on your server, due to the method used to save/extract cart data.

 

--Glen

Share this post


Link to post
Share on other sites
I think that it is unlikely to have nearly the same error in two entirely different versions. Perhaps you put the updated file in the wrong place and are still running the old version.

 

Or, since your site doesn't seem to be live, you may have a different problem entirely. The most common cause of timeouts is DNS resolution with many customers. I fixed this in v3.5. (Use v3.5.2, as there are bugs in previous releases of v3.5.)

 

The other common problem is related to the suhosin patch for PHP by the Hardened-PHP group. This triggers an endless loop and was also fixed in v3.5. However, cart information is not available if the suhosin patch is installed on your server, due to the method used to save/extract cart data.

 

--Glen

 

1. Everything is updated as it should be and it is definitly the new version thats active as it's totally different to the version i was running.

 

2. The site is live so not sure where you're looking???

 

3. I am using the latest version, the one before the dutch translation.


Scott

Share this post


Link to post
Share on other sites
2. The site is live so not sure where you're looking???

 

And just to add, the contribution actually works fine on my test server, it's only on the live site that its an issue.

 

and it does show who's online.........

 

Screenshot


Scott

Share this post


Link to post
Share on other sites
And just to add, the contribution actually works fine on my test server, it's only on the live site that its an issue.

 

and it does show who's online.........

 

Screenshot

 

I somehow didn't notice before that the timeout error moved to the end of the file, from line 118 to line 715. You are now hanging up in the cart contents display code. This is almost certainly related to the suhosin patch for PHP, which I believe is installed on your live server, but not the test server. Suhosin "transparently" encrypts session data when it is stored and decrypts it when it is retrieved. The issue comes when another process attempts to retrieve that data, which is what we are doing with Who's Online. I can fix the code so you will no longer receive the timeout error, but you still won't see what is in the cart. I will post a fixed version in a couple of days.

 

A complete fix for this issue will require a change in the way that Who's Online stores and retrieves the cart data. This will take some thought, and I may need some help in testing, as I do not have access to a server running PHP with the suhosin patch installed.

 

--Glen

Share this post


Link to post
Share on other sites
I somehow didn't notice before that the timeout error moved to the end of the file, from line 118 to line 715. You are now hanging up in the cart contents display code. This is almost certainly related to the suhosin patch for PHP, which I believe is installed on your live server, but not the test server. Suhosin "transparently" encrypts session data when it is stored and decrypts it when it is retrieved. The issue comes when another process attempts to retrieve that data, which is what we are doing with Who's Online. I can fix the code so you will no longer receive the timeout error, but you still won't see what is in the cart. I will post a fixed version in a couple of days.

 

A complete fix for this issue will require a change in the way that Who's Online stores and retrieves the cart data. This will take some thought, and I may need some help in testing, as I do not have access to a server running PHP with the suhosin patch installed.

 

--Glen

 

No problem, i can live with it how it is for now, its showing who's online and what they're looking at, not having the cart display isn't a major problem but it would be useful if a solution can be found.

 

If you're going to have a go at it i'd be happy to help with the testing.

 

Thanks


Scott

Share this post


Link to post
Share on other sites

I just updated to version 3.53 from 3.51.

I didn't have a problem with checkbox in IE before.

Now it only refresh the page on a checkbox lost focus event. Before it did on a click event and it was more convenient. Now I have to click something else to refresh the page :(

Otherwise it works very good.

Did anybody think about marriage of Supertracker contribution and this one? I think it would be great, too bad I don't know PHP :(

Anyway, this is a great contribution. Thank you very much!


Computers777dotcom

Share this post


Link to post
Share on other sites
I just updated to version 3.53 from 3.51.

I didn't have a problem with checkbox in IE before.

Now it only refresh the page on a checkbox lost focus event. Before it did on a click event and it was more convenient. Now I have to click something else to refresh the page :(

Otherwise it works very good.

Did anybody think about marriage of Supertracker contribution and this one? I think it would be great, too bad I don't know PHP :(

Anyway, this is a great contribution. Thank you very much!

 

That probelm has been answered in this thread.

 

http://forums.oscommerce.com/index.php?s=&...t&p=1271275

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

×