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?

1 Answer 1

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

2
  • 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
    Commented Jan 13, 2010 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
    Commented Jan 13, 2010 at 14:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .