0

I have an IIS server that I'm working on. There's a file at C:\Windows\Temp\php-errors.log that I'm using to debug some 500 errors. After abusing the usage a bit (wrote out a bunch of debug output to the file) the file is absurdly long. When I use PowerShell and Get-Content C:\Windows\Temp\php-error.log -Wait it takes a good fifteen minutes to scroll down to the bottom and start tailing the file.

Is there a way to speed this up or flush / erase the file?

Josh K
  • 454
  • 1
  • 6
  • 18

1 Answers1

1

Kill the PHP Process and remove the file by hand.

Are you running PHP via a CGI or ISAPI ?

If its via an ISAPI you will need to stop IIS.

You other option is to only select the last 10 / 100 lines of the file.

Get-Content C:\Windows\Temp\php-errors.log | Select-Object -last 10

BeStRaFe
  • 280
  • 2
  • 9
  • I'll give that a go. The last 10 / 100 lines thing just might be the answer. I don't feel comfortable shutting down IIS on a clients server. :) :edit: It's running, but I think it's still reading the entire file before getting to the last ten lines. – Josh K Jan 13 '10 at 13:57
  • Also, I have no idea if it's via CGI or ISAPI. I've never worked on an IIS server before. – Josh K Jan 13 '10 at 14:02