Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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