1

Is there a way to log execution time of any php scripts running on a webserver? The server is setup similar to a shared hosting setup, except that our customers don't control their hosting or websites. I'm hoping for a way I can use either the apache logs, or perhaps something in php.ini that I can use to track unusually long running scripts without writing some code and inserting it into the footers of 225+ websites.

Ideas?

1 Answers1

1

Check out http://code.google.com/p/mod-log-firstbyte/ This will add the %F option which you can add to your Apache access.log configuration.

faker
  • 17,326
  • 2
  • 60
  • 69
  • Perfect, that's exactly what I needed. Now, I thought php could start outputting before the script finishes...or does apache only start output until php finishes? –  Oct 07 '10 at 19:55
  • It starts only when PHP is done. Try it out: – faker Oct 07 '10 at 20:23