PDA

View Full Version : mon ping ne fonctionne plus sous centreon


pti-kwi
25th March 2008, 12:07
Lors d'unping avec centreon je reçoit ce message d'erreur:


Fatal error: Call to undefined method PEAR_Error::getRawData() in /usr/local/centreon/www/include/tools/ping.php on line 47



Merci d'avance

pti-kwi
25th March 2008, 16:45
Avez vous une solution ? s'il vous plait

Aviscdr
26th March 2008, 00:17
As-tu essayé de repiocher le fichier php qui pose problème dans les sources de Centreon ?

Attention aux droits avant de remplacer ;)

pti-kwi
26th March 2008, 09:43
Oui j'ai remplacé le fichier qui causait problème, le même message d'arreur continue à apparaitre.

Voici mon fichier :

<?php
/**
Centreon is developped with GPL Licence 2.0 :
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Developped by : Julien Mathis - Romain Le Merlus - Christophe Coraboeuf

The Software is provided to you AS IS and WITH ALL FAULTS.
OREON makes no representation and gives no warranty whatsoever,
whether express or implied, and without limitation, with regard to the quality,
safety, contents, performance, merchantability, non-infringement or suitability for
any particular or intended purpose of the Software found on the OREON web site.
In no event will OREON be liable for any direct, indirect, punitive, special,
incidental or consequential damages however they may arise and even if OREON has
been previously advised of the possibility of such damages.

For information : contact@oreon-project.org
*/

include("../../oreon.conf.php");
require_once ("../../$classdir/Session.class.php");
require_once ("../../$classdir/Oreon.class.php");
Session::start();

if (!isset($_SESSION["oreon"])) {
// Quick dirty protection
header("Location: ../../index.php");
//exit();
}
else
$oreon =& $_SESSION["oreon"];

if (isset($_GET["host"]))
$host = $_GET["host"];
else if (isset($_POST["host"]))
$host = $_POST["host"];
else {
print "Bad Request !";
exit;
}

require ("Net/Ping.php");
$ping = Net_Ping::factory();

if(!PEAR::isError($ping)) {
$ping->setArgs(array("count" => 4));
$response = $ping->ping($host);
foreach ($response->getRawData() as $key => $data)
$msg .= $data ."<br>";
print $msg;
}

WAtt
26th March 2008, 10:15
Et juste comment ca, t'es paquet PEAR sont bon ? Bonne version ?