Help Center Live Community
April 21, 2014, 04:45:38 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Initiate chat in IE fix?  (Read 26476 times)
MaxPowers
Not too much to say...
*
Offline Offline

Posts: 6


WWW
« on: August 12, 2007, 06:53:48 AM »

Knowing that Microsoft often has issues with their own characters and seeing as how this was encoded to iso-8859-1 in the config file (and resulting HTML code), I eliminated all copyright symbols in many of the scripts. The copyright notice is there, but the illegal characters (c in a circle, which is not on my keyboard) have been removed.

Since I was 'just poking around' on code that ought to work, but wasn't working, I also changed all of the line ending from Windows(\r\n) to Unix(\n). Not very scientific to make so many changes at once, but I was desperate and wasn't expecting much.

I attacked a broad swath of files in many areas, but I am particularly suspect of the /class/js/ files since this was one of the last changes I made before it started worked in IE and makes some sense seeing as how this was previously narrowed down to an xmlhttprequest issue.

I had the same issues everyone else was having, then started poking around since there didn't seem to be any answers. I don't have the time to narrow down my tests, but it IS working on IE7 now. I also changed the percentages in the positioning of the div to use a fixed px value in order to control the positioning a little better.

I'll test this more if I can, but this got it to start working in IE as expected.
« Last Edit: August 12, 2007, 07:10:27 AM by MaxPowers » Logged

gazoi
Not too much to say...
*
Offline Offline

Posts: 10


« Reply #1 on: August 12, 2007, 07:26:41 AM »

Could you create a diff of your changes? Would be great to get this working!
Logged
MaxPowers
Not too much to say...
*
Offline Offline

Posts: 6


WWW
« Reply #2 on: August 12, 2007, 08:00:46 AM »

This is the diff for the main, hcl/class/, and hcl/class/js folders. A recursive diff has too many listings to fit anywhere neatly.

If this doesn't do it, I'll scrape together a few more directories.

/hcl2/ is clean and 'uninstalled' while /hcl/ is the working version.

Code:
Common subdirectories: hcl/admin and hcl2/admin
Common subdirectories: hcl/cache and hcl2/cache
Common subdirectories: hcl/class and hcl2/class
diff hcl/client.php hcl2/client.php
3c3
<     // Copyright 2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/compile and hcl2/compile
diff hcl/config.php hcl2/config.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
80c80
<         $conf['template'] = 'Bliss';
---
>         $conf['template'] = 'G';
Common subdirectories: hcl/icons and hcl2/icons
Common subdirectories: hcl/lang and hcl2/lang
Common subdirectories: hcl/live and hcl2/live
Common subdirectories: hcl/modules and hcl2/modules
Common subdirectories: hcl/templates and hcl2/templates
diff hcl/version.php hcl2/version.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved


diff hcl/class/aardvark.php hcl2/class/aardvark.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
52c52
<             $time = time() + 600;
---
>             $time = time() + 60;
diff hcl/class/database.php hcl2/class/database.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/functions.php hcl2/class/functions.php
3c3
<     // Copyright 2004 Michael Bird. All Rights Reserved
---
>     // Copyright ? 2004 Michael Bird. All Rights Reserved
diff hcl/class/include.php hcl2/class/include.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/class/js and hcl2/class/js
Only in hcl2/class: mothership.php
Common subdirectories: hcl/class/phpmailer and hcl2/class/phpmailer
Common subdirectories: hcl/class/smarty and hcl2/class/smarty



diff hcl/class/js/aardvark.php hcl2/class/js/aardvark.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/chat.php hcl2/class/js/chat.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/cobrowse.php hcl2/class/js/cobrowse.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Only in hcl/class/js: error_log
diff hcl/class/js/include.php hcl2/class/js/include.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/live.php hcl2/class/js/live.php
16c16
<     // Copyright 2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/misc.php hcl2/class/js/misc.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/monitor.php hcl2/class/js/monitor.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/class/js/normal and hcl2/class/js/normal
diff hcl/class/js/request.php hcl2/class/js/request.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/xmlhttprequest.php hcl2/class/js/xmlhttprequest.php
3c3
<     // Copyright  2005 Andrew Gregory. All Rights Reserved
---
>     // Copyright ? 2005 Andrew Gregory. All Rights Reserved

« Last Edit: August 12, 2007, 08:03:14 AM by MaxPowers » Logged

gazoi
Not too much to say...
*
Offline Offline

Posts: 10


« Reply #3 on: August 12, 2007, 08:27:25 AM »

Thanks. You know, I did wonder about those UTF-8 encoded copyrights myself. I'll try this now and let you know.
Logged
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #4 on: August 12, 2007, 12:08:20 PM »

Hmm, seems someone went overboard with fixing the copyrights, they were supposed to be (c) not the character.  I didn't even notice it.  Next version will have them recoded to (c) as they should be.  The CRLF can cause issues, I'll dos2unix them in the next version.  Again, didn't notice them, since I tend to dos2unix any text file I upload just to be safe.

Good eye. Smiley
Logged

how may I help you today?
gazoi
Not too much to say...
*
Offline Offline

Posts: 10


« Reply #5 on: August 12, 2007, 12:44:00 PM »


I've just had a chance to do a bit of testing. The UTF-8 encodings or DOS carriage returns are not important here. The thing that makes IE able to respond to initiate chat requests (for me) is the line of code:

Code:
$time = time() + 127;

in the file hcl/class/aardvark.php

I'm finding anything over 126 works fine.
Logged
MaxPowers
Not too much to say...
*
Offline Offline

Posts: 6


WWW
« Reply #6 on: August 12, 2007, 06:24:05 PM »

I tried the timing that gazoi narrowed things down to. I found issues at the original 60 and at 100 (even with crlf and symbol issues fixed). No issue at 120.

I think this is definitely something with the 'time' line, but the number may vary from system to system... or end-user to end-user?

Looking at this as a cookie issue....
a) could this be fixed by using sessions or a database instead of cookies for Aardvark? Server-side sessions would work even if the user has cookies turned off.
b) I am using a secure https:// connection, but the cookie is not set using the 'secure' parameter in /class/aardvark.php:52 (is this why some have an issue, others don't?)
c) If GMT does not match from server to end-user, is 1xx enough for the timer? Would 3600 or higher (daylight savings) work without clogging the chat? (the cookie gets reset on each 'refresh', right?)

I use NTP on both my server and home/office PC, so the times should be within a couple of seconds of each other.

BTW, awesome software! I'm glad it's working for IE now Smiley
Logged

HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #7 on: August 12, 2007, 06:27:12 PM »

Hmm, I'll look over the code.  Thanks so much guys.  Sometimes I need to be wacked with a 2x4 to spot things, with three sources to keep track of on this project, it sometimes skips right by... 

The time issue could also be key to a few other issues with IE, since I firmly believe that some of the other mysterious problems are falling back to the Aardvark lib.

If you like to try the 3600 time offset, that would be cool.  I'm thinking something in the range of 130-150 would be great for most applications.  Something that will affect this is latency, and again, it's not something we can "fix" but we can definitely work around.
« Last Edit: August 12, 2007, 06:28:43 PM by mlzhosting » Logged

how may I help you today?
gazoi
Not too much to say...
*
Offline Offline

Posts: 10


« Reply #8 on: August 13, 2007, 03:47:04 AM »

Can you double check the times on your server and workstation? I found that the time I needed just happened to correlate with the difference between the two. I'm using a hosted site and their time is out (bad hosts).

This is definitely a cookie issue with IE by the looks of it though. I agree, using sessions would be the way to go here.
Logged
HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #9 on: August 13, 2007, 04:58:27 AM »

The problem with sessions is using mixed mode in Java can get messy quickly.  I think the best fix at this point is to add yet another config directive to the offset.  That way people don't have to muck in the code too much to fix it.

I'll look at sessions with 3.x.x however, since if I break that 2500 people won't come looking for my scalp. Cheesy
Logged

how may I help you today?
MaxPowers
Not too much to say...
*
Offline Offline

Posts: 6


WWW
« Reply #10 on: August 13, 2007, 05:17:53 AM »

While my server is using nist for NTP, my PC is using WinXP and the default 'microsoft NTP' server. Roughly 2 minutes difference... Go Microsoft!

I've had the expiry time set to time()+3600 all day and haven't noticed any issues. People come, surf to new pages, and eventually leave... many less than 1 hour. Some chat on IE, others on FF. No Opera today, at least not as a chat.
Logged

HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #11 on: August 13, 2007, 11:47:36 AM »

The only issue then would be that if you just close the window, your session could be left open for an hour, leading people to believe your not answering your chat requests.  If your time differential is 2 minutes, I think I would set it to something like 240-300 just to be safe, without upsetting potential clients.

BTW, I'm going to make this sticky at least until 2.1.4 comes out with the config parameter, so others can find it easily.
« Last Edit: August 13, 2007, 11:49:15 AM by mlzhosting » Logged

how may I help you today?
MaxPowers
Not too much to say...
*
Offline Offline

Posts: 6


WWW
« Reply #12 on: August 13, 2007, 08:19:44 PM »

yes, but MY time difference to the server was 2 minutes (within seconds now that I got rid of the default Microsoft time server on WinXP). Other computers may be off by more since gazoi's wouldn't work at anything less than 126, but I could go to 120 (maybe lower). Both in the 2-minute range, but I'm sure we try to keep our times current (even if our source is off). Others may not stay so current. I don't think it's enough to make it work for *me* (I'm using FF anyway, so this wouldn't be an issue), but the goal is to make it work for the general public where we have little or no control over their system clocks. Gazoi's issue also seemed to be from a server that is off where he cannot set the time. This situation would be much easier to fix 'on the server' by setting the expiry delay in the script than fixing the end-users time discrepancy.

I tested closing the *monitor* window (with monitor and user in FF) and it changed the online/offline icon within a few seconds even with a 1-hour cookie. This was similar to tests I did with simply closing the window versus checking it as *offline*, then closing it (earlier with the default expiry time). I'm sure there's ~something~ different about a 1-hour cookie, but the system seems to use AJAX calls to see if someone is still online or not and tends to pick up on changes regardless of the cookie. I'd also definitely suggest marking yourself offline before closing the window to make sure that updates happen in a timely manner.

Looking at the cookie data, it doesn't seem to do much except list the 'state'.... online, offline... active, ?inactive? I know that small amounts of data become majorly important when the code looks for them elsewhere, but this cookie seems harmless enough and isn't using the time as data... based on the fact that I know nothing about this codebase except for what I've scanned briefly in the past 3 days.

I feel confident enough to keep it at 3600 (for now), until we find a specific issue with it. Keep throwing scenarios my way and I'll be happy to check them. 4-5 minutes may be ok, but if the time is off on a system by any more than that, based on what we've learned, it would be more of the same with the user getting trapped in oblivion and unable to connect for chat.

If 3600 fails for any reason, I'll be more than happy to post it here! If anyone can find an issue with 3600, please do the same. If there are no ill-effects, I would feel safer with a bigger number knowing that more users can avoid 'purgatory'.
« Last Edit: August 13, 2007, 08:24:19 PM by MaxPowers » Logged

HCL Admin
Administrator
HCL Superstar
*****
Offline Offline

Posts: 882


WWW
« Reply #13 on: August 13, 2007, 10:43:45 PM »

That will work.  I'll put it in as a config, and we'll set the default to 3800 for now (Why 3800?  Because some people have their systems off by one hour, which will goof the whole idea, an extra 200 shouldn't matter according to your test... Smiley )
Logged

how may I help you today?
stitchinggifts
Not too much to say...
*
Offline Offline

Posts: 1


« Reply #14 on: September 04, 2009, 06:04:24 AM »

Quote from: MaxPowers link=topic=166. msg972#msg972 date=1186902046
This is the diff for the main, hcl/class/, and hcl/class/js folders.  A recursive diff has too many listings to fit anywhere neatly.

If this doesn't do it, I'll scrape together a few more directories.

/hcl2/ is clean and 'uninstalled' while /hcl/ is the working version.

Code:
Common subdirectories: hcl/admin and hcl2/admin
Common subdirectories: hcl/cache and hcl2/cache
Common subdirectories: hcl/class and hcl2/class
diff hcl/client.php hcl2/client.php
3c3
<     // Copyright 2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/compile and hcl2/compile
diff hcl/config.php hcl2/config.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
80c80
<         $conf['template'] = 'Bliss';
---
>         $conf['template'] = 'G';
Common subdirectories: hcl/icons and hcl2/icons
Common subdirectories: hcl/lang and hcl2/lang
Common subdirectories: hcl/live and hcl2/live
Common subdirectories: hcl/modules and hcl2/modules
Common subdirectories: hcl/templates and hcl2/templates
diff hcl/version.php hcl2/version.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved


diff hcl/class/aardvark.php hcl2/class/aardvark.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
52c52
<             $time = time() + 600;
---
>             $time = time() + 60;
diff hcl/class/database.php hcl2/class/database.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/functions.php hcl2/class/functions.php
3c3
<     // Copyright 2004 Michael Bird. All Rights Reserved
---
>     // Copyright ? 2004 Michael Bird. All Rights Reserved
diff hcl/class/include.php hcl2/class/include.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/class/js and hcl2/class/js
Only in hcl2/class: mothership.php
Common subdirectories: hcl/class/phpmailer and hcl2/class/phpmailer
Common subdirectories: hcl/class/smarty and hcl2/class/smarty



diff hcl/class/js/aardvark.php hcl2/class/js/aardvark.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/chat.php hcl2/class/js/chat.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/cobrowse.php hcl2/class/js/cobrowse.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Only in hcl/class/js: error_log
diff hcl/class/js/include.php hcl2/class/js/include.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/live.php hcl2/class/js/live.php
16c16
<     // Copyright 2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/misc.php hcl2/class/js/misc.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/monitor.php hcl2/class/js/monitor.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
Common subdirectories: hcl/class/js/normal and hcl2/class/js/normal
diff hcl/class/js/request.php hcl2/class/js/request.php
3c3
<     // Copyright  2005 Help Center Live. All Rights Reserved
---
>     // Copyright ? 2005 Help Center Live. All Rights Reserved
diff hcl/class/js/xmlhttprequest.php hcl2/class/js/xmlhttprequest.php
3c3
<     // Copyright  2005 Andrew Gregory. All Rights Reserved
---
>     // Copyright ? 2005 Andrew Gregory. All Rights Reserved


ok for those of us that are etiher too tired, or maybe I'm jsut not bright enough? where am I to put this code exactly?  I am having the same issue with IE not pushing a client chat reqeust and woudl LOVE to get it fixed post haste.

gk
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.165 seconds with 20 queries.

Google visited last this page March 17, 2014, 07:24:23 AM