Forum Moderators: coopster
Will doing this cause potential problems with page load times? Say simultaneous hits on pages, where it is attempting to write to the log file at the same time. If there a maxiumum number of file access per second?
maybe this thread will give some extra ideas
Getting PHP session variables into your Apache logs [webmasterworld.com]
you could use that to add extra info right into your apache logs, it wouldn't have to be specifically session data, and help you track the hits better
Doing any disk writes in PHP will slow your page slightly. If there are simultaneous page views you also run the risk of interleaved writes to your log file- you'd see a jumble of data, with lines not beginning or ending in the right places. File locking can fix this, but it will slow down the page further.
I second the Apache log suggestion. The Apache logging facility is specifically designed for high-performance simultaneous writes, and it works well. I've long wished that PHP had native access to it like other mod_foo scripting modules do.