Import nach update nicht möglich
-
Hallo zusammen,
nach dem Update auf 0.9.7 kommt beim Import einer vom h-inventory erstellten xml Datei folgender Fehler:
Fatal error: Call to undefined method isys_component_xml::simple_xml_parse() in C:\XAMPP\xampp\htdocs\idoit\src\classes\import\isys_import.class.php on line 74""Ich bin für jeden Ratschlag dankbar.
VG Thomas
-
Füg mal folgendes in die Datei src/classes/components/isys_component_xml.class.php ganz am ende in die vor-vorletzte Zeile (vor dem letzten "}") ein:
/** * Return "simple_xml" parsed file * * @param string $p_file * @return (object)SimpleXMLElement */ public function simple_xml_parse($p_file) { $l_sxml = simplexml_load_file($p_file); return $l_sxml; } -
der fehler ist mir auch aufgefallen
[*] Loading Import: /var/www/html/i-doit/imports/clients/vermittlung-1061970.xmlPHP Fatal error: Call to undefined method isys_component_xml::simple_xml_parse() in /var/www/html/i-doit/src/classes/import/isys_import.class.php on line 74 nach einfügen der oben beschriebenen aenderungen kommt nurn folgende meldung: [code] [+] Hard Disk..PHP Warning: Missing argument 2 for isys_cmdb_dao_category_g_stor::import(), called in /var/www/html/i-doit/src/classes/import/handler/isys_import_handler.class.php on line 197 and defined in /var/www/html/i-doit/src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_stor.class.php on line 442 PHP Fatal error: Uncaught Exception occured in (/var/www/html/i-doit/src/classes/cmdb/dao/isys_cmdb_dao_storage_device.class.php:672): isys_exception_dao > isys_exception_dao_cmdb : Storage device cannot be created without object id thrown in /var/www/html/i-doit/src/classes/cmdb/dao/isys_cmdb_dao_storage_device.class.php on line 672 [/code] import geht derzeit nicht -
Hab ich gemacht.
Die letzten Zeilen sehen bei mir jetzt wiefolgt aus:
#############
….
"@return string
* @desc Returns the error string of the XML Parser
*/
public function get_error()
{
if($this->m_res_parser) {
return xml_error_string($this->get_error_code());
}
}/**
* @return void
* @desc Constructor
/
public function __construct()
/*
* Return "simple_xml" parsed file
*
* @param string $p_file
* @return (object)SimpleXMLElement
*/
public function simple_xml_parse($p_file) {$l_sxml = simplexml_load_file($p_file);
return $l_sxml;
}{
parent::__construct($this);$this->m_res_parser = ISYS_NULL;
$this->m_res_parser = xml_parser_create();
}/**
* @return void
* @desc Destructor
*/
public function __destruct()
{
if($this->m_res_parser) {
xml_parser_free($this->m_res_parser);
}
}
}
?>"
##############
funktioniert aber leider noch immer nicht--->selber Fehler -
Das ist auch nicht ganz richtig eingefügt.
Es sollte ungefähr so aussehen:/**
* @return void
* @desc Constructor
*/
public function __construct()
{
parent::__construct($this);$this->m_res_parser = ISYS_NULL;
$this->m_res_parser = xml_parser_create();
}/**
* @return void
* @desc Destructor
*/
public function __destruct()
{
if($this->m_res_parser) {
xml_parser_free($this->m_res_parser);
}
}/**
* Return "simple_xml" parsed file
*
* @param string $p_file
* @return (object)SimpleXMLElement
*/
public function simple_xml_parse($p_file) {$l_sxml = simplexml_load_file($p_file);
return $l_sxml;
}}
?> -
pgo: src/classes/cmdb/dao/category/global/isys_cmdb_dao_category_g_stor.class.php
Nach
public function import($p_data, $p_object_id) {
suchen und durch:
public function import($p_data, $p_object_id = NULL) {
ersetzenDas naechste Update wird diese Fehler beheben
-
brachte leider keine verbesserung
- Scantime: 04.06.2009 11:28:31
[+] Creating object..- Created object-id: 4742
- Category mode
[+] CPU..
[+] Model..
[+] Memory..
[+] Graphic card..
[+] Hard Disk..PHP Fatal error: Uncaught Exception occured in (/var/www/html/i-doit/src/classes/cmdb/dao/isys_cmdb_dao_storage_device.class.php:672): isys_exception_dao > isys_exception_dao_cmdb : Storage device cannot be created without object id
thrown in /var/www/html/i-doit/src/classes/cmdb/dao/isys_cmdb_dao_storage_device.class.php on line 672
- Scantime: 04.06.2009 11:28:31
-
Hmm,
und wenn du noch in der selben Datei aus$_GET[C__CMDB__GET__OBJECT] = $p_object_id;
das hier machst:
if (!$_GET[C__CMDB__GET__OBJECT]) $_GET[C__CMDB__GET__OBJECT] = $p_object_id;
?
-
wunderbar - das hat geholfen !
-
Bei mir noch nicht

Fehlermeldung* Loading module: import* –----------------------------------------------* i-doit import* –----------------------------------------------* Import-Handler initialized (2009-06-04 16:10:24)* Setting up system environment* Loading Import: imports/srvidoit-1065426.xmlParse error: parse error, expecting `T_FUNCTION' in C:\XAMPP\xampp\htdocs\idoit\src\classes\components\isys_component_xml.class.php on line 162Uploaded:
Die Datei src/classes/components/isys_component_xml.class.php sieht wie folgt aus: /** * @return integer * @desc Returns the last error code of the XML Parser */ public function get_error_code() { if($this->m_res_parser) { return xml_get_error_code($this->m_res_parser); } } /** * @return string * @desc Returns the error string of the XML Parser */ public function get_error() { if($this->m_res_parser) { return xml_error_string($this->get_error_code()); } } { parent::__construct($this); $this->m_res_parser = ISYS_NULL; $this->m_res_parser = xml_parser_create(); } /** * @return void * @desc Destructor */ public function __destruct() { if($this->m_res_parser) { xml_parser_free($this->m_res_parser); } } /** * Return "simple_xml" parsed file * * @param string $p_file * @return (object)SimpleXMLElement */ public function simple_xml_parse($p_file) { $l_sxml = simplexml_load_file($p_file); return $l_sxml; } ?> ####### Die weiteren Ersetzungen habe ich ebenfalls durchgeführt. Es kommt weiterhin der o.g. Fehler Thomas
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login