httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Gifford <>
Subject Re: [users@httpd] debugging websites running on Apache?
Date Fri, 19 Nov 2010 19:59:56 GMT
On Fri, Nov 19, 2010 at 7:00 AM, Tomasz Chmielewski <> wrote:

> How do you debug websites running on Apache?

I have a few tricks I use.

First, I try to write my applications so they can be run from the
commandline.  That means when they misbehave, I can run them directly under
strace or a debugger to see what's going on.

Others have suggested using the Xdebug profiler, but for what you are
looking at, the debugger might be more helpful.  You an just step through
the code one line at a time.

You can try running a Web server on an alternate port that only you use, so
that there will be no noise from other clients.

Sometimes I will have my applications write their PID to the error_log then
sleep for 30 seconds or so.  I can get their PID then and start an strace on
just that process.  You can limit this so they only do it when a request has
a particular parameter, comes from a particular IP address, etc.

Hope some of these techniques are helpful to you,


View raw message