up vote 0 down vote favorite
share [g+] share [fb]

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?

link|improve this question

60% accept rate
feedback

1 Answer

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

link|improve this answer
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
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.