Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a php website running on lighttpd. I have around 15 to 30k visits daily. Now, in my PHP code, I have a lot of warnings generated by undeclared $_GET or $_POST variables.

Obviously these are not shown to the user so are all logged into lighttpd log tiles.

Problem is: every 3 or 4 days those logs get so big that basically take up all the space in the system and can't do anything else, sessions stop working, etc.

How can I prevent lighttpd from writing up all those warning messages?

share|improve this question

You coult turn off logging php errors.

Or you could use some log rotation mechanism to compress each day's log and delete logs that are older than two or three days.

share|improve this answer
I would opt for turning off logging PHP warnings and notices, only errors logged. Logrotate doesn't actually help much on highly trafficated and error-plenty applications, at least if the HD is clogged in 3 or 4 days (I had a site, hit by Google indexer, that clogged the 30GB Azure VHD in 1 hour because of one damn script) – usr-local-ΕΨΗΕΛΩΝ Feb 5 '13 at 14:54

Your Answer


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.