Skip to content
Extraits de code Groupes Projets
Valider 6d26635f rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

Fixes #3208 Inviting users to check server error logs when there is an empty...

Fixes #3208 Inviting users to check server error logs when there is an empty respnse. this should decrease support requests.

git-svn-id: http://dev.piwik.org/svn/trunk@6657 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent d3bf2d5c
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -548,10 +548,10 @@ class Archiving
public function logFatalError($m, $backtrace = true)
{
$this->log("ERROR: $m");
$this->logError($m);
$fe = fopen('php://stderr', 'w');
fwrite($fe, "Error in the last Piwik archive.php run: \n" . $m
. ($backtrace ? "\n\n Here is the full output of the script:\n\n" . $this->output : '')
. ($backtrace ? "\n\n Here is the full errors output:\n\n" . $this->output : '')
);
trigger_error($m, E_USER_ERROR);
exit;
......@@ -559,7 +559,16 @@ class Archiving
private function logNetworkError($url, $response)
{
$this->logError("Got invalid response from API request: $url. Response was '$response'");
$message = "Got invalid response from API request: $url. ";
if(empty($response))
{
$message .= "The response was empty. This usually means a server error (for example, PHP reached the maximum memory_limit). Please check your Web server Error Log file for more details.";
}
else
{
$message .= "Response was '$response'";
}
$this->logError($message);
return false;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter