How to track down PHP crashes? How to track down PHP crashes? apache apache

How to track down PHP crashes?


Since XAMPP's Apache (for Windows) is built with winn_nt MPM (multi-thread) + Thread-Safe PHP, it may be that you are hitting a problem inherent to the supposedly Thread-Safe versions of PHP (see this very good post for more information). This could explain why you never encounter the error when running in a single-user mode.

Please let us know if Uku Loskit's suggestion did any good. If not, I would recommend switching to a Prefork + Non-Thread-Safe PHP setup in such a multi-user environment.

Because MPM must be chosen at compile-time, you would need to either:

  • compile Apache yourself (technically feasible, but quite a pain in the neck on Windows, as far as I remember)
  • find a distribution other than XAMPP, which is built with prefork (I do not know any)

Perhaps you'd better try to run PHP with FastCGI (this extra layer basically isolates server threads by starting a separate PHP process for each thread, and much more). This should allow you to verify easily enough my initial assumption.

Just a side note: I do not see the point in installing Apache on a Windows Server. You may want to consider either using IIS, optionally with FastGCI (see instructions here), or (better) switch to a Linux-based stack.