httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nirjhareswar Banerjee <>
Subject [users@httpd] problem in custom log pipe with cgi script for red hat 8
Date Mon, 17 Mar 2003 21:39:22 GMT

i am in a bit trouble, i am using redhat 8 in default setup. in the 
httpd.conf, for a name based virtual host i have changed as

CustomLog "| /home/projects/projects/test/cgi-bin/mysqllog" common

and the structure of the file is

use DBI;

use constant DSN       => 'dbi:mysql:test';
use constant DB_TABLE  => 'access_log';
use constant DB_USER   => 'nir';
use constant DB_PASSWD => 'nir12';

$PATTERN = '([A-Za-z0-9 .-_]+)';

$db = DBI->connect(DSN,DB_USER,DB_PASSWD) || die DBI->errstr;
$sth = $db->prepare("INSERT INTO ${\DB_TABLE} VALUES(?)") || die 
while (<>)
    my($data) = /$PATTERN/o;

when i run the script from cui, it works fine, but does not work with 
the pipe... then i tried this to figure out if the pipe option at all 

CustomLog "| /usr/bin/gzip -c >> 
/home/projects/projects/test/logs/access_log.gz" common

it yeilds nothing.... would anyone please help me to sort the problem out.?

Thanks  & Regards

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message