womd
8th November 2007, 15:56
hello everybody !
the story is running with apache2.0.53 on suse9.3.
.. goal is .. on the webalizer site should be a button which, when pressed initializes a new run of parsing logfiles .....
this is what i try'd:
starting at webalizer.conf
-->
#Htmlpost defines html code to insert before first <hr>....
HTMLPost <?php include("custom.html); ?>
-->
here the custom.html which was included previously.
-->
<?php
if(isset($_POST['submit']) AND $_POST['submit'] == "regenerate statistics")
{
echo("---");
$scriptname = "do_stats";
if(file_exists($scriptname))
{
passthru("./$scriptname",$retval);
echo("retval: $retval <br>");
}
}
?>
<form name="customform" method="post" action"index.html">
<input type="submit" name="submit" value"regenerate statistics">
</form>
here the shell script which workes if executed in a shell -> do_stats:
-->
#!/bin/sh
/usr/bin/webailzer -n host -o /output/dir /log/file/1 log/file/2
the output (if i press this button) is:
Webalizer V2.01-10 (Linux 2.6.11.4-20a-default) English retval: 1
.. so the script is called ... but no statistic is generated .... maybee some premissoin problem .. how/where can i track this ? .. where can i find additional information on why this does not work ? .. any hint in which logfile this could be ?
--<
thank's for your advice !
chris
the story is running with apache2.0.53 on suse9.3.
.. goal is .. on the webalizer site should be a button which, when pressed initializes a new run of parsing logfiles .....
this is what i try'd:
starting at webalizer.conf
-->
#Htmlpost defines html code to insert before first <hr>....
HTMLPost <?php include("custom.html); ?>
-->
here the custom.html which was included previously.
-->
<?php
if(isset($_POST['submit']) AND $_POST['submit'] == "regenerate statistics")
{
echo("---");
$scriptname = "do_stats";
if(file_exists($scriptname))
{
passthru("./$scriptname",$retval);
echo("retval: $retval <br>");
}
}
?>
<form name="customform" method="post" action"index.html">
<input type="submit" name="submit" value"regenerate statistics">
</form>
here the shell script which workes if executed in a shell -> do_stats:
-->
#!/bin/sh
/usr/bin/webailzer -n host -o /output/dir /log/file/1 log/file/2
the output (if i press this button) is:
Webalizer V2.01-10 (Linux 2.6.11.4-20a-default) English retval: 1
.. so the script is called ... but no statistic is generated .... maybee some premissoin problem .. how/where can i track this ? .. where can i find additional information on why this does not work ? .. any hint in which logfile this could be ?
--<
thank's for your advice !
chris