#1  
Old 16th September 2009, 09:38
Quissi Quissi is offline
Junior Member
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache2 error.log problem

Hi,

I'm running a small hosting-server and i'm having a problem. I'm running Debian Lenny; apache2, php5, mysql etc. The usual stuffs.

I have something like 20 virtualhosts on apache. I have disabled the error messages in php.ini so errors don't show up in the browser. All PHP error messages goes to users homedir ~/logs/error.log. Users have read-only access to their ~/logs directory and their error.logs file. Logrotate is rotating the logs. Everything is running smoothly.

One user is building/testing a new site of his. He's getting a lot of error messages, and he's debugging a lot. Every now and then something wierd is happening. The user makes something or some PHP-script/software what he's using is not working which causes a PHP error. The error-message goes to error.log as usual but apache/PHP repeats the error-message like million times until the error.log fills all my available harddrive.

This causes the bigger problems. My harddrive is filled up which of course causes many other problems. Mysql won't accept new connections etc. The main problem is that one user and his error.log can fill up all my harddrive.

I have no idea why some PHP-code/script repeats the error-message a million times. To be honest i don't want to know but i want to prevent this happening again. I don't mind if one error.log is huge, i can always clean it up but if it causes system-wide problems then it's a major problem.

All my users have a quota setup. They have 100Mb to 500Mb quota. The error.log is in ~/logs directory but the owner is not the user himself.

What can i do? What changes should i do? I hope there's some easy sollution and i just can't see it atm

btw. Thanks for the great site and awesome forums!
Reply With Quote
Sponsored Links
  #2  
Old 17th September 2009, 13:57
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

I guess you're using mod_php at the moment, and therefore the logs are owned by the Apache user?
You could use suPHP or FastCGI - in these cases you can make PHP run as the web site owner, and the error log would also belong to that user and therefore fall under that user's quota.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 18th September 2009, 15:04
Quissi Quissi is offline
Junior Member
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Yes, i'm using mod_php. And yes, this would solve my problem.

What happens if the user owns the error.log file and he deletes that file for some reason? How would apache handle that?

At the moment users don't own their error.log files, so they cannot delete those files.

I have to think about this and i'm gonna test it. Thanks mate.
Reply With Quote
Reply

Bookmarks

Tags
apache2, error.log

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 name start problem sefs Installation/Configuration 1 22nd March 2009 18:08
apache2 won't connect to localhost or 127.0.0.1 anw Server Operation 6 19th March 2009 18:51
Mydns-ng problem, port 53 already in use. jerek Installation/Configuration 1 13th March 2009 09:27
Gentoo Perfect Setup problem Apache PHP dschmid HOWTO-Related Questions 2 29th November 2007 16:27
Problem with mail and plugin djmostek Installation/Configuration 10 3rd September 2007 21:12


All times are GMT +2. The time now is 20:04.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.