|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45422 Creation of new xmlwriter using memory fails
Submitted: 2008-07-02 23:00 UTC Modified: 2008-07-11 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ales dot loncar at internet-solutions dot si Assigned:
Status: No Feedback Package: XML Writer
PHP Version: 5.2.6 OS: Mac OS X 10.5.2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-07-02 23:00 UTC] ales dot loncar at internet-solutions dot si
Creation of new xmlwriter using memory fails. Script stops at same line. In Apache error log notice is writen:
[notice] child pid 363 exit signal Bus error (10)

Reproduce code:
$data = array(
    "foo" => 456,
    "bar" => 789,
    "aaa" => array(
        "abc" => 111

$xml = new XmlWriter();
$xml->openMemory(); // script stopes in this line
$xml->startDocument('1.0', 'UTF-8');

function write(XMLWriter $xml, $data){
    foreach($data as $key => $value){
            write($xml, $value);
        $xml->writeElement($key, $value);
write($xml, $data);

echo $xml->outputMemory(true);

Expected result:
<?xml version="1.0" encoding="UTF-8"?>

Actual result:
Blank Screen


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-02 23:05 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read for *NIX and for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
 [2008-07-03 08:13 UTC]
For the information, works like a charm on windows and linux.

Scott, have you tried the script?
 [2008-07-11 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat May 30 12:01:23 2020 UTC