[FASTCGI] save a log

Doru Georgescu headset001 at yahoo.com
Sat Aug 14 07:30:35 EDT 2010


"  Hi Doru!

You should be able to write to the disk normally.

The data does not get flushed to the disk.
Try flushing the data to the disk with fflush(mylog);, or closing the 
file after the program ends. " 

Thank you very much for this tip. 
Files are flushed and closed automatically when a process exits normally, but in this case the process never exits normally. Since I wrote very little to mylog, the buffer was never flushed automatically. 

This page: 
http://httpd.apache.org/docs/2.2/misc/security_tips.html#serverroot
says that it might be dangerous if I allow www-data (apache's user) to write to /var/log. Should I believe them, even if I'm the only user on the system?

I got an ugly "Segmentation fault" error when I didn't answer anything to the request. Simultaneously I was testing logging on a different fcgi program, and I forgot about my MaxProcessCount setting of 1, such that I had a good time. :) 

For some reason, google can not search in this list's archive, even though that would be very useful. 

Thank you all for your patience,
Doru




      


More information about the FastCGI-developers mailing list