Jump to content

Search the Community

Showing results for tags 'segmentation fault'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Hello, my following PHP code i.e. the last line causes a segmentation fault from time to time: $xml = new DOMDocument; $xml->formatOutput = true; $xml->load("xml/$hostname.log.xml"); $elements = $xml->getElementsByTagName("*"); foreach($elements as $element) { $type = $element->getAttribute('type'); $title = $element->getAttribute('title'); if($type == 'comment' or $title == 'Installed Packages') { foreach($element->childNodes as $item) { if($item->nodeType == 4) // XML_CDATA_SECTION_NODE { $cdataWrapper = $xml->createElement("wrapper", $item->nodeValue); $element->parentNode->appendChild($cdataWrapper); } } } } $xsl = new DOMDocument; $xsl->load("xml/wrapper.xsl"); $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); print(trim($proc->transformToXML($xml))); // --> Might cause a segmentation fault Instead of print I also tried echo. Then, I thought it might be a timing issue and thus, I added a usleep but this could not solve my problem. I also restarted the apache server and cleaned up the memory and swap without success. I'm able to call the page up to five times w/o having any problem but afterwards the segmentation fault is written to the apache error log and the HTML code following after the print is not displayed anymore. I'm using Apache/2.2.22 (Unix) PHP/5.4.0 with libxml 2.7.8 and libxslt 1.1.26 as well on a Linux platform. Any help is highly appreciated! PS: The wrapper is used to additional encapsulate CDATA blocks to be able to address them separately within a wrapper tag. For more details about the wrapper see my other post "How to address CDATA blocks".
×
×
  • Create New...