Fw: PHP logfile of PHP variables and scripts
| From: | Alexander J. Vincent | Date: | Sun, 29 Jul 2001 16:57:55 +0000 |
| Subject: | Fw: PHP logfile of PHP variables and scripts | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-1123@lists.php.net to get a copy of this message | ||
Reposted (as directed) from php-dev@lists.php.net :
One thing I've been thinking about recently is a desire for PHP to provide a
function whereby PHP scripts can log incoming variables (such as
$HTTP_POST_VARS) and the PHP scripts which process them. Such a function
can prove very useful in knowing what a particular user has done.
Of course, not every PHP script needs logging in this sense. For instance,
if I grab a file from the server and dispatch it to the client via PHP, that
likely doesn't need logging. But a PHP script call which includes dropping
a MySQL database is another matter...
I like the idea of autologging for two reasons. One is to allow me to
easily construct a PHP script for replicating my work elsewhere, including
creating a database holding the same structure but no information. (This
advances the cause of open-source development, in my opinion.) The other is
in case someone uses a PHP script on my site maliciously; not only will I be
able to track down who did it, but I will likely be able to restore more of
what they damaged, entirely.
I wrote one possible autologger script. My friend (who is much more
experienced in PHP than I am) expanded it somewhat. I'd like to see what
the PHP development team thinks of adding an autologger function to the PHP
library of functions.
Say, logPHPInstance($filename) (which includes a boolean value to disable
the autologger function within the log, in case someone tries to execute the
log file all over again without editing it.)
http://freewarejava.com/ubb/Forum5/HTML/002241.html
Opinions?