ID: 48701
Updated by: [email protected]
Reported By: luca at iv-srl dot it
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: Windows XP
PHP Version: 5.2.10
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
Previous Comments:
------------------------------------------------------------------------
[2009-06-26 12:40:13] luca at iv-srl dot it
Description:
------------
I submit an attachment and then send via XML inside a node. When I
attach a file larger than 12k this function creates an empty node with
no evident error report on php.
(This is only a sample of the real code)
Reproduce code:
---------------
function creaElem($name, $value="", $parent=null)
{
$el=$this->Document->createElement($name);
if ($value!="")
$el->appendChild($this->Document->createTextNode($value));
if ($parent!=null)
$parent->appendChild($el);
return $el;
}
function AttachFile($parentnode,$attachmentname)
{
\\
$packet->creaElem("nomefile",$attachmentname,$parentnode);
$newnode=$packet->creaElem("attach","",$parentnode);
$whatsinside=file_get_contents ($_FILES['attachment']['tmp_name']);
$cdata=$this->Document->createCDATASection(base64_encode($whatsinside));
$newnode->appendChild($cdata);
}
Expected result:
----------------
When I run AttachFile(..) and My attachment size is larger than 12k
this
function creates an empty node. With attachments<12k it works.
Any suggestion?
Thanks in advance
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48701&edit=1