Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Plugin MDSTAT produces PHP-Error with addAttr

Help
TW123
2010-03-09
2012-12-12
  • TW123
    TW123
    2010-03-09

    plugin mdstat produces following error while cat /proc/mdstat tells

    Personalities :   
    md1 : active raid5 hda1 hdd1 hdc1 hdb1
          732539520 blocks level 5, 64k chunk, algorithm 2 

    md0 : active raid1 sda1 sdb1
          309917824 blocks 

    unused devices: <none>

      <?xml version="1.0" encoding="UTF-8" ?>
    - <#> <tns:phpsysinfo xmlns:tns="*http://phpsysinfo.sourceforge.net/*"
    xmlns:xsi="*http://www.w3.org/2001/XMLSchema-instance*"
    xsi:schemaLocation="*http://phpsysinfo.sourceforge.net/ phpsysinfo3.xsd*">
      <Generation version="*3.0.4*" timestamp="*1268149676*" />
      <Options tempFormat="*c*" byteFormat="*auto_binary*"
    refresh="*60000*" showPickListTemplate="*true*"
    showPickListLang="*true*" />
    - <#> <UsedPlugins>
      <Plugin name="*MDStatus*" />
      </UsedPlugins>
    - <#> <Plugins>
    - <#> <Plugin_MDStatus>
    - <#> <Supported_Types>
      <Type Name="*raid1*" />
      <Type Name="*raid6*" />
      <Type Name="*raid5*" />
      <Type Name="*raid4*" />
      </Supported_Types>
    - <#> <Raid Device_Name="*md1*" Level="*raid5*" Disk_Status="*active*"
    Chunk_Size="*64*" Persistend_Superblock="*1*" Algorithm="*2*"
    Disks_Registered="*4*" Disks_Active="*4*">
      <Action Percent="*-1*" Name="*-1*" Time_To_Finish="*-1*"
    Time_Unit="*-1*" />
    - <#> <Disks>
      <Disk Name="*hda1*" Index="*0*" />
      <Disk Name="*hdd1*" Index="*3*" />
      <Disk Name="*hdc1*" Index="*2*" />
      <Disk Name="*hdb1*" Index="*1*" />
      </Disks>
      </Raid>
    - <#> <Raid Device_Name="*md0*" Level="*raid1*" Disk_Status="*active*"
    Chunk_Size="*-1*" Persistend_Superblock="*1*" Algorithm="*-1*"
    Disks_Registered="*2*" Disks_Active="*2*">
      <Action Percent="*-1*" Name="*-1*" Time_To_Finish="*-1*"
    Time_Unit="*-1*" />
    - <#> <Disks>
      <Disk Name="*sda1*" Index="*0*" />
      <Disk Name="*sdb1*" Index="*1*" />
      </Disks>
      </Raid>
      </Plugin_MDStatus>
      </Plugins>
    - <#> <Errors>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
    - <#> <Error Function="*errorHandlerPsi :*">
    - <#> <![CDATA[

    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() [<a
    href='function.SimpleXMLElement-addAttribute'>function.SimpleXMLElement-addAttribute</a>]:
    Attribute name and value are required File :
    /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php
    Line : 107

      ]]>
      </Error>
      </Errors>
      </tns:phpsysinfo>

     
  • Erkan
    Erkan
    2010-03-10

    Hello, thanks for your report.

    All you attribute seems to have an extra "*"

    <Disk Name="*hdb1*" Index="*1*" />
    

    What version of PhpSysInfo and Php did you used ? Did you install php-xml extension?

     
  • TW123
    TW123
    2010-03-10

    well sorry, here is the origin one - the first copy of the output was from my mailer which did a type of conversion.
    Nevertheless thanks for your support. I use libxml 2.6.27, PHP Version 5.2.0-8, phpsysinfo 3.0.4

    each disk within two arrays seem to throw an error????

    <?xml version="1.0" encoding="UTF-8" ?>
    - <tns:phpsysinfo xmlns:tns="http://phpsysinfo.sourceforge.net/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://phpsysinfo.sourceforge.net/ phpsysinfo3.xsd">
      <Generation version="3.0.4" timestamp="1268206798" />
      <Options tempFormat="c" byteFormat="auto_binary" refresh="60000" showPickListTemplate="true" showPickListLang="true" />
    - <UsedPlugins>
      <Plugin name="MDStatus" />
      </UsedPlugins>
    - <Plugins>
    - <Plugin_MDStatus>
    - <Supported_Types>
      <Type Name="raid1" />
      <Type Name="raid6" />
      <Type Name="raid5" />
      <Type Name="raid4" />
      </Supported_Types>
    - <Raid Device_Name="md1" Level="raid5" Disk_Status="active" Chunk_Size="64" Persistend_Superblock="1" Algorithm="2" Disks_Registered="4" Disks_Active="4">
      <Action Percent="-1" Name="-1" Time_To_Finish="-1" Time_Unit="-1" />
    - <Disks>
      <Disk Name="hda1" Index="0" />
      <Disk Name="hdd1" Index="3" />
      <Disk Name="hdc1" Index="2" />
      <Disk Name="hdb1" Index="1" />
      </Disks>
      </Raid>
    - <Raid Device_Name="md0" Level="raid1" Disk_Status="active" Chunk_Size="-1" Persistend_Superblock="1" Algorithm="-1" Disks_Registered="2" Disks_Active="2">
      <Action Percent="-1" Name="-1" Time_To_Finish="-1" Time_Unit="-1" />
    - <Disks>
      <Disk Name="sda1" Index="0" />
      <Disk Name="sdb1" Index="1" />
      </Disks>
      </Raid>
      </Plugin_MDStatus>
      </Plugins>
    - <Errors>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
    - <Error Function="errorHandlerPsi :">
    - <![CDATA[
    PHP throws a error
    Level : 2 Message : SimpleXMLElement::addAttribute() : Attribute name and value are required File : /usr/share/phpsysinfo/includes/xml/class.SimpleXMLExtended.inc.php Line : 107

      ]]>
      </Error>
      </Errors>
      </tns:phpsysinfo>

     
  • Erkan
    Erkan
    2010-03-12

    Hello,

    Can we have the output of 'cat /proc/mdstat' ?

     
  • TW123
    TW123
    2010-03-13

    cat /proc/mdstat produces as (mentioned above) follows:

    cat /proc/mdstat
    Personalities :   
    md1 : active raid5 hda1 hdd1 hdc1 hdb1
          732539520 blocks level 5, 64k chunk, algorithm 2 

    md0 : active raid1 sda1 sdb1
          309917824 blocks 

    unused devices: <none>

    thanks in advance

     
  • Erkan
    Erkan
    2010-03-14

    Works for me  :

    Whats version of php did you have ? Maybe this bug in PHP 5.2.1 : http://bugs.php.net/41175

     
  • TW123
    TW123
    2010-03-17

    Thanks for your hint. Sampleoutput from this bugreport http://bugs.php.net/41175 could be reproduced. Thank you - I will test ist with an applied patch - I Think I will establish it after Easter.

    Thanks