small logo

melfneerg.com

 - 'cos life is like that


[Blog]  [Pictures]  [Links]  [About
About the Author
Tudor Davies

author Tudor is a techie turned manager who fights like mad to keep his tech skills honed and relevant. Everything from web hosting, networking, *nix and the like. Constantly developing and co-ordinating with others to make the web a better (and easier to use) place.

Remote Debugging

Friday, 12th Apr 2013  Posted @ 23:41

One of my websites was reporting spurious results when being sent a specific query. Regardless of the information being sent by the client, it was always sending back the same limited set of results.
I was DJ'ing at the time, so was limited in the resources available - but I did have my Android tablet.
So I fired up ConnectBot and SSH'd into one of the boxes. To start debugging, I did:

tcpdump -A -v dst port 80
This confirmed that the client was sending the correct information, so it was the script on the server at fault.
I added a
print_r($string)
in the ajax handling script and saw that the same array was being used, regardless of the information was being received - somethng was indeed awry.
I added an echo to print the received data and nothing... Hmmm!
A quick look at the code which interprets the ajax sent to it and there it was: 2 underscores when there should have been one.
Quickly fixed and then replicated to the other servera in the cluster and all fixed.

[ 1 comments : Add | Read ]

Tweet




layout and initial css based on the Qtractor page