Jump to content

Intermittent Problem - Any Suggestions?


robinbell

Recommended Posts

Hello,I'm looking for some suggestions as to how to go about finding the cause of an intermittent problem on a web site my publisher has created (I'm an author with computer experience, but not recently - they have just asked me to help as the original programmer is no longer available).The site is a chat-room application. A user logs on and is shown a screen with 2 columns, one to display entered chat and the other to show logged on users. This works fine. An input text field allows for entry of the new chat text. When send is clicked, the chat area is updated with the new chat text entry, by adding it to the existing chat messages. This also works fine 99% of the time. However, very occasionally the input chat text, when "Send" is clicked, will appear a random number of times in the chat area. It can appear anywhere from 2 to maybe as many as 50 times, without any user action, appearing very quickly, one after the other.The chat messages are entered in an MySQL database as well as appearing on the screen, but the random multiple entries on the screen are NOT showing in the database table, so I don't think the problem is in MySQL.I have tried putting alerts into the javascript functions, and writing various messages and variable values to a log file within the PHP functions but am no closer to even knowing if it's a javascript, PHP or MySQL problem. I have tried running the Microsoft Visual Web Developer, which includes a script debugger, but haven't been able to find a suitable PHP debugger (I tried Gubed, but this just crashed my machine)If anyone has any experience with this type of problem and any advice on where the fault may be, I would love to get any help. I can post the code here if necessary, but this is more a general cry for help pointers at this stage...Thanks to anyone!

Link to comment
Share on other sites

Thanks for the idea. I've been sitting at my keyboard going over various combinations but haven't had the problem for a day or so. Last time it happened I had entered "test line 2 aaaaaa" which repeated 3 times. Trying the same combination of characters works fine today....

Link to comment
Share on other sites

Thanks for the reply. It seems that I'm not alone with doughnuts and coffee - at least 3 other users seem to have sticky keys, as they are getting the random repeating message. Meanwhile I'll put the vacuum cleaner away and try some debugging....

Link to comment
Share on other sites

The first step is to figure out where the error is happening. You should be using something like Firebug to help debug when you're developing, if you're not already. You can use Firebug to examine the response from the PHP script to see if that's where the problem is, and you can use console.log statements in place of alerts to write variables or objects to Firebug's console.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...