log_errors = On
log_errors_max_len = 1024
error_log = error_log
You can monitor the directories of the site for the appearance of the error_log with something like this:<?php // find_error_log.php
error_reporting(E_ALL);
ob_start();
// PUT THIS SCRIPT IN THE WEB ROOT DIRECTORY
$path = realpath(getcwd());
$plen = strlen($path);
// THE ERROR LOG FILE NAME
$signal = strrev('error_log');
// IF THERE IS A POST-METHOD REQUEST TO DELETE THE ERROR LOG
if (!empty($_POST['log']))
{
// MAKE SURE WE ONLY UNLINK THE ERROR LOG FILE
$test = strrev($_POST['log']);
if (strpos($test, $signal) === 0)
{
unlink($path . $_POST['log']);
echo '<h3>' . $_POST['log'] . ' Discarded</h3>';
}
}
// SEE http://php.net/manual/en/class.recursivedirectoryiterator.php#85805
$objs = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach($objs as $name => $obj)
{
// PROCESS THE ERROR LOG ONLY
$test = strrev($name);
if (strpos($test, $signal) === 0)
{
$name = substr($name, $plen);
$form = <<<EOD
<form method="post" style="margin:0; padding:0; display:inline;!important">
<b>$name</b>
<input type="submit" value="Discard?" />
<input type="hidden" name="log" value="$name" />
</form>
EOD;
echo $form;
// SHOW THE CONTENTS OF THE ERROR LOG
echo '<pre>';
print_r(file_get_contents($path . $name));
echo "</pre>";
}
}
$out = ob_get_contents();
if (empty($out)) echo '<h3>Good News! No error_log found.</h3>';
HTH, ~Ray
Can I do that from "Plesk"?