An interesting Apache Log to MySql ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All

I have been trying to find a way to write Apache Log data to a MySql db
via a pipe log directive.

So far I have this:

LogFormat "%v:*:%B:*:%u:*:%f:*:%h:*:%a:*:%s:*:%{%Y-%m-%d
%H:%M:%S%z}t:*:%{Content-type:}o:*:%U:*:%{Referer}i:*:%{User-Agent}i:*:%
{cookie}n" mysqllog

As my Logformat directive. It is delimited by ":*:".

Now the log part I am having problems with.

CustomLog "|/usr/local/bin/php phplog.php" mysqllog

I was thinking that I should write in the phplog.php all the connection
stuff and load Logformat data in to it but I don’t know where or how to
get the data. I don’t want to write the log file then read it in as that
defeats the object I am looking to do.

I don’t want to use mod_sql thing as I am not allowed to compile new
modules.

So I think I am asking what do I put into this:

$loaddata = mysql_query("insert into table .......")

To load the data from LogFormat.

If you can advise or help with this I will be most thank full.

Dave C
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.463 / Virus Database: 262 - Release Date: 17/03/2003
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux