From: [EMAIL PROTECTED] Operating system: redhat 7.3 PHP version: 4.2.3 PHP Bug Type: Output Control Bug description: echo and print output the number of bytes written
$doc = domxml_open_mem($HTTP_RAW_POST_DATA); if (!$doc) { soap_fault("BAD_DATA","The content supplied was invalid"); } $env = $doc->document_element(); $body = $env->first_child(); $nodes = $body->child_nodes(); $c = sizeof($nodes); for($i=0;$i<$c;$i++) { if ($nodes[$i]->tagname == "method") $method = $nodes[$i]->get_content(); if ($nodes[$i]->tagname == "argv") $argv = $nodes[$i]->child_nodes(); } echo "AnyData Here"; results in: c AnyData Here That 'c' represents 12, the number of bytes written. It will do this for every usage of echo, here is a more complicated response result (can't show code cause my company won't allow that, will try to provide another sample later) Sample Code/Output: -- begin code -- header("Content-Type: text/xml; charset=\"UTF-8\")"); header("Cache-control: private"); echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>"; echo "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">"; echo "<SOAP-ENV:Body>"; echo "<status>success</status>"; echo "</SOAP-ENV:Body></SOAP-ENV:Envelope>"; exit(); -- end code -- -- begin output -- d0 <?xml version="1.0" encoding="UTF-8" standalone="no" ?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><status>success</status></SOAP-ENV:Body></SOAP-ENV:Envelope> 0 -- end output -- -- Edit bug report at http://bugs.php.net/?id=19678&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19678&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19678&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19678&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19678&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19678&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19678&r=support Expected behavior: http://bugs.php.net/fix.php?id=19678&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19678&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19678&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19678&r=globals