Apache2 php error logging
ryandesign at macports.org
Sat Feb 6 11:54:12 PST 2010
On Feb 6, 2010, at 13:50, Scott Haneda wrote:
> On Feb 6, 2010, at 6:09 AM, Jasper Frumau wrote:
>> On Sat, Feb 6, 2010 at 4:29 PM, Jasper Frumau wrote:
>>> $ sudo chown root:admin php-scripts.log
>>> did not help either to get the logging going. It must be something else. But what?
>> When I chmod 777 the file it started logging. I guess Apache is in a different group.... Well all is well now and save as al is taking place locally.
Yes, apache runs as _www; see the relevant line in httpd.conf.
> You could probably nuke the script and redstart Apache, it should recreate itself with the correct permission.
> At least, that's exactly how my error and access logs behave. When I roll them I essentilly move them, sleep apache, restart apache gracefully, and gzip them. I've never had a log not recrete on lack of existance. Then again, I've always sent php errors to the error log in Apache since the errors often time are related, or helpful to see http data errors alongside.
> And I do all that by hand because logroller has bnot Bern updated in years and the unbuilt Apache log piping mechanism causes Apache to crash. I filed a bug report but Apache seems to not take notice.
I used to like cronolog for this, but I had some trouble with it last time I tried. It was months ago and I don't remember the specifics, but there may have been crashing involved.
More information about the macports-users