Hello again,

On Fri, 15 Feb 2002, Anders Knuts wrote:

[snip,snip]
> to use tcpdump in this case, Any hints?

You can use tcpdump to record the entire conversation between the
browser and the server.  To find out how to use it you can just type
'man tcpdump'.  If it's a problem specific to one IP address then
first I would record the conversations between a browser from an IP
address that doesn't suffer from the problem and the host, then from
the IP address which does have the problem.  My guess is that you'll
see something different when you compare these which might give you 
a clue about the problem.  You might even try spoofing the bad IP to
see if you can repeat the problem on your own.

On the other hand you might not yet have exhausted the other debugging
possibilities.  There are lots of techniques that you might try before
you get as deep into TCP as this.  You could put oodles of 'print
STDERR' statements all through your code, things like

my $dateTime   = gmtime;
print STDERR "[$dateTime] foo(): Line", __LINE__, " Calling sub bar REMOTE_IP=", 
$ENV{REMOTE_ADDR}, "\n";
&bar($ENV{REMOTE_IP});

which is the sort of thing I do to convince myself that I really don't
know what's going on when I think I don't know what's going on.  In
fact I do it routinely in most of my new code, just to assure myself
that what I think is happening really is happening - thinkgs like
executing subroutines, grabbing variables, reading and writing files,
they mostly get an entry in the error_log at first.  I tail the logs
during development but they make pretty dull reading after a while...

There are some good debugging tips in the Guide:

http://perl.apache.org/guide

73,
Ged.


Reply via email to