Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Import nach update nicht möglich

    Scheduled Pinned Locked Moved Betrieb
    10 Posts 3 Posters 1.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      theinrich
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • dsD Offline
        ds
        last edited by

        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;
          }
        
        
        1 Reply Last reply Reply Quote 0
        • P Offline
          pgo
          last edited by

          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
          
          1 Reply Last reply Reply Quote 0
          • T Offline
            theinrich
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • dsD Offline
              ds
              last edited by

              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;
                }

              }
              ?>

              1 Reply Last reply Reply Quote 0
              • dsD Offline
                ds
                last edited by

                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) {
                ersetzen

                Das naechste Update wird diese Fehler beheben

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pgo
                  last edited by

                  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
                  1 Reply Last reply Reply Quote 0
                  • dsD Offline
                    ds
                    last edited by

                    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;

                    ?

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      pgo
                      last edited by

                      wunderbar - das hat geholfen !

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        theinrich
                        last edited by

                        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
                        
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post