This is a multi-part message in MIME format.

------=_NextPart_000_0065_01C6FCFA.12EB4570
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

I have this script:


use DBI;
my ($sth, $dbh, $domain, $domainID, $created, $sql);
$dbh = DBI->connect("DBI:mysql:ccc:cccc","ccc","ccc");
$sth = $dbh->prepare("SELECT domainID, domain, created FROM domain ORDER BY
domainID ASC");
$sth->execute();
while (($domainID, $domain, $created) = $sth->fetchrow_array())
{
if($created == 0)
{
system("/bin/mkdir /home/$domain");
system("/bin/mkdir /home/$domain/www");
system("/bin/mkdir /home/$domain/ErrorLog");
system("/bin/chown apache:apache -R /home/$domain");
$sql = $dbh->prepare("UPDATE domain SET created = 1 WHERE domainID =
$domainID");
$sql->execute();
}
push @{ $VirtualHost{'*:80'} },
{
ServerName => "$domain",
ServerAdmin => " ostmaster@$domain%22> postmaster@$domain";,
ServerAlias => "www.$domain",
DocumentRoot => "/home/$domain/www",
ErrorLog => "/home/$domain/ErrorLog/$domain-error_log",
CustomLog => "|/usr/sbin/cronolog /home/log/$domain-access_log.%Y-%m-%d
combined",
};
}
$sth->finish();
$dbh->disconnect();






But it crashes when it tries to read the line:

CustomLog => "|/usr/sbin/cronolog /home/log/$domain-access_log.%Y-%m-%d
combined",



The failure is:
apachectl: Configuration syntax error, will not run "graceful":
Syntax error on line 2 of /vhosts/vhosts.conf:
$parms->add_config() has failed: error in condition clause at
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-
thread-multi/Apache2/PerlSections.pm line 203.\n



If a remove this line, everything works just perfect.



Who should I define cronolog??









Med venlig hilsen / Best Regards
Tue Topholm

Device.Webbureau
M: +45 26 74 07 41

P: +45 70 21 00 04
LinkedIN:
http://www.linkedin.com/in/ttopholm




------=_NextPart_000_0065_01C6FCFA.12EB4570
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

=3D"urn:schemas-microsoft-comfficeffice" =
xmlns:w=3D"urn:schemas-microsoft-comffice:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">









style=3D'font-size:
10.0pt;font-family:Arial'>I have this script:



style=3D'font-size:9.0pt;
font-family:Arial'><Perl>

use DBI;

my ($sth, $dbh, $domain, $domainID, $created, $sql);

$dbh =3D
DBI->connect("DBI:mysql:ccc:cccc","ccc","ccc&=
quot;

$sth =3D $dbh->prepare("SELECT domainID, domain, created FROM =
domain
ORDER BY domainID ASC");

$sth->execute();

while (($domainID, $domain, $created) =3D $sth->fetchrow_array())

{

if($created =3D=3D 0)

{

system("/bin/mkdir /home/$domain");

system("/bin/mkdir /home/$domain/www");

system("/bin/mkdir /home/$domain/ErrorLog");

system("/bin/chown apache:apache -R /home/$domain");

$sql =3D $dbh->prepare("UPDATE domain SET created =3D 1 WHERE =
domainID =3D
$domainID");

$sql->execute();

}

push @{ $VirtualHost{'*:80'} },

{

ServerName =3D> "$domain",

ServerAdmin =3D> "
face=3DArial> style=3D'font-size:9.0pt;font-family:Arial'> href=3D"mailtoostmaster@$domain%22"
target=3D"_new"> lang=3DEN-GB>postmaster@$domain"
size=3D1 face=3DArial> style=3D'font-size:9.0pt;font-family:Arial'>;,

ServerAlias =3D> "www.$domain",

DocumentRoot =3D> "/home/$domain/www",

ErrorLog =3D> =
"/home/$domain/ErrorLog/$domain-error_log",

CustomLog =3D> "|/usr/sbin/cronolog =
/home/log/$domain-access_log.%Y-%m-%d
combined",

};

}

$sth->finish();

$dbh->disconnect();

</Perl>>>



style=3D'font-size:
9.0pt;font-family:Arial'>>



style=3D'font-size:
9.0pt;font-family:Arial'>>



style=3D'font-size:
9.0pt;font-family:Arial'>But it crashes when it tries to read the =
line:



CustomLog =3D> "|/usr/sbin/cronolog =
/home/log/$domain-access_log.%Y-%m-%d
combined",>>



style=3D'font-size:
9.0pt;font-family:Arial'>>



style=3D'font-size:
9.0pt;font-family:Arial'>The failure is:

apachectl: Configuration syntax error, will not run =
"graceful":

Syntax error on line 2 of /vhosts/vhosts.conf:

$parms->add_config() has failed: error in condition clause at
/usr/lib/perl5/vendor_perl/5.8.8/i386-linux-
thread-multi/Apache2/PerlSections.pm line =
203.\n>>



style=3D'font-size:
9.0pt;font-family:Arial'>



If a remove this line, everything works just =
perfect.>>



style=3D'font-size:
9.0pt;font-family:Arial'>>



style=3D'font-size:
9.0pt;font-family:Arial'>Who should I define cronolog??











style=3D'font-size:10.0pt;
font-family:Arial'>>>



style=3D'font-size:
10.0pt;font-family:Arial'>>



style=3D'font-size:
10.0pt;font-family:Arial'>Med venlig hilsen / Best Regards

Tue Topholm
>>



style=3D'font-size:
10.0pt;font-family:Arial'>Device.Webbureau

M: +45 26 74 07 41
lang=3DEN-GB>>>



style=3D'font-size:
10.0pt;font-family:Arial'>P: +45 70 21 00 04

LinkedIN:
style=3D'font-size:10.0pt;
font-family:Arial'> lang=3DEN-GB>http://www.linkedin.com/in/ttopholm
=
lang=3DEN-GB>>>



lang=3DEN-GB
style=3D'font-size:12.0pt'>>









------=_NextPart_000_0065_01C6FCFA.12EB4570--